TF-1074 Handle go to path /session

This commit is contained in:
dab246
2022-10-25 15:11:51 +07:00
committed by Dat H. Pham
parent 0ee990262f
commit 079bd404c2
12 changed files with 313 additions and 346 deletions
@@ -73,11 +73,7 @@ class ContactController extends BaseController {
@override
void onClose() {
textInputSearchController?.dispose();
textInputSearchController = null;
textInputSearchFocus?.dispose();
textInputSearchFocus = null;
_deBouncerTime.cancel();
_disposeWidget();
super.onClose();
}
@@ -167,16 +163,19 @@ class ContactController extends BaseController {
}
}
void _disposeWidget() {
textInputSearchFocus?.dispose();
textInputSearchFocus = null;
textInputSearchController?.dispose();
textInputSearchController = null;
_deBouncerTime.cancel();
}
void selectContact(BuildContext context, EmailAddress emailAddress) {
FocusScope.of(context).unfocus();
if (BuildUtils.isWeb) {
textInputSearchFocus?.dispose();
textInputSearchFocus = null;
textInputSearchController?.dispose();
textInputSearchController = null;
_deBouncerTime.cancel();
_disposeWidget();
onSelectedContactCallback?.call(emailAddress);
} else {
popBack(result: emailAddress);
@@ -188,12 +187,7 @@ class ContactController extends BaseController {
FocusScope.of(context).unfocus();
if (BuildUtils.isWeb) {
textInputSearchFocus?.dispose();
textInputSearchFocus = null;
textInputSearchController?.dispose();
textInputSearchController = null;
_deBouncerTime.cancel();
_disposeWidget();
onDismissContactView?.call();
} else {
popBack();