diff --git a/lib/screens/account.dart b/lib/screens/account.dart index 9e46be9..7855340 100644 --- a/lib/screens/account.dart +++ b/lib/screens/account.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; import 'package:goatagent/auth.dart'; +import 'package:goatagent/screens/about.dart'; import 'package:goatagent/widgets/name_card.dart'; class AccountScreen extends StatefulWidget { @@ -78,7 +79,9 @@ class _AccountScreenState extends State { child: InkWell( splashColor: Colors.indigo.withAlpha(30), onTap: () { - GoRouter.of(context).push("/about"); + Navigator.push(context, MaterialPageRoute( + builder: (context) => const AboutScreen(), + )); }, child: const ListTile( leading: Icon(Icons.info_outline), diff --git a/lib/screens/application.dart b/lib/screens/application.dart index f207360..e930d83 100644 --- a/lib/screens/application.dart +++ b/lib/screens/application.dart @@ -15,15 +15,18 @@ class ApplicationScreen extends StatelessWidget { child: Padding( padding: const EdgeInsets.symmetric(horizontal: 18), child: AppBar(), - ) - ), + )), body: SafeArea( - child: WebViewWidget( - controller: WebViewController() - ..setJavaScriptMode(JavaScriptMode.unrestricted) - ..setBackgroundColor(Colors.white) - ..loadRequest(link) - ..clearCache(), + child: Stack( + children: [ + WebViewWidget( + controller: WebViewController() + ..setJavaScriptMode(JavaScriptMode.unrestricted) + ..setBackgroundColor(Colors.white) + ..loadRequest(link) + ..clearCache(), + ), + ], ), ), ); diff --git a/lib/screens/auth.dart b/lib/screens/auth.dart index 3c1980d..b08b940 100644 --- a/lib/screens/auth.dart +++ b/lib/screens/auth.dart @@ -12,22 +12,24 @@ class AuthorizationScreen extends StatelessWidget { appBar: AppBar( title: const Text('Connect with Goatpass'), ), - body: WebViewWidget( - controller: WebViewController() - ..setJavaScriptMode(JavaScriptMode.unrestricted) - ..setBackgroundColor(Colors.white) - ..setNavigationDelegate(NavigationDelegate( - onNavigationRequest: (NavigationRequest request) { - if (request.url.startsWith('goatagent://auth')) { - Navigator.of(context).pop(request.url); - return NavigationDecision.prevent; - } - return NavigationDecision.navigate; - }, - )) - ..loadRequest(authorizationUrl) - ..clearCache(), - ), + body: Stack(children: [ + WebViewWidget( + controller: WebViewController() + ..setJavaScriptMode(JavaScriptMode.unrestricted) + ..setBackgroundColor(Colors.white) + ..setNavigationDelegate(NavigationDelegate( + onNavigationRequest: (NavigationRequest request) { + if (request.url.startsWith('goatagent://auth')) { + Navigator.of(context).pop(request.url); + return NavigationDecision.prevent; + } + return NavigationDecision.navigate; + }, + )) + ..loadRequest(authorizationUrl) + ..clearCache(), + ), + ]), ); } }