diff --git a/.idea/libraries/Dart_Packages.xml b/.idea/libraries/Dart_Packages.xml
new file mode 100644
index 00000000..fbbebaa1
--- /dev/null
+++ b/.idea/libraries/Dart_Packages.xml
@@ -0,0 +1,738 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Flutter_Plugins.xml b/.idea/libraries/Flutter_Plugins.xml
index 65bb3679..31799730 100755
--- a/.idea/libraries/Flutter_Plugins.xml
+++ b/.idea/libraries/Flutter_Plugins.xml
@@ -1,8 +1,6 @@
-
-
-
+
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f6cf4a65..7201ab75 100755
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,4 @@
-## 5.0.5-nullsafety.1
+## 5.0.5
- Updated Android `WebChromeClient.getDefaultVideoPoster`
- Removed all the dependencies: `uuid`, `device_info`, `intl`, and `mime`
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java b/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java
index 82dff731..dc296801 100755
--- a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java
+++ b/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java
@@ -1,21 +1,12 @@
package com.pichillilorenzo.flutter_inappwebview;
-import android.annotation.TargetApi;
-import android.content.Context;
-import android.os.AsyncTask;
import android.os.Build;
-import android.os.Handler;
-import android.os.Looper;
-import android.os.Message;
-import android.util.Log;
import android.webkit.CookieManager;
import android.webkit.CookieSyncManager;
import android.webkit.ValueCallback;
import androidx.annotation.Nullable;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
@@ -24,12 +15,10 @@ import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.TimeZone;
-import java.util.concurrent.Executors;
import io.flutter.plugin.common.BinaryMessenger;
import io.flutter.plugin.common.MethodCall;
import io.flutter.plugin.common.MethodChannel;
-import io.flutter.plugin.common.PluginRegistry;
public class MyCookieManager implements MethodChannel.MethodCallHandler {
@@ -38,9 +27,6 @@ public class MyCookieManager implements MethodChannel.MethodCallHandler {
public static MethodChannel channel;
public static CookieManager cookieManager;
- // As CookieManager was synchronous before API 21 this class emulates the async behavior on <21.
- private static final boolean USES_LEGACY_STORE = Build.VERSION.SDK_INT < 21;
-
public MyCookieManager(BinaryMessenger messenger) {
channel = new MethodChannel(messenger, "com.pichillilorenzo/flutter_inappwebview_cookiemanager");
channel.setMethodCallHandler(this);
diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies
index 6f8c6f03..e0b8fe1f 100644
--- a/example/.flutter-plugins-dependencies
+++ b/example/.flutter-plugins-dependencies
@@ -1 +1 @@
-{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_downloader","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_downloader-1.5.2/","dependencies":[]},{"name":"flutter_inappwebview","path":"/Users/lorenzopichilli/Desktop/flutter_inappwebview/","dependencies":[]},{"name":"integration_test","path":"/Users/lorenzopichilli/flutter/packages/integration_test/","dependencies":[]},{"name":"path_provider","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-2.0.0-nullsafety/","dependencies":[]},{"name":"permission_handler","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/permission_handler-5.1.0+2/","dependencies":[]},{"name":"url_launcher","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-6.0.0-nullsafety.6/","dependencies":[]}],"android":[{"name":"flutter_downloader","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_downloader-1.5.2/","dependencies":[]},{"name":"flutter_inappwebview","path":"/Users/lorenzopichilli/Desktop/flutter_inappwebview/","dependencies":[]},{"name":"integration_test","path":"/Users/lorenzopichilli/flutter/packages/integration_test/","dependencies":[]},{"name":"path_provider","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-2.0.0-nullsafety/","dependencies":[]},{"name":"permission_handler","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/permission_handler-5.1.0+2/","dependencies":[]},{"name":"url_launcher","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-6.0.0-nullsafety.6/","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.5-nullsafety/","dependencies":[]},{"name":"url_launcher_macos","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_macos-0.1.0-nullsafety.2/","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-0.2.0-nullsafety/","dependencies":[]},{"name":"url_launcher_linux","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_linux-0.1.0-nullsafety.3/","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-0.1.0-nullsafety.3/","dependencies":[]},{"name":"url_launcher_windows","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_windows-0.1.0-nullsafety.2/","dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"flutter_downloader","dependencies":[]},{"name":"flutter_inappwebview","dependencies":[]},{"name":"integration_test","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux","path_provider_windows"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"permission_handler","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_linux","url_launcher_macos","url_launcher_windows"]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]}],"date_created":"2021-03-01 03:17:40.431874","version":"1.27.0-4.0.pre"}
\ No newline at end of file
+{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_downloader","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_downloader-1.5.2/","dependencies":[]},{"name":"flutter_inappwebview","path":"/Users/lorenzopichilli/Desktop/flutter_inappwebview/","dependencies":[]},{"name":"integration_test","path":"/Users/lorenzopichilli/flutter/packages/integration_test/","dependencies":[]},{"name":"path_provider","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-2.0.0-nullsafety/","dependencies":[]},{"name":"permission_handler","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/permission_handler-5.1.0+2/","dependencies":[]},{"name":"url_launcher","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-6.0.0-nullsafety.6/","dependencies":[]}],"android":[{"name":"flutter_downloader","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_downloader-1.5.2/","dependencies":[]},{"name":"flutter_inappwebview","path":"/Users/lorenzopichilli/Desktop/flutter_inappwebview/","dependencies":[]},{"name":"integration_test","path":"/Users/lorenzopichilli/flutter/packages/integration_test/","dependencies":[]},{"name":"path_provider","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-2.0.0-nullsafety/","dependencies":[]},{"name":"permission_handler","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/permission_handler-5.1.0+2/","dependencies":[]},{"name":"url_launcher","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-6.0.0-nullsafety.6/","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.5-nullsafety/","dependencies":[]},{"name":"url_launcher_macos","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_macos-0.1.0-nullsafety.2/","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-0.2.0-nullsafety/","dependencies":[]},{"name":"url_launcher_linux","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_linux-0.1.0-nullsafety.3/","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-0.1.0-nullsafety.3/","dependencies":[]},{"name":"url_launcher_windows","path":"/Users/lorenzopichilli/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_windows-0.1.0-nullsafety.2/","dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"flutter_downloader","dependencies":[]},{"name":"flutter_inappwebview","dependencies":[]},{"name":"integration_test","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux","path_provider_windows"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"permission_handler","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_linux","url_launcher_macos","url_launcher_windows"]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]}],"date_created":"2021-03-01 16:27:58.177175","version":"1.27.0-4.0.pre"}
\ No newline at end of file
diff --git a/example/ios/Flutter/Flutter.podspec b/example/ios/Flutter/Flutter.podspec
deleted file mode 100644
index 2c4421cf..00000000
--- a/example/ios/Flutter/Flutter.podspec
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# NOTE: This podspec is NOT to be published. It is only used as a local source!
-# This is a generated file; do not edit or check into version control.
-#
-
-Pod::Spec.new do |s|
- s.name = 'Flutter'
- s.version = '1.0.0'
- s.summary = 'High-performance, high-fidelity mobile apps.'
- s.homepage = 'https://flutter.io'
- s.license = { :type => 'MIT' }
- s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' }
- s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s }
- s.ios.deployment_target = '8.0'
- # Framework linking is handled by Flutter tooling, not CocoaPods.
- # Add a placeholder to satisfy `s.dependency 'Flutter'` plugin podspecs.
- s.vendored_frameworks = 'path/to/nothing'
-end
diff --git a/example/ios/Flutter/flutter_export_environment.sh b/example/ios/Flutter/flutter_export_environment.sh
index ff2151af..d22068ce 100755
--- a/example/ios/Flutter/flutter_export_environment.sh
+++ b/example/ios/Flutter/flutter_export_environment.sh
@@ -2,13 +2,12 @@
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=/Users/lorenzopichilli/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/lorenzopichilli/Desktop/flutter_inappwebview/example"
-export "FLUTTER_TARGET=/Users/lorenzopichilli/Desktop/flutter_inappwebview/example/lib/main.dart"
+export "FLUTTER_TARGET=lib/main.dart"
export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build/ios"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
-export "DART_DEFINES=Zmx1dHRlci5pbnNwZWN0b3Iuc3RydWN0dXJlZEVycm9ycz10cnVl,RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ=="
export "DART_OBFUSCATION=false"
-export "TRACK_WIDGET_CREATION=true"
+export "TRACK_WIDGET_CREATION=false"
export "TREE_SHAKE_ICONS=false"
-export "PACKAGE_CONFIG=/Users/lorenzopichilli/Desktop/flutter_inappwebview/example/.dart_tool/package_config.json"
+export "PACKAGE_CONFIG=.packages"
diff --git a/flutter_inappwebview.iml b/flutter_inappwebview.iml
index 0adae5aa..4cb39159 100755
--- a/flutter_inappwebview.iml
+++ b/flutter_inappwebview.iml
@@ -80,5 +80,6 @@
+
\ No newline at end of file
diff --git a/lib/src/cookie_manager.dart b/lib/src/cookie_manager.dart
index db3fc006..0b46ce77 100755
--- a/lib/src/cookie_manager.dart
+++ b/lib/src/cookie_manager.dart
@@ -408,7 +408,11 @@ class CookieManager {
Future _getCookieExpirationDate(int expiresDate) async {
var platformUtil = PlatformUtil();
var dateTime = DateTime.fromMillisecondsSinceEpoch(expiresDate).toUtc();
- return await platformUtil.formatDate(date: dateTime, format: 'EEE, dd MMM yyyy hh:mm:ss z', locale: 'en_US', timezone: 'GMT');
+ return await platformUtil.formatDate(
+ date: dateTime,
+ format: 'EEE, dd MMM yyyy hh:mm:ss z',
+ locale: 'en_US',
+ timezone: 'GMT');
}
}
diff --git a/lib/src/mime_type_resolver.dart b/lib/src/mime_type_resolver.dart
index d28cc0e6..00732168 100644
--- a/lib/src/mime_type_resolver.dart
+++ b/lib/src/mime_type_resolver.dart
@@ -1,5 +1,4 @@
class MimeTypeResolver {
-
/*
Extension map generated from http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/conf/mime.types?view=markup
using this JavaScript code:
@@ -21,7 +20,7 @@ class MimeTypeResolver {
}
console.log(JSON.stringify(extensionMap, null, '\t'));
*/
- static final Map extensionMap = {
+ static final Map extensionMap = {
"123": "application/vnd.lotus-1-2-3",
"ez": "application/andrew-inset",
"aw": "application/applixware",
@@ -448,14 +447,21 @@ class MimeTypeResolver {
"xo": "application/vnd.olpc-sugar",
"dd2": "application/vnd.oma.dd2+xml",
"oxt": "application/vnd.openofficeorg.extension",
- "pptx": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
- "sldx": "application/vnd.openxmlformats-officedocument.presentationml.slide",
- "ppsx": "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
- "potx": "application/vnd.openxmlformats-officedocument.presentationml.template",
+ "pptx":
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation",
+ "sldx":
+ "application/vnd.openxmlformats-officedocument.presentationml.slide",
+ "ppsx":
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
+ "potx":
+ "application/vnd.openxmlformats-officedocument.presentationml.template",
"xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
- "xltx": "application/vnd.openxmlformats-officedocument.spreadsheetml.template",
- "docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
- "dotx": "application/vnd.openxmlformats-officedocument.wordprocessingml.template",
+ "xltx":
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.template",
+ "docx":
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
+ "dotx":
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.template",
"mgp": "application/vnd.osgeo.mapguide.package",
"dp": "application/vnd.osgi.dp",
"esa": "application/vnd.osgi.subsystem",
@@ -1019,4 +1025,4 @@ class MimeTypeResolver {
if (index < 0 || index + 1 >= path.length) return path;
return path.substring(index + 1).toLowerCase();
}
-}
\ No newline at end of file
+}
diff --git a/lib/src/platform_util.dart b/lib/src/platform_util.dart
index d79007f9..5b24ef49 100644
--- a/lib/src/platform_util.dart
+++ b/lib/src/platform_util.dart
@@ -23,11 +23,16 @@ class PlatformUtil {
return _cachedSystemVersion!;
}
Map args = {};
- _cachedSystemVersion = await _channel.invokeMethod('getSystemVersion', args);
+ _cachedSystemVersion =
+ await _channel.invokeMethod('getSystemVersion', args);
return _cachedSystemVersion!;
}
- Future formatDate({required DateTime date, required String format, String locale = "en_US", String timezone = "UTC"}) async {
+ Future formatDate(
+ {required DateTime date,
+ required String format,
+ String locale = "en_US",
+ String timezone = "UTC"}) async {
Map args = {};
args.putIfAbsent('date', () => date.millisecondsSinceEpoch);
args.putIfAbsent('format', () => format);
diff --git a/lib/src/types.dart b/lib/src/types.dart
index 5f186fc4..871115cc 100755
--- a/lib/src/types.dart
+++ b/lib/src/types.dart
@@ -6161,14 +6161,13 @@ class IOSURLResponse {
return null;
}
return IOSURLResponse(
- url: map["url"] != null ? Uri.parse(map["url"]) : null,
- expectedContentLength: map["expectedContentLength"],
- mimeType: map["mimeType"],
- suggestedFilename: map["suggestedFilename"],
- textEncodingName: map["textEncodingName"],
- headers: map["headers"]?.cast(),
- statusCode: map["statusCode"]
- );
+ url: map["url"] != null ? Uri.parse(map["url"]) : null,
+ expectedContentLength: map["expectedContentLength"],
+ mimeType: map["mimeType"],
+ suggestedFilename: map["suggestedFilename"],
+ textEncodingName: map["textEncodingName"],
+ headers: map["headers"]?.cast(),
+ statusCode: map["statusCode"]);
}
Map toMap() {
diff --git a/pubspec.yaml b/pubspec.yaml
index 8ca5d6cf..33da45ca 100755
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,6 +1,6 @@
name: flutter_inappwebview
description: A Flutter plugin that allows you to add an inline webview, to use an headless webview, and to open an in-app browser window.
-version: 5.0.5-nullsafety.1
+version: 5.0.5
homepage: https://github.com/pichillilorenzo/flutter_inappwebview
environment: