Committed by
GitHub
Merge pull request #1893 from MHosssam/patch-1
change updateLocale to future
Showing
1 changed file
with
4 additions
and
4 deletions
@@ -1055,9 +1055,9 @@ you can only use widgets and widget functions here'''; | @@ -1055,9 +1055,9 @@ you can only use widgets and widget functions here'''; | ||
1055 | } | 1055 | } |
1056 | } | 1056 | } |
1057 | 1057 | ||
1058 | - void updateLocale(Locale l) { | 1058 | + Future<void> updateLocale(Locale l) async { |
1059 | Get.locale = l; | 1059 | Get.locale = l; |
1060 | - forceAppUpdate(); | 1060 | + await forceAppUpdate(); |
1061 | } | 1061 | } |
1062 | 1062 | ||
1063 | /// As a rule, Flutter knows which widget to update, | 1063 | /// As a rule, Flutter knows which widget to update, |
@@ -1073,8 +1073,8 @@ you can only use widgets and widget functions here'''; | @@ -1073,8 +1073,8 @@ you can only use widgets and widget functions here'''; | ||
1073 | /// reconstruct the application from the sketch, use this with caution. | 1073 | /// reconstruct the application from the sketch, use this with caution. |
1074 | /// Your entire application will be rebuilt, and touch events will not | 1074 | /// Your entire application will be rebuilt, and touch events will not |
1075 | /// work until the end of rendering. | 1075 | /// work until the end of rendering. |
1076 | - void forceAppUpdate() { | ||
1077 | - engine!.performReassemble(); | 1076 | + Future<void> forceAppUpdate() async { |
1077 | + await engine!.performReassemble(); | ||
1078 | } | 1078 | } |
1079 | 1079 | ||
1080 | void appUpdate() => _getxController.update(); | 1080 | void appUpdate() => _getxController.update(); |
-
Please register or login to post a comment