refactor: optimize module navigation delay and clean up unused code in splash and auth logic

fix : role access to chicken app
This commit is contained in:
2025-12-29 11:21:54 +03:30
parent 12cdc1a5e8
commit 57704399b9
12 changed files with 111 additions and 1942 deletions

View File

@@ -65,6 +65,17 @@ class GService extends GetxService {
return getTargetPage(module)?.route;
}
Future<void> clearRoute(Module module) async {
AppModel model = box.values.first;
TargetPage? targetPage = model.targetPages?.firstWhereOrNull(
(element) => element.module == module,
);
if (targetPage != null) {
targetPage.route = null;
model.save();
}
}
Future<void> saveRole(Module module, String role) async {
AppModel model = box.values.first;
TargetPage? targetPage = model.targetPages?.firstWhere(