Line data Source code
1 : import 'package:flutter/material.dart'; 2 : import 'package:get_core/src/routes/utils/parse_arguments.dart'; 3 : import 'package:get_core/src/state/get_state.dart'; 4 : 5 : class GetMaterialController extends GetController { 6 : ParseRoute parse = ParseRoute(); 7 : Key key; 8 : ThemeData theme; 9 : ThemeMode themeMode; 10 : 11 0 : void setTheme(ThemeData value) { 12 0 : theme = value; 13 0 : update(); 14 : } 15 : 16 0 : void setThemeMode(ThemeMode value) { 17 0 : themeMode = value; 18 0 : update(); 19 : } 20 : 21 0 : void restartApp() { 22 0 : key = UniqueKey(); 23 0 : update(); 24 : } 25 : }