All done. Need fix logout.

This commit is contained in:
Ivan Murashov
2018-03-11 12:28:13 +03:00
parent c229ea8c9e
commit 47b45eecbf
12 changed files with 78 additions and 92 deletions

View File

@@ -34,7 +34,13 @@ class RegistrationScreenState extends BaseState<FinishRegistrationScreen> {
});
});
}
return getMainWidget();
return new WillPopScope(onWillPop: () => onWillPop(), child: getMainWidget());
}
onWillPop() {
if (Theme.of(context).platform != TargetPlatform.iOS) {
platform.invokeMethod('finish');
}
}
@override String getTitle() {
@@ -62,7 +68,9 @@ class RegistrationScreenState extends BaseState<FinishRegistrationScreen> {
handleTap() {
print('tokenActive: $_tokenActive');
if (_tokenActive) {
Navigator.of(context).pop(true);
helper.getToken().then((token) {
Navigator.of(context).pop(token);
});
} else {
platform.invokeMethod('isOnline').then((isOnline) {
if (isOnline ) {