GoldenSoju

Bugfix to avoid that ThemeData doesn't get changed correctly when darkTheme is s…

…et in GetMaterialApp and Theme should be changed to a ThemeData with Brightness.dark.
@@ -37,11 +37,15 @@ class GetMaterialController extends GetxController { @@ -37,11 +37,15 @@ class GetMaterialController extends GetxController {
37 Map<int, GlobalKey<NavigatorState>> keys = {}; 37 Map<int, GlobalKey<NavigatorState>> keys = {};
38 38
39 void setTheme(ThemeData value) { 39 void setTheme(ThemeData value) {
  40 + if (darkTheme == null) {
  41 + theme = value;
  42 + } else {
40 if (value.brightness == Brightness.light) { 43 if (value.brightness == Brightness.light) {
41 theme = value; 44 theme = value;
42 } else { 45 } else {
43 darkTheme = value; 46 darkTheme = value;
44 } 47 }
  48 + }
45 update(); 49 update();
46 } 50 }
47 51