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