🐛 Bug fixes
This commit is contained in:
parent
cb7256af23
commit
8e04230388
@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
import 'package:goatagent/auth.dart';
|
import 'package:goatagent/auth.dart';
|
||||||
|
import 'package:goatagent/screens/about.dart';
|
||||||
import 'package:goatagent/widgets/name_card.dart';
|
import 'package:goatagent/widgets/name_card.dart';
|
||||||
|
|
||||||
class AccountScreen extends StatefulWidget {
|
class AccountScreen extends StatefulWidget {
|
||||||
@ -78,7 +79,9 @@ class _AccountScreenState extends State<AccountScreen> {
|
|||||||
child: InkWell(
|
child: InkWell(
|
||||||
splashColor: Colors.indigo.withAlpha(30),
|
splashColor: Colors.indigo.withAlpha(30),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
GoRouter.of(context).push("/about");
|
Navigator.push(context, MaterialPageRoute(
|
||||||
|
builder: (context) => const AboutScreen(),
|
||||||
|
));
|
||||||
},
|
},
|
||||||
child: const ListTile(
|
child: const ListTile(
|
||||||
leading: Icon(Icons.info_outline),
|
leading: Icon(Icons.info_outline),
|
||||||
|
@ -15,15 +15,18 @@ class ApplicationScreen extends StatelessWidget {
|
|||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 18),
|
padding: const EdgeInsets.symmetric(horizontal: 18),
|
||||||
child: AppBar(),
|
child: AppBar(),
|
||||||
)
|
)),
|
||||||
),
|
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: WebViewWidget(
|
child: Stack(
|
||||||
controller: WebViewController()
|
children: [
|
||||||
..setJavaScriptMode(JavaScriptMode.unrestricted)
|
WebViewWidget(
|
||||||
..setBackgroundColor(Colors.white)
|
controller: WebViewController()
|
||||||
..loadRequest(link)
|
..setJavaScriptMode(JavaScriptMode.unrestricted)
|
||||||
..clearCache(),
|
..setBackgroundColor(Colors.white)
|
||||||
|
..loadRequest(link)
|
||||||
|
..clearCache(),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -12,22 +12,24 @@ class AuthorizationScreen extends StatelessWidget {
|
|||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: const Text('Connect with Goatpass'),
|
title: const Text('Connect with Goatpass'),
|
||||||
),
|
),
|
||||||
body: WebViewWidget(
|
body: Stack(children: [
|
||||||
controller: WebViewController()
|
WebViewWidget(
|
||||||
..setJavaScriptMode(JavaScriptMode.unrestricted)
|
controller: WebViewController()
|
||||||
..setBackgroundColor(Colors.white)
|
..setJavaScriptMode(JavaScriptMode.unrestricted)
|
||||||
..setNavigationDelegate(NavigationDelegate(
|
..setBackgroundColor(Colors.white)
|
||||||
onNavigationRequest: (NavigationRequest request) {
|
..setNavigationDelegate(NavigationDelegate(
|
||||||
if (request.url.startsWith('goatagent://auth')) {
|
onNavigationRequest: (NavigationRequest request) {
|
||||||
Navigator.of(context).pop(request.url);
|
if (request.url.startsWith('goatagent://auth')) {
|
||||||
return NavigationDecision.prevent;
|
Navigator.of(context).pop(request.url);
|
||||||
}
|
return NavigationDecision.prevent;
|
||||||
return NavigationDecision.navigate;
|
}
|
||||||
},
|
return NavigationDecision.navigate;
|
||||||
))
|
},
|
||||||
..loadRequest(authorizationUrl)
|
))
|
||||||
..clearCache(),
|
..loadRequest(authorizationUrl)
|
||||||
),
|
..clearCache(),
|
||||||
|
),
|
||||||
|
]),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user