Line data Source code
1 : import 'package:flutter/material.dart'; 2 : import 'package:get/src/routes/utils/parse_arguments.dart'; 3 : import 'package:get/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(this); 14 : } 15 : 16 0 : void setThemeMode(ThemeMode value) { 17 0 : themeMode = value; 18 0 : update(this); 19 : } 20 : 21 0 : void restartApp() { 22 0 : print("restart chamado"); 23 0 : key = UniqueKey(); 24 0 : update(this); 25 : } 26 : }