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:
@@ -94,9 +94,9 @@ class ModulesLogic extends GetxController {
|
||||
|
||||
void _goToModule(Module module, int index) async {
|
||||
selectedIndex.value = index;
|
||||
await Future.delayed(Duration(milliseconds: 300));
|
||||
await Future.delayed(Duration(milliseconds: 100));
|
||||
selectedIndex.value = null;
|
||||
// saveModule(module);
|
||||
|
||||
await navigateToModule(module);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,9 +35,15 @@ class SplashLogic extends GetxController with GetTickerProviderStateMixin {
|
||||
duration: const Duration(milliseconds: 8000),
|
||||
);
|
||||
|
||||
scaleAnimation.value = Tween<double>(begin: 0.8, end: 1.2).animate(scaleController);
|
||||
scaleAnimation.value = Tween<double>(
|
||||
begin: 0.8,
|
||||
end: 1.2,
|
||||
).animate(scaleController);
|
||||
|
||||
rotationAnimation.value = Tween<double>(begin: 0.0, end: 1).animate(rotateController);
|
||||
rotationAnimation.value = Tween<double>(
|
||||
begin: 0.0,
|
||||
end: 1,
|
||||
).animate(rotateController);
|
||||
|
||||
rotateController.forward();
|
||||
rotateController.addStatusListener((status) {
|
||||
@@ -185,7 +191,9 @@ class SplashLogic extends GetxController with GetTickerProviderStateMixin {
|
||||
try {
|
||||
final info = await PackageInfo.fromPlatform();
|
||||
int version = info.version.versionNumber;
|
||||
var res = await _dio.get("https://rsibackend.rasadyar.com/app/rasadyar-app-info/");
|
||||
var res = await _dio.get(
|
||||
"https://rsibackend.rasadyar.com/app/rasadyar-app-info/",
|
||||
);
|
||||
|
||||
appInfoModel = AppInfoModel.fromJson(res.data);
|
||||
|
||||
@@ -244,7 +252,9 @@ class SplashLogic extends GetxController with GetTickerProviderStateMixin {
|
||||
Future<void> installApk() async {
|
||||
try {
|
||||
eLog(_updateFilePath.value);
|
||||
await platform.invokeMethod('apk_installer', {'appPath': _updateFilePath.value});
|
||||
await platform.invokeMethod('apk_installer', {
|
||||
'appPath': _updateFilePath.value,
|
||||
});
|
||||
} catch (e) {
|
||||
eLog(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user