Theme
This commit is contained in:
27
lib/features/auth/controllers/theme_state.dart
Normal file
27
lib/features/auth/controllers/theme_state.dart
Normal file
@@ -0,0 +1,27 @@
|
||||
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;
|
||||
}
|
Reference in New Issue
Block a user