From 81ae064db7499b52b778e9ee51650771fb565d6e Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Sun, 16 Feb 2020 08:35:35 +0100 Subject: [PATCH] Enhanced auth web UX --- lib/views/auth_web_view.dart | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/lib/views/auth_web_view.dart b/lib/views/auth_web_view.dart index 34ce4b1..45c5fa7 100644 --- a/lib/views/auth_web_view.dart +++ b/lib/views/auth_web_view.dart @@ -18,25 +18,24 @@ class AuthWebView extends StatelessWidget { appBar: AppBar( title: Text(I18n.of(context).authentication), leading: IconButton( - icon: Icon(Icons.arrow_back), + icon: Icon(Icons.close), onPressed: () { Navigator.of(context).pop(); - Navigator.of(context).pop(); + onAuthDone(); }, ), - actions: [ - IconButton( - icon: Icon(Icons.check), - onPressed: () { - Navigator.of(context).pop(); - onAuthDone(); - }, - ) - ], ), - body: WebView( - initialUrl: url, - javascriptMode: JavascriptMode.unrestricted, + body: Column( + children: [ + LinearProgressIndicator(), + Expanded( + child: WebView( + initialUrl: url, + javascriptMode: JavascriptMode.unrestricted, + onPageStarted: (s) => print("onPageStarted: " + s), + ), + ), + ], ), ); }