Files
TubeCards/lib/utils/themes/custom_theme.dart
friebetill 80f218097d Initial commit
Add Space version 2.0.1
2022-03-28 14:56:00 +02:00

38 lines
1022 B
Dart

import 'package:flutter/material.dart';
/// A custom theme covering the colors and typographic choices that are not
/// covered by [ThemeData].
class CustomThemeData {
/// Returns a new [CustomThemeData] instance.
const CustomThemeData({
required this.successColor,
required this.elevation4DPColor,
required this.elevation8DPColor,
required this.elevation10DPColor,
required this.elevation24DPColor,
});
/// Color representing a successful action or status.
final Color successColor;
/// Color for the 4dp height.
final Color elevation4DPColor;
/// Color for the 8dp height.
final Color elevation8DPColor;
/// Color for the 10dp height.
final Color elevation10DPColor;
/// Color for the 24dp height.
final Color elevation24DPColor;
}
extension ThemeDataExtensions on ThemeData {
static final _custom = <Brightness, CustomThemeData>{};
void addCustom(CustomThemeData custom) => _custom[brightness] = custom;
CustomThemeData get custom => _custom[brightness]!;
}