Showing
2 changed files
with
5 additions
and
5 deletions
| @@ -806,7 +806,7 @@ extension GetNavigation on GetInterface { | @@ -806,7 +806,7 @@ extension GetNavigation on GetInterface { | ||
| 806 | Text( | 806 | Text( |
| 807 | title, | 807 | title, |
| 808 | style: TextStyle( | 808 | style: TextStyle( |
| 809 | - color: colorText ?? Colors.black, | 809 | + color: colorText ?? theme.iconTheme.color, |
| 810 | fontWeight: FontWeight.w800, | 810 | fontWeight: FontWeight.w800, |
| 811 | fontSize: 16, | 811 | fontSize: 16, |
| 812 | ), | 812 | ), |
| @@ -815,7 +815,7 @@ extension GetNavigation on GetInterface { | @@ -815,7 +815,7 @@ extension GetNavigation on GetInterface { | ||
| 815 | Text( | 815 | Text( |
| 816 | message, | 816 | message, |
| 817 | style: TextStyle( | 817 | style: TextStyle( |
| 818 | - color: colorText ?? Colors.black, | 818 | + color: colorText ?? theme.iconTheme.color, |
| 819 | fontWeight: FontWeight.w300, | 819 | fontWeight: FontWeight.w300, |
| 820 | fontSize: 14, | 820 | fontSize: 14, |
| 821 | ), | 821 | ), |
| @@ -924,6 +924,8 @@ extension GetNavigation on GetInterface { | @@ -924,6 +924,8 @@ extension GetNavigation on GetInterface { | ||
| 924 | restart(Get.context as Element); | 924 | restart(Get.context as Element); |
| 925 | } | 925 | } |
| 926 | 926 | ||
| 927 | + void appUpdate() => getxController.update(); | ||
| 928 | + | ||
| 927 | void changeTheme(ThemeData theme) { | 929 | void changeTheme(ThemeData theme) { |
| 928 | getxController.setTheme(theme); | 930 | getxController.setTheme(theme); |
| 929 | } | 931 | } |
| @@ -23,16 +23,14 @@ typedef GetStateUpdate = void Function(); | @@ -23,16 +23,14 @@ typedef GetStateUpdate = void Function(); | ||
| 23 | /// Avoids the potential (but extremely unlikely) issue of having | 23 | /// Avoids the potential (but extremely unlikely) issue of having |
| 24 | /// the Widget in a dispose() state, and abstracts the | 24 | /// the Widget in a dispose() state, and abstracts the |
| 25 | /// API from the ugly fn((){}). | 25 | /// API from the ugly fn((){}). |
| 26 | -// TODO: check performance HIT for the extra method call. | ||
| 27 | mixin GetStateUpdaterMixin<T extends StatefulWidget> on State<T> { | 26 | mixin GetStateUpdaterMixin<T extends StatefulWidget> on State<T> { |
| 28 | // To avoid the creation of an anonym function to be GC later. | 27 | // To avoid the creation of an anonym function to be GC later. |
| 29 | // ignore: prefer_function_declarations_over_variables | 28 | // ignore: prefer_function_declarations_over_variables |
| 30 | - static final VoidCallback _stateCallback = () {}; | ||
| 31 | 29 | ||
| 32 | /// Experimental method to replace setState((){}); | 30 | /// Experimental method to replace setState((){}); |
| 33 | /// Used with GetStateUpdate. | 31 | /// Used with GetStateUpdate. |
| 34 | void getUpdate() { | 32 | void getUpdate() { |
| 35 | - if (mounted) setState(_stateCallback); | 33 | + if (mounted) setState(() {}); |
| 36 | } | 34 | } |
| 37 | } | 35 | } |
| 38 | 36 |
-
Please register or login to post a comment