From ee66c5332028f795cf7596a79464d135a930daee Mon Sep 17 00:00:00 2001 From: Imran Remtulla Date: Tue, 20 Dec 2022 19:06:49 -0500 Subject: [PATCH] Updated plugins --- lib/pages/app.dart | 26 +++++++++++++++++++++----- pubspec.lock | 26 +++++++++++++------------- pubspec.yaml | 4 ++-- 3 files changed, 36 insertions(+), 20 deletions(-) diff --git a/lib/pages/app.dart b/lib/pages/app.dart index 0326a3a..0434964 100644 --- a/lib/pages/app.dart +++ b/lib/pages/app.dart @@ -46,11 +46,27 @@ class _AppPageState extends State { backgroundColor: Theme.of(context).colorScheme.surface, body: RefreshIndicator( child: settingsProvider.showAppWebpage - ? WebView( - backgroundColor: Theme.of(context).colorScheme.background, - initialUrl: app?.app.url, - javascriptMode: JavascriptMode.unrestricted, - ) + ? app != null + ? WebViewWidget( + controller: WebViewController() + ..setJavaScriptMode(JavaScriptMode.unrestricted) + ..setBackgroundColor( + Theme.of(context).colorScheme.background) + ..setJavaScriptMode(JavaScriptMode.unrestricted) + ..setNavigationDelegate( + NavigationDelegate( + onWebResourceError: (WebResourceError error) { + if (error.isForMainFrame == true) { + showError( + ObtainiumError(error.description, + unexpected: true), + context); + } + }, + ), + ) + ..loadRequest(Uri.parse(app.app.url))) + : Container() : CustomScrollView( slivers: [ SliverFillRemaining( diff --git a/pubspec.lock b/pubspec.lock index 2f7f87a..58556d1 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -182,7 +182,7 @@ packages: name: file_picker url: "https://pub.dartlang.org" source: hosted - version: "5.2.3" + version: "5.2.4" flutter: dependency: "direct main" description: flutter @@ -215,14 +215,14 @@ packages: name: flutter_local_notifications url: "https://pub.dartlang.org" source: hosted - version: "12.0.4" + version: "13.0.0" flutter_local_notifications_linux: dependency: transitive description: name: flutter_local_notifications_linux url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "3.0.0" flutter_local_notifications_platform_interface: dependency: transitive description: @@ -258,7 +258,7 @@ packages: name: fluttertoast url: "https://pub.dartlang.org" source: hosted - version: "8.1.1" + version: "8.1.2" html: dependency: "direct main" description: @@ -510,7 +510,7 @@ packages: name: provider url: "https://pub.dartlang.org" source: hosted - version: "6.0.4" + version: "6.0.5" share_plus: dependency: "direct main" description: @@ -552,7 +552,7 @@ packages: name: shared_preferences_linux url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.2" shared_preferences_macos: dependency: transitive description: @@ -580,7 +580,7 @@ packages: name: shared_preferences_windows url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.2" sky_engine: dependency: transitive description: flutter @@ -599,7 +599,7 @@ packages: name: sqflite url: "https://pub.dartlang.org" source: hosted - version: "2.2.1" + version: "2.2.2" sqflite_common: dependency: transitive description: @@ -739,35 +739,35 @@ packages: name: webview_flutter url: "https://pub.dartlang.org" source: hosted - version: "3.0.4" + version: "4.0.0" webview_flutter_android: dependency: transitive description: name: webview_flutter_android url: "https://pub.dartlang.org" source: hosted - version: "2.10.4" + version: "3.0.0" webview_flutter_platform_interface: dependency: transitive description: name: webview_flutter_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.9.5" + version: "2.0.0" webview_flutter_wkwebview: dependency: transitive description: name: webview_flutter_wkwebview url: "https://pub.dartlang.org" source: hosted - version: "2.9.5" + version: "3.0.0" win32: dependency: transitive description: name: win32 url: "https://pub.dartlang.org" source: hosted - version: "3.1.2" + version: "3.1.3" xdg_directories: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 8f2d7fc..38d8cc5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -38,10 +38,10 @@ dependencies: cupertino_icons: ^1.0.5 path_provider: ^2.0.11 flutter_fgbg: ^0.2.0 # Try removing reliance on this - flutter_local_notifications: ^12.0.0 + flutter_local_notifications: ^13.0.0 provider: ^6.0.3 http: ^0.13.5 - webview_flutter: ^3.0.4 + webview_flutter: ^4.0.0 dynamic_color: ^1.5.4 html: ^0.15.0 shared_preferences: ^2.0.15