Back to webview oauth

This commit is contained in:
Yegor Vialov
2020-01-27 21:12:05 +00:00
parent 41e552dce5
commit cf6039b279
6 changed files with 37 additions and 65 deletions

View File

@ -239,6 +239,7 @@ class _MainPageState extends State<MainPage> with WidgetsBindingObserver, Ticker
_showOAuth();
} else {
_preventAppRefresh = false;
Navigator.of(context).pop();
}
});
}
@ -252,9 +253,7 @@ class _MainPageState extends State<MainPage> with WidgetsBindingObserver, Ticker
void _showOAuth() {
_preventAppRefresh = true;
Launcher.launchURLInCustomTab(
url: ConnectionManager().oauthUrl
);
Navigator.of(context).pushNamed("/auth", arguments: {"url": ConnectionManager().oauthUrl});
}
_setErrorState(HAError e) {
@ -436,20 +435,6 @@ class _MainPageState extends State<MainPage> with WidgetsBindingObserver, Ticker
},
),
Divider(),
new ListTile(
leading: Icon(Icons.build),
title: Text("TEST"),
onTap: () {
Navigator.of(context).pop();
final flutterWebviewPlugin = new FlutterWebviewPlugin();
flutterWebviewPlugin.onUrlChanged.listen((String url) {
Logger.d("[Webview] URL Changed: $url");
});
Logger.d("[Webview] Listener attached");
Navigator.of(context).pushNamed("/test");
},
),
Divider(),
new ListTile(
leading: Icon(Icons.help),
title: Text("Help"),