27 lines
648 B
Dart
27 lines
648 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:kmobile/config/theme_type.dart';
|
|
|
|
class ThemeState {
|
|
final ThemeData lightTheme;
|
|
final ThemeMode themeMode;
|
|
final ThemeType themeType;
|
|
|
|
ThemeState({
|
|
required this.lightTheme,
|
|
required this.themeMode,
|
|
required this.themeType,
|
|
});
|
|
|
|
ThemeState copyWith({
|
|
ThemeData? lightTheme,
|
|
ThemeMode? themeMode,
|
|
ThemeType? themeType,
|
|
}) {
|
|
return ThemeState(
|
|
lightTheme: lightTheme ?? this.lightTheme,
|
|
themeMode: themeMode ?? this.themeMode,
|
|
themeType: themeType ?? this.themeType,
|
|
);
|
|
}
|
|
bool get isDarkMode => themeMode == ThemeMode.dark;
|
|
} |