fix : memory leak animation
This commit is contained in:
@@ -102,9 +102,9 @@ class ModulesLogic extends GetxController {
|
||||
isLoading.value = !isLoading.value;
|
||||
}
|
||||
|
||||
await Get.toNamed(target.key, arguments: module);
|
||||
var args = await Get.toNamed(target.key, arguments: module);
|
||||
|
||||
if (target.value?[1] != null) {
|
||||
if (target.value?[1] != null && args == -1) {
|
||||
await target.value?[1]?.call();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_chicken/chicken.dart';
|
||||
import 'package:rasadyar_chicken/data/common/dio_error_handler.dart';
|
||||
import 'package:rasadyar_chicken/data/di/chicken_di.dart';
|
||||
import 'package:rasadyar_chicken/data/models/request/login_request/login_request_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/user_info/user_info_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/user_profile_model/user_profile_model.dart';
|
||||
import 'package:rasadyar_chicken/data/repositories/auth/auth_repository.dart';
|
||||
@@ -72,6 +71,7 @@ class AuthLogic extends GetxController with GetTickerProviderStateMixin {
|
||||
|
||||
@override
|
||||
void onClose() {
|
||||
_textAnimationController.dispose();
|
||||
_timer?.cancel();
|
||||
super.onClose();
|
||||
}
|
||||
@@ -105,7 +105,6 @@ class AuthLogic extends GetxController with GetTickerProviderStateMixin {
|
||||
return isCaptchaValid && isFormValid;
|
||||
}
|
||||
|
||||
|
||||
Future<void> submitLoginForm() async {
|
||||
if (!_isFormValid()) return;
|
||||
AuthRepository authTmp = diChicken.get<AuthRepository>();
|
||||
|
||||
@@ -10,9 +10,13 @@ class AuthPage extends GetView<AuthLogic> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
iLog("AuthPage");
|
||||
return Scaffold(
|
||||
body: Stack(
|
||||
body: PopScope(
|
||||
canPop: false,
|
||||
onPopInvokedWithResult: (didPop, result) {
|
||||
Get.back(result: -1);
|
||||
},
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
fit: StackFit.expand,
|
||||
|
||||
@@ -100,6 +104,7 @@ class AuthPage extends GetView<AuthLogic> {
|
||||
}),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user