diff --git a/lib/page/screen/qr_webview_screen.dart b/lib/page/screen/qr_webview_screen.dart index 43599bf..5b53858 100644 --- a/lib/page/screen/qr_webview_screen.dart +++ b/lib/page/screen/qr_webview_screen.dart @@ -1,9 +1,14 @@ import 'package:flutter/material.dart'; import 'package:qr_code_scanner/qr_code_scanner.dart'; +import 'package:selftrackingapp/main.dart'; +import 'package:selftrackingapp/page/screen/privacy_policy_screen.dart'; +import 'package:selftrackingapp/page/screen/root_screen.dart'; +import 'package:selftrackingapp/page/screen/welcome_screen.dart'; import 'package:url_launcher/url_launcher.dart'; import 'package:webview_flutter/webview_flutter.dart'; import '../../app_localizations.dart'; +import 'qr_scan_screen.dart'; class QrWebviewScreen extends StatefulWidget { final String url; @@ -26,6 +31,12 @@ class _QrWebviewScreenState extends State { return Scaffold( appBar: AppBar( backgroundColor: Colors.white, + leading: IconButton( + icon: Icon(Icons.arrow_back), + onPressed: () { + Navigator.of(context) + .push(MaterialPageRoute(builder: (_) => HomeScreen())); + }), iconTheme: IconThemeData(color: Colors.black), title: Text( AppLocalizations.of(context).translate("qr_title"), @@ -34,14 +45,14 @@ class _QrWebviewScreenState extends State { ), body: WebView( initialUrl: widget.url, - navigationDelegate: (NavigationRequest request) async { - if (await canLaunch(request.url)) { - await launch(request.url); - } else { - print("Cannot launch url"); - } - return NavigationDecision.prevent; - }, + // navigationDelegate: (NavigationRequest request) async { + // if (await canLaunch(request.url)) { + // await launch(request.url); + // } else { + // print("Cannot launch url"); + // } + // return NavigationDecision.prevent; + // }, javascriptMode: JavascriptMode.unrestricted, )); } diff --git a/lib/page/screen/root_screen.dart b/lib/page/screen/root_screen.dart index f498410..ca58fa9 100644 --- a/lib/page/screen/root_screen.dart +++ b/lib/page/screen/root_screen.dart @@ -177,6 +177,7 @@ class _RootScreenState extends State { fontSize: 20.0, ), ), + automaticallyImplyLeading: false, ), body: MultiProvider( providers: [ diff --git a/lib/page/screen/welcome_screen.dart b/lib/page/screen/welcome_screen.dart index 1556d61..970f200 100644 --- a/lib/page/screen/welcome_screen.dart +++ b/lib/page/screen/welcome_screen.dart @@ -327,7 +327,7 @@ class _WelcomeScreenState extends State { BorderRadius.all(Radius.circular(20.0))), onPressed: () { Navigator.of(context).pop(); - Navigator.pushReplacement( + Navigator.push( context, MaterialPageRoute( builder: (context) => RootScreen())); diff --git a/pubspec.yaml b/pubspec.yaml index 07e97d7..76845bf 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,7 +11,7 @@ description: Self tracking app # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.17.1+38 +version: 1.17.2+39 environment: sdk: ">=2.1.0 <3.0.0"