14 lines
270 B
Dart
14 lines
270 B
Dart
|
import 'package:flutter/material.dart';
|
||
|
|
||
|
class ThemeManager with ChangeNotifier{
|
||
|
|
||
|
ThemeMode _themeMode = ThemeMode.light;
|
||
|
|
||
|
get themeMode => _themeMode;
|
||
|
|
||
|
toggleTheme(bool isDark){
|
||
|
_themeMode = isDark?ThemeMode.dark:ThemeMode.light;
|
||
|
notifyListeners();
|
||
|
}
|
||
|
|
||
|
}
|