diff --git a/android/.idea/.name b/android/.idea/.name
deleted file mode 100755
index 198f3c84..00000000
--- a/android/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-flutter_inappbrowser
\ No newline at end of file
diff --git a/android/.idea/caches/build_file_checksums.ser b/android/.idea/caches/build_file_checksums.ser
deleted file mode 100755
index 118c2ce5..00000000
Binary files a/android/.idea/caches/build_file_checksums.ser and /dev/null differ
diff --git a/android/.idea/caches/gradle_models.ser b/android/.idea/caches/gradle_models.ser
deleted file mode 100755
index 23c9acaa..00000000
Binary files a/android/.idea/caches/gradle_models.ser and /dev/null differ
diff --git a/android/.idea/codeStyles/Project.xml b/android/.idea/codeStyles/Project.xml
deleted file mode 100755
index 30aa626c..00000000
--- a/android/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/.idea/gradle.xml b/android/.idea/gradle.xml
deleted file mode 100755
index 2996d531..00000000
--- a/android/.idea/gradle.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/.idea/misc.xml b/android/.idea/misc.xml
deleted file mode 100755
index af0bbdde..00000000
--- a/android/.idea/misc.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/.idea/modules.xml b/android/.idea/modules.xml
deleted file mode 100755
index f33b6a32..00000000
--- a/android/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/.idea/runConfigurations.xml b/android/.idea/runConfigurations.xml
deleted file mode 100755
index 7f68460d..00000000
--- a/android/.idea/runConfigurations.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/.idea/vcs.xml b/android/.idea/vcs.xml
deleted file mode 100755
index 6c0b8635..00000000
--- a/android/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/example/integration_test/chrome_safari_browser/custom_tabs.dart b/example/integration_test/chrome_safari_browser/custom_tabs.dart
index d62bdd88..104914cb 100644
--- a/example/integration_test/chrome_safari_browser/custom_tabs.dart
+++ b/example/integration_test/chrome_safari_browser/custom_tabs.dart
@@ -214,12 +214,12 @@ void customTabs() {
});
skippableTest('getMaxToolbarItems', () async {
- expect(await ChromeSafariBrowser.getMaxToolbarItems(),
+ expect(await PlatformChromeSafariBrowser.getMaxToolbarItems(),
greaterThanOrEqualTo(0));
});
skippableTest('getPackageName', () async {
- expect(await ChromeSafariBrowser.getPackageName(), isNotNull);
+ expect(await PlatformChromeSafariBrowser.getPackageName(), isNotNull);
});
}, skip: shouldSkip);
}
diff --git a/example/integration_test/chrome_safari_browser/sf_safari_view_controller.dart b/example/integration_test/chrome_safari_browser/sf_safari_view_controller.dart
index c4579d67..1dd11bfe 100644
--- a/example/integration_test/chrome_safari_browser/sf_safari_view_controller.dart
+++ b/example/integration_test/chrome_safari_browser/sf_safari_view_controller.dart
@@ -32,10 +32,10 @@ void sfSafariViewController() {
skippableTest('create and invalidate Prewarming Token', () async {
final prewarmingToken =
- await ChromeSafariBrowser.prewarmConnections([TEST_URL_1]);
+ await PlatformChromeSafariBrowser.prewarmConnections([TEST_URL_1]);
expect(prewarmingToken, isNotNull);
await expectLater(
- ChromeSafariBrowser.invalidatePrewarmingToken(prewarmingToken!),
+ PlatformChromeSafariBrowser.invalidatePrewarmingToken(prewarmingToken!),
completes);
});
}, skip: shouldSkip);
diff --git a/example/integration_test/process_global_config/apply.dart b/example/integration_test/process_global_config/apply.dart
index 285809cd..df32f723 100644
--- a/example/integration_test/process_global_config/apply.dart
+++ b/example/integration_test/process_global_config/apply.dart
@@ -9,7 +9,7 @@ void apply() {
skippableTestWidgets('apply', (WidgetTester tester) async {
await expectLater(
- ProcessGlobalConfig.instance().apply(
+ PlatformProcessGlobalConfig.instance().apply(
settings: ProcessGlobalConfigSettings(
dataDirectorySuffix:
(await WebViewFeature.isStartupFeatureSupported(
diff --git a/example/integration_test/proxy_controller/clear_and_set_proxy_override.dart b/example/integration_test/proxy_controller/clear_and_set_proxy_override.dart
index 349902e6..99601b05 100644
--- a/example/integration_test/proxy_controller/clear_and_set_proxy_override.dart
+++ b/example/integration_test/proxy_controller/clear_and_set_proxy_override.dart
@@ -17,7 +17,7 @@ void clearAndSetProxyOverride() {
await WebViewFeature.isFeatureSupported(WebViewFeature.PROXY_OVERRIDE);
if (proxyAvailable) {
- ProxyController proxyController = ProxyController.instance();
+ PlatformProxyController proxyController = PlatformProxyController.instance();
await proxyController.clearProxyOverride();
await proxyController.setProxyOverride(
diff --git a/example/integration_test/service_worker_controller/set_service_worker_client.dart b/example/integration_test/service_worker_controller/set_service_worker_client.dart
index 30b8b4e4..1c3baef1 100644
--- a/example/integration_test/service_worker_controller/set_service_worker_client.dart
+++ b/example/integration_test/service_worker_controller/set_service_worker_client.dart
@@ -17,8 +17,8 @@ void setServiceWorkerClient() {
WebViewFeature.SERVICE_WORKER_SHOULD_INTERCEPT_REQUEST);
if (swAvailable && swInterceptAvailable) {
- ServiceWorkerController serviceWorkerController =
- ServiceWorkerController.instance();
+ PlatformServiceWorkerController serviceWorkerController =
+ PlatformServiceWorkerController.instance();
await serviceWorkerController.setServiceWorkerClient(null);
}
diff --git a/example/integration_test/service_worker_controller/should_intercept_request.dart b/example/integration_test/service_worker_controller/should_intercept_request.dart
index 319f6e96..a7ff2df1 100644
--- a/example/integration_test/service_worker_controller/should_intercept_request.dart
+++ b/example/integration_test/service_worker_controller/should_intercept_request.dart
@@ -16,8 +16,8 @@ void shouldInterceptRequest() {
WebViewFeature.SERVICE_WORKER_SHOULD_INTERCEPT_REQUEST);
if (swAvailable && swInterceptAvailable) {
- ServiceWorkerController serviceWorkerController =
- ServiceWorkerController.instance();
+ PlatformServiceWorkerController serviceWorkerController =
+ PlatformServiceWorkerController.instance();
await serviceWorkerController.setServiceWorkerClient(ServiceWorkerClient(
shouldInterceptRequest: (request) async {
diff --git a/example/integration_test/util.dart b/example/integration_test/util.dart
index 031873ad..a6305352 100644
--- a/example/integration_test/util.dart
+++ b/example/integration_test/util.dart
@@ -111,7 +111,7 @@ class MyInAppBrowser extends InAppBrowser {
}
}
-class MyChromeSafariBrowser extends ChromeSafariBrowser {
+class MyChromeSafariBrowser extends PlatformChromeSafariBrowser {
final Completer serviceConnected = Completer();
final Completer opened = Completer();
final Completer firstPageLoaded = Completer();
diff --git a/example/integration_test/webview_flutter_test.dart b/example/integration_test/webview_flutter_test.dart
index cc7e6d0e..00612ccd 100644
--- a/example/integration_test/webview_flutter_test.dart
+++ b/example/integration_test/webview_flutter_test.dart
@@ -22,8 +22,8 @@ void main() {
WebView.debugLoggingSettings.maxLogMessageLength = 7000;
InAppBrowser.debugLoggingSettings.usePrint = true;
InAppBrowser.debugLoggingSettings.maxLogMessageLength = 7000;
- ChromeSafariBrowser.debugLoggingSettings.usePrint = true;
- ChromeSafariBrowser.debugLoggingSettings.maxLogMessageLength = 7000;
+ PlatformChromeSafariBrowser.debugLoggingSettings.usePrint = true;
+ PlatformChromeSafariBrowser.debugLoggingSettings.maxLogMessageLength = 7000;
WebAuthenticationSession.debugLoggingSettings.usePrint = true;
WebAuthenticationSession.debugLoggingSettings.maxLogMessageLength = 7000;
PullToRefreshController.debugLoggingSettings.usePrint = true;
diff --git a/example/lib/chrome_safari_browser_example.screen.dart b/example/lib/chrome_safari_browser_example.screen.dart
index 99995909..dfa8ca7c 100755
--- a/example/lib/chrome_safari_browser_example.screen.dart
+++ b/example/lib/chrome_safari_browser_example.screen.dart
@@ -4,7 +4,7 @@ import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'main.dart';
-class MyChromeSafariBrowser extends ChromeSafariBrowser {
+class MyChromeSafariBrowser extends PlatformChromeSafariBrowser {
@override
void onOpened() {
print("ChromeSafari browser opened");
@@ -22,7 +22,7 @@ class MyChromeSafariBrowser extends ChromeSafariBrowser {
}
class ChromeSafariBrowserExampleScreen extends StatefulWidget {
- final ChromeSafariBrowser browser = MyChromeSafariBrowser();
+ final PlatformChromeSafariBrowser browser = MyChromeSafariBrowser();
@override
_ChromeSafariBrowserExampleScreenState createState() =>
diff --git a/example/lib/in_app_browser_example.screen.dart b/example/lib/in_app_browser_example.screen.dart
index a7b7cb3b..4c9b968d 100755
--- a/example/lib/in_app_browser_example.screen.dart
+++ b/example/lib/in_app_browser_example.screen.dart
@@ -11,8 +11,13 @@ import 'main.dart';
class MyInAppBrowser extends InAppBrowser {
MyInAppBrowser(
- {int? windowId, UnmodifiableListView? initialUserScripts})
- : super(windowId: windowId, initialUserScripts: initialUserScripts);
+ {int? windowId,
+ UnmodifiableListView? initialUserScripts,
+ PullToRefreshController? pullToRefreshController})
+ : super(
+ windowId: windowId,
+ initialUserScripts: initialUserScripts,
+ pullToRefreshController: pullToRefreshController);
@override
Future onBrowserCreated() async {
@@ -59,21 +64,19 @@ class MyInAppBrowser extends InAppBrowser {
}
class InAppBrowserExampleScreen extends StatefulWidget {
- final MyInAppBrowser browser = new MyInAppBrowser();
-
@override
_InAppBrowserExampleScreenState createState() =>
new _InAppBrowserExampleScreenState();
}
class _InAppBrowserExampleScreenState extends State {
- PullToRefreshController? pullToRefreshController;
+ late final MyInAppBrowser browser;
@override
void initState() {
super.initState();
- pullToRefreshController = kIsWeb ||
+ PullToRefreshController? pullToRefreshController = kIsWeb ||
![TargetPlatform.iOS, TargetPlatform.android]
.contains(defaultTargetPlatform)
? null
@@ -83,15 +86,16 @@ class _InAppBrowserExampleScreenState extends State {
),
onRefresh: () async {
if (Platform.isAndroid) {
- widget.browser.webViewController?.reload();
+ browser.webViewController?.reload();
} else if (Platform.isIOS) {
- widget.browser.webViewController?.loadUrl(
+ browser.webViewController?.loadUrl(
urlRequest: URLRequest(
- url: await widget.browser.webViewController?.getUrl()));
+ url: await browser.webViewController?.getUrl()));
}
},
);
- widget.browser.pullToRefreshController = pullToRefreshController;
+
+ browser = MyInAppBrowser(pullToRefreshController: pullToRefreshController);
}
@override
@@ -108,7 +112,7 @@ class _InAppBrowserExampleScreenState extends State {
children: [
ElevatedButton(
onPressed: () async {
- await widget.browser.openUrlRequest(
+ await browser.openUrlRequest(
urlRequest:
URLRequest(url: WebUri("https://flutter.dev")),
settings: InAppBrowserClassSettings(
diff --git a/example/lib/in_app_webiew_example.screen.dart b/example/lib/in_app_webiew_example.screen.dart
index 6eff2d15..aca062db 100755
--- a/example/lib/in_app_webiew_example.screen.dart
+++ b/example/lib/in_app_webiew_example.screen.dart
@@ -15,7 +15,7 @@ class InAppWebViewExampleScreen extends StatefulWidget {
class _InAppWebViewExampleScreenState extends State {
final GlobalKey webViewKey = GlobalKey();
- InAppWebViewController? webViewController;
+ PlatformInAppWebViewController? webViewController;
InAppWebViewSettings settings = InAppWebViewSettings(
isInspectable: kDebugMode,
mediaPlaybackRequiresUserGesture: false,
diff --git a/example/lib/web_authentication_session_example.screen.dart b/example/lib/web_authentication_session_example.screen.dart
index 761cf80d..1383b33f 100755
--- a/example/lib/web_authentication_session_example.screen.dart
+++ b/example/lib/web_authentication_session_example.screen.dart
@@ -12,7 +12,7 @@ class WebAuthenticationSessionExampleScreen extends StatefulWidget {
class _WebAuthenticationSessionExampleScreenState
extends State {
- WebAuthenticationSession? session;
+ PlatformWebAuthenticationSession? session;
String? token;
@override
diff --git a/flutter_inappwebview_android/.gitignore b/flutter_inappwebview_android/.gitignore
new file mode 100644
index 00000000..96486fd9
--- /dev/null
+++ b/flutter_inappwebview_android/.gitignore
@@ -0,0 +1,30 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.buildlog/
+.history
+.svn/
+migrate_working_dir/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# The .vscode folder contains launch configuration and tasks you configure in
+# VS Code which you may wish to be included in version control, so this line
+# is commented out by default.
+#.vscode/
+
+# Flutter/Dart/Pub related
+# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
+/pubspec.lock
+**/doc/api/
+.dart_tool/
+.packages
+build/
diff --git a/flutter_inappwebview_android/.metadata b/flutter_inappwebview_android/.metadata
new file mode 100644
index 00000000..3f294f39
--- /dev/null
+++ b/flutter_inappwebview_android/.metadata
@@ -0,0 +1,30 @@
+# This file tracks properties of this Flutter project.
+# Used by Flutter tool to assess capabilities and perform upgrades etc.
+#
+# This file should be version controlled and should not be manually edited.
+
+version:
+ revision: "6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e"
+ channel: "stable"
+
+project_type: plugin
+
+# Tracks metadata for the flutter migrate command
+migration:
+ platforms:
+ - platform: root
+ create_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
+ base_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
+ - platform: android
+ create_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
+ base_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
+
+ # User provided section
+
+ # List of Local paths (relative to this file) that should be
+ # ignored by the migrate tool.
+ #
+ # Files that are not part of the templates will be ignored by default.
+ unmanaged_files:
+ - 'lib/main.dart'
+ - 'ios/Runner.xcodeproj/project.pbxproj'
diff --git a/flutter_inappwebview_android/CHANGELOG.md b/flutter_inappwebview_android/CHANGELOG.md
new file mode 100644
index 00000000..41cc7d81
--- /dev/null
+++ b/flutter_inappwebview_android/CHANGELOG.md
@@ -0,0 +1,3 @@
+## 0.0.1
+
+* TODO: Describe initial release.
diff --git a/flutter_inappwebview_android/LICENSE b/flutter_inappwebview_android/LICENSE
new file mode 100644
index 00000000..ba75c69f
--- /dev/null
+++ b/flutter_inappwebview_android/LICENSE
@@ -0,0 +1 @@
+TODO: Add your license here.
diff --git a/flutter_inappwebview_android/README.md b/flutter_inappwebview_android/README.md
new file mode 100644
index 00000000..e114ca17
--- /dev/null
+++ b/flutter_inappwebview_android/README.md
@@ -0,0 +1,15 @@
+# flutter_inappwebview_android
+
+Android implementation of the flutter_inappwebview plugin.
+
+## Getting Started
+
+This project is a starting point for a Flutter
+[plug-in package](https://flutter.dev/developing-packages/),
+a specialized package that includes platform-specific implementation code for
+Android and/or iOS.
+
+For help getting started with Flutter development, view the
+[online documentation](https://flutter.dev/docs), which offers tutorials,
+samples, guidance on mobile development, and a full API reference.
+
diff --git a/flutter_inappwebview_android/analysis_options.yaml b/flutter_inappwebview_android/analysis_options.yaml
new file mode 100644
index 00000000..24ec4a21
--- /dev/null
+++ b/flutter_inappwebview_android/analysis_options.yaml
@@ -0,0 +1,11 @@
+include: package:flutter_lints/flutter.yaml
+
+linter:
+ rules:
+ constant_identifier_names: ignore
+
+# Additional information about this file can be found at
+# https://dart.dev/guides/language/analysis-options
+analyzer:
+ errors:
+ deprecated_member_use_from_same_package: ignore
\ No newline at end of file
diff --git a/android/.gitignore b/flutter_inappwebview_android/android/.gitignore
similarity index 100%
rename from android/.gitignore
rename to flutter_inappwebview_android/android/.gitignore
diff --git a/android/build.gradle b/flutter_inappwebview_android/android/build.gradle
similarity index 100%
rename from android/build.gradle
rename to flutter_inappwebview_android/android/build.gradle
diff --git a/android/gradle.properties b/flutter_inappwebview_android/android/gradle.properties
similarity index 100%
rename from android/gradle.properties
rename to flutter_inappwebview_android/android/gradle.properties
diff --git a/android/proguard-rules.pro b/flutter_inappwebview_android/android/proguard-rules.pro
similarity index 100%
rename from android/proguard-rules.pro
rename to flutter_inappwebview_android/android/proguard-rules.pro
diff --git a/android/settings.gradle b/flutter_inappwebview_android/android/settings.gradle
similarity index 100%
rename from android/settings.gradle
rename to flutter_inappwebview_android/android/settings.gradle
diff --git a/android/src/main/AndroidManifest.xml b/flutter_inappwebview_android/android/src/main/AndroidManifest.xml
similarity index 100%
rename from android/src/main/AndroidManifest.xml
rename to flutter_inappwebview_android/android/src/main/AndroidManifest.xml
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/ISettings.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/ISettings.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/ISettings.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/ISettings.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebViewFileProvider.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebViewFileProvider.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebViewFileProvider.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebViewFileProvider.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebViewFlutterPlugin.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebViewFlutterPlugin.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebViewFlutterPlugin.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebViewFlutterPlugin.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyWebStorage.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyWebStorage.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyWebStorage.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyWebStorage.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/PlatformUtil.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/PlatformUtil.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/PlatformUtil.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/PlatformUtil.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/Util.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/Util.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/Util.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/Util.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/WebViewFeatureManager.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/WebViewFeatureManager.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/WebViewFeatureManager.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/WebViewFeatureManager.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ActionBroadcastReceiver.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ActionBroadcastReceiver.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ActionBroadcastReceiver.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ActionBroadcastReceiver.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ChromeCustomTabsActivity.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ChromeCustomTabsActivity.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ChromeCustomTabsActivity.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ChromeCustomTabsActivity.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ChromeCustomTabsActivitySingleInstance.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ChromeCustomTabsActivitySingleInstance.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ChromeCustomTabsActivitySingleInstance.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ChromeCustomTabsActivitySingleInstance.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ChromeCustomTabsChannelDelegate.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ChromeCustomTabsChannelDelegate.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ChromeCustomTabsChannelDelegate.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ChromeCustomTabsChannelDelegate.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ChromeCustomTabsSettings.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ChromeCustomTabsSettings.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ChromeCustomTabsSettings.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ChromeCustomTabsSettings.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ChromeSafariBrowserManager.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ChromeSafariBrowserManager.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ChromeSafariBrowserManager.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ChromeSafariBrowserManager.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/CustomTabActivityHelper.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/CustomTabActivityHelper.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/CustomTabActivityHelper.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/CustomTabActivityHelper.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/CustomTabsHelper.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/CustomTabsHelper.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/CustomTabsHelper.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/CustomTabsHelper.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/KeepAliveService.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/KeepAliveService.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/KeepAliveService.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/KeepAliveService.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ServiceConnection.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ServiceConnection.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ServiceConnection.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ServiceConnection.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ServiceConnectionCallback.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ServiceConnectionCallback.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ServiceConnectionCallback.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ServiceConnectionCallback.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/TrustedWebActivity.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/TrustedWebActivity.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/TrustedWebActivity.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/TrustedWebActivity.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/TrustedWebActivitySingleInstance.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/TrustedWebActivitySingleInstance.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/TrustedWebActivitySingleInstance.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/TrustedWebActivitySingleInstance.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/content_blocker/ContentBlocker.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/content_blocker/ContentBlocker.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/content_blocker/ContentBlocker.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/content_blocker/ContentBlocker.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/content_blocker/ContentBlockerAction.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/content_blocker/ContentBlockerAction.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/content_blocker/ContentBlockerAction.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/content_blocker/ContentBlockerAction.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/content_blocker/ContentBlockerActionType.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/content_blocker/ContentBlockerActionType.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/content_blocker/ContentBlockerActionType.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/content_blocker/ContentBlockerActionType.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/content_blocker/ContentBlockerHandler.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/content_blocker/ContentBlockerHandler.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/content_blocker/ContentBlockerHandler.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/content_blocker/ContentBlockerHandler.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/content_blocker/ContentBlockerTrigger.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/content_blocker/ContentBlockerTrigger.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/content_blocker/ContentBlockerTrigger.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/content_blocker/ContentBlockerTrigger.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/content_blocker/ContentBlockerTriggerResourceType.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/content_blocker/ContentBlockerTriggerResourceType.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/content_blocker/ContentBlockerTriggerResourceType.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/content_blocker/ContentBlockerTriggerResourceType.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/credential_database/CredentialDatabase.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/credential_database/CredentialDatabase.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/credential_database/CredentialDatabase.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/credential_database/CredentialDatabase.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/credential_database/CredentialDatabaseHandler.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/credential_database/CredentialDatabaseHandler.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/credential_database/CredentialDatabaseHandler.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/credential_database/CredentialDatabaseHandler.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/credential_database/CredentialDatabaseHelper.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/credential_database/CredentialDatabaseHelper.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/credential_database/CredentialDatabaseHelper.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/credential_database/CredentialDatabaseHelper.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/credential_database/URLCredentialContract.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/credential_database/URLCredentialContract.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/credential_database/URLCredentialContract.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/credential_database/URLCredentialContract.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/credential_database/URLCredentialDao.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/credential_database/URLCredentialDao.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/credential_database/URLCredentialDao.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/credential_database/URLCredentialDao.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/credential_database/URLProtectionSpaceContract.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/credential_database/URLProtectionSpaceContract.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/credential_database/URLProtectionSpaceContract.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/credential_database/URLProtectionSpaceContract.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/credential_database/URLProtectionSpaceDao.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/credential_database/URLProtectionSpaceDao.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/credential_database/URLProtectionSpaceDao.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/credential_database/URLProtectionSpaceDao.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/find_interaction/FindInteractionChannelDelegate.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/find_interaction/FindInteractionChannelDelegate.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/find_interaction/FindInteractionChannelDelegate.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/find_interaction/FindInteractionChannelDelegate.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/find_interaction/FindInteractionController.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/find_interaction/FindInteractionController.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/find_interaction/FindInteractionController.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/find_interaction/FindInteractionController.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/find_interaction/FindInteractionSettings.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/find_interaction/FindInteractionSettings.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/find_interaction/FindInteractionSettings.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/find_interaction/FindInteractionSettings.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/headless_in_app_webview/HeadlessInAppWebView.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/headless_in_app_webview/HeadlessInAppWebView.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/headless_in_app_webview/HeadlessInAppWebView.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/headless_in_app_webview/HeadlessInAppWebView.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/headless_in_app_webview/HeadlessInAppWebViewManager.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/headless_in_app_webview/HeadlessInAppWebViewManager.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/headless_in_app_webview/HeadlessInAppWebViewManager.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/headless_in_app_webview/HeadlessInAppWebViewManager.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/headless_in_app_webview/HeadlessWebViewChannelDelegate.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/headless_in_app_webview/HeadlessWebViewChannelDelegate.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/headless_in_app_webview/HeadlessWebViewChannelDelegate.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/headless_in_app_webview/HeadlessWebViewChannelDelegate.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_browser/ActivityResultListener.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_browser/ActivityResultListener.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_browser/ActivityResultListener.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_browser/ActivityResultListener.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_browser/InAppBrowserActivity.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_browser/InAppBrowserActivity.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_browser/InAppBrowserActivity.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_browser/InAppBrowserActivity.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_browser/InAppBrowserChannelDelegate.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_browser/InAppBrowserChannelDelegate.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_browser/InAppBrowserChannelDelegate.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_browser/InAppBrowserChannelDelegate.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_browser/InAppBrowserDelegate.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_browser/InAppBrowserDelegate.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_browser/InAppBrowserDelegate.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_browser/InAppBrowserDelegate.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_browser/InAppBrowserManager.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_browser/InAppBrowserManager.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_browser/InAppBrowserManager.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_browser/InAppBrowserManager.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_browser/InAppBrowserSettings.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_browser/InAppBrowserSettings.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_browser/InAppBrowserSettings.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_browser/InAppBrowserSettings.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/ConsoleLogJS.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/ConsoleLogJS.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/ConsoleLogJS.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/ConsoleLogJS.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/InterceptAjaxRequestJS.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/InterceptAjaxRequestJS.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/InterceptAjaxRequestJS.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/InterceptAjaxRequestJS.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/InterceptFetchRequestJS.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/InterceptFetchRequestJS.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/InterceptFetchRequestJS.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/InterceptFetchRequestJS.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/JavaScriptBridgeJS.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/JavaScriptBridgeJS.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/JavaScriptBridgeJS.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/JavaScriptBridgeJS.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/OnLoadResourceJS.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/OnLoadResourceJS.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/OnLoadResourceJS.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/OnLoadResourceJS.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/OnWindowBlurEventJS.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/OnWindowBlurEventJS.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/OnWindowBlurEventJS.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/OnWindowBlurEventJS.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/OnWindowFocusEventJS.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/OnWindowFocusEventJS.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/OnWindowFocusEventJS.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/OnWindowFocusEventJS.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/PluginScriptsUtil.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/PluginScriptsUtil.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/PluginScriptsUtil.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/PluginScriptsUtil.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/PrintJS.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/PrintJS.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/PrintJS.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/PrintJS.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/PromisePolyfillJS.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/PromisePolyfillJS.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/PromisePolyfillJS.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/plugin_scripts_js/PromisePolyfillJS.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/print_job/PrintJobChannelDelegate.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/print_job/PrintJobChannelDelegate.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/print_job/PrintJobChannelDelegate.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/print_job/PrintJobChannelDelegate.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/print_job/PrintJobController.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/print_job/PrintJobController.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/print_job/PrintJobController.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/print_job/PrintJobController.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/print_job/PrintJobManager.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/print_job/PrintJobManager.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/print_job/PrintJobManager.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/print_job/PrintJobManager.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/print_job/PrintJobSettings.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/print_job/PrintJobSettings.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/print_job/PrintJobSettings.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/print_job/PrintJobSettings.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/process_global_config/ProcessGlobalConfigManager.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/process_global_config/ProcessGlobalConfigManager.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/process_global_config/ProcessGlobalConfigManager.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/process_global_config/ProcessGlobalConfigManager.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/process_global_config/ProcessGlobalConfigSettings.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/process_global_config/ProcessGlobalConfigSettings.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/process_global_config/ProcessGlobalConfigSettings.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/process_global_config/ProcessGlobalConfigSettings.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/proxy/ProxyManager.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/proxy/ProxyManager.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/proxy/ProxyManager.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/proxy/ProxyManager.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/proxy/ProxySettings.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/proxy/ProxySettings.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/proxy/ProxySettings.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/proxy/ProxySettings.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/pull_to_refresh/PullToRefreshChannelDelegate.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/pull_to_refresh/PullToRefreshChannelDelegate.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/pull_to_refresh/PullToRefreshChannelDelegate.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/pull_to_refresh/PullToRefreshChannelDelegate.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/pull_to_refresh/PullToRefreshLayout.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/pull_to_refresh/PullToRefreshLayout.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/pull_to_refresh/PullToRefreshLayout.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/pull_to_refresh/PullToRefreshLayout.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/pull_to_refresh/PullToRefreshSettings.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/pull_to_refresh/PullToRefreshSettings.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/pull_to_refresh/PullToRefreshSettings.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/pull_to_refresh/PullToRefreshSettings.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/service_worker/ServiceWorkerChannelDelegate.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/service_worker/ServiceWorkerChannelDelegate.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/service_worker/ServiceWorkerChannelDelegate.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/service_worker/ServiceWorkerChannelDelegate.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/service_worker/ServiceWorkerManager.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/service_worker/ServiceWorkerManager.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/service_worker/ServiceWorkerManager.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/service_worker/ServiceWorkerManager.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/tracing/TracingControllerChannelDelegate.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/tracing/TracingControllerChannelDelegate.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/tracing/TracingControllerChannelDelegate.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/tracing/TracingControllerChannelDelegate.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/tracing/TracingControllerManager.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/tracing/TracingControllerManager.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/tracing/TracingControllerManager.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/tracing/TracingControllerManager.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/tracing/TracingSettings.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/tracing/TracingSettings.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/tracing/TracingSettings.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/tracing/TracingSettings.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/AndroidResource.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/AndroidResource.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/AndroidResource.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/AndroidResource.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/BaseCallbackResultImpl.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/BaseCallbackResultImpl.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/BaseCallbackResultImpl.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/BaseCallbackResultImpl.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ChannelDelegateImpl.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ChannelDelegateImpl.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ChannelDelegateImpl.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ChannelDelegateImpl.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ClientCertChallenge.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ClientCertChallenge.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ClientCertChallenge.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ClientCertChallenge.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ClientCertResponse.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ClientCertResponse.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ClientCertResponse.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ClientCertResponse.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ContentWorld.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ContentWorld.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ContentWorld.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ContentWorld.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/CreateWindowAction.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/CreateWindowAction.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/CreateWindowAction.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/CreateWindowAction.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/CustomSchemeResponse.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/CustomSchemeResponse.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/CustomSchemeResponse.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/CustomSchemeResponse.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/CustomTabsActionButton.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/CustomTabsActionButton.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/CustomTabsActionButton.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/CustomTabsActionButton.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/CustomTabsMenuItem.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/CustomTabsMenuItem.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/CustomTabsMenuItem.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/CustomTabsMenuItem.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/CustomTabsSecondaryToolbar.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/CustomTabsSecondaryToolbar.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/CustomTabsSecondaryToolbar.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/CustomTabsSecondaryToolbar.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/Disposable.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/Disposable.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/Disposable.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/Disposable.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/DownloadStartRequest.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/DownloadStartRequest.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/DownloadStartRequest.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/DownloadStartRequest.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/FindSession.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/FindSession.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/FindSession.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/FindSession.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/GeolocationPermissionShowPromptResponse.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/GeolocationPermissionShowPromptResponse.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/GeolocationPermissionShowPromptResponse.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/GeolocationPermissionShowPromptResponse.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/HitTestResult.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/HitTestResult.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/HitTestResult.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/HitTestResult.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/HttpAuthResponse.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/HttpAuthResponse.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/HttpAuthResponse.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/HttpAuthResponse.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/HttpAuthenticationChallenge.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/HttpAuthenticationChallenge.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/HttpAuthenticationChallenge.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/HttpAuthenticationChallenge.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ICallbackResult.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ICallbackResult.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ICallbackResult.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ICallbackResult.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/IChannelDelegate.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/IChannelDelegate.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/IChannelDelegate.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/IChannelDelegate.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/InAppBrowserMenuItem.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/InAppBrowserMenuItem.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/InAppBrowserMenuItem.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/InAppBrowserMenuItem.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/JsAlertResponse.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/JsAlertResponse.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/JsAlertResponse.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/JsAlertResponse.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/JsBeforeUnloadResponse.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/JsBeforeUnloadResponse.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/JsBeforeUnloadResponse.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/JsBeforeUnloadResponse.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/JsConfirmResponse.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/JsConfirmResponse.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/JsConfirmResponse.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/JsConfirmResponse.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/JsPromptResponse.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/JsPromptResponse.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/JsPromptResponse.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/JsPromptResponse.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/MarginsExt.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/MarginsExt.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/MarginsExt.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/MarginsExt.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/MediaSizeExt.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/MediaSizeExt.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/MediaSizeExt.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/MediaSizeExt.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/NavigationAction.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/NavigationAction.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/NavigationAction.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/NavigationAction.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/NavigationActionPolicy.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/NavigationActionPolicy.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/NavigationActionPolicy.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/NavigationActionPolicy.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/PermissionResponse.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/PermissionResponse.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/PermissionResponse.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/PermissionResponse.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/PluginScript.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/PluginScript.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/PluginScript.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/PluginScript.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/PreferredContentModeOptionType.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/PreferredContentModeOptionType.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/PreferredContentModeOptionType.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/PreferredContentModeOptionType.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/PrintAttributesExt.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/PrintAttributesExt.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/PrintAttributesExt.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/PrintAttributesExt.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/PrintJobInfoExt.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/PrintJobInfoExt.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/PrintJobInfoExt.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/PrintJobInfoExt.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ProxyRuleExt.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ProxyRuleExt.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ProxyRuleExt.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ProxyRuleExt.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ResolutionExt.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ResolutionExt.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ResolutionExt.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ResolutionExt.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/SafeBrowsingResponse.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/SafeBrowsingResponse.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/SafeBrowsingResponse.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/SafeBrowsingResponse.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ServerTrustAuthResponse.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ServerTrustAuthResponse.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ServerTrustAuthResponse.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ServerTrustAuthResponse.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ServerTrustChallenge.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ServerTrustChallenge.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ServerTrustChallenge.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/ServerTrustChallenge.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/Size2D.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/Size2D.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/Size2D.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/Size2D.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/SslCertificateExt.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/SslCertificateExt.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/SslCertificateExt.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/SslCertificateExt.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/SslErrorExt.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/SslErrorExt.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/SslErrorExt.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/SslErrorExt.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/SyncBaseCallbackResultImpl.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/SyncBaseCallbackResultImpl.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/SyncBaseCallbackResultImpl.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/SyncBaseCallbackResultImpl.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/URLAuthenticationChallenge.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/URLAuthenticationChallenge.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/URLAuthenticationChallenge.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/URLAuthenticationChallenge.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/URLCredential.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/URLCredential.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/URLCredential.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/URLCredential.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/URLProtectionSpace.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/URLProtectionSpace.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/URLProtectionSpace.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/URLProtectionSpace.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/URLRequest.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/URLRequest.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/URLRequest.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/URLRequest.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/UserContentController.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/UserContentController.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/UserContentController.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/UserContentController.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/UserScript.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/UserScript.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/UserScript.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/UserScript.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/UserScriptInjectionTime.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/UserScriptInjectionTime.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/UserScriptInjectionTime.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/UserScriptInjectionTime.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebMessage.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebMessage.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebMessage.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebMessage.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebMessageCompatExt.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebMessageCompatExt.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebMessageCompatExt.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebMessageCompatExt.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebMessagePort.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebMessagePort.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebMessagePort.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebMessagePort.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebMessagePortCompatExt.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebMessagePortCompatExt.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebMessagePortCompatExt.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebMessagePortCompatExt.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebResourceErrorExt.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebResourceErrorExt.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebResourceErrorExt.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebResourceErrorExt.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebResourceRequestExt.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebResourceRequestExt.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebResourceRequestExt.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebResourceRequestExt.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebResourceResponseExt.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebResourceResponseExt.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebResourceResponseExt.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebResourceResponseExt.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebViewAssetLoaderExt.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebViewAssetLoaderExt.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebViewAssetLoaderExt.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/WebViewAssetLoaderExt.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/ContextMenuSettings.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/ContextMenuSettings.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/ContextMenuSettings.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/ContextMenuSettings.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/FlutterWebViewFactory.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/FlutterWebViewFactory.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/FlutterWebViewFactory.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/FlutterWebViewFactory.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/InAppWebViewInterface.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/InAppWebViewInterface.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/InAppWebViewInterface.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/InAppWebViewInterface.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/InAppWebViewManager.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/InAppWebViewManager.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/InAppWebViewManager.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/InAppWebViewManager.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/JavaScriptBridgeInterface.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/JavaScriptBridgeInterface.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/JavaScriptBridgeInterface.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/JavaScriptBridgeInterface.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/PlatformWebView.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/PlatformWebView.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/PlatformWebView.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/PlatformWebView.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/WebViewChannelDelegate.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/WebViewChannelDelegate.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/WebViewChannelDelegate.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/WebViewChannelDelegate.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/WebViewChannelDelegateMethods.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/WebViewChannelDelegateMethods.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/WebViewChannelDelegateMethods.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/WebViewChannelDelegateMethods.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/DisplayListenerProxy.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/DisplayListenerProxy.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/DisplayListenerProxy.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/DisplayListenerProxy.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/FlutterWebView.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/FlutterWebView.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/FlutterWebView.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/FlutterWebView.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InAppWebView.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InAppWebView.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InAppWebView.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InAppWebView.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InAppWebViewChromeClient.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InAppWebViewChromeClient.java
similarity index 99%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InAppWebViewChromeClient.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InAppWebViewChromeClient.java
index 8a3c9e5d..75f1fcf5 100755
--- a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InAppWebViewChromeClient.java
+++ b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InAppWebViewChromeClient.java
@@ -47,7 +47,6 @@ import androidx.core.content.ContextCompat;
import androidx.core.content.FileProvider;
import com.pichillilorenzo.flutter_inappwebview.InAppWebViewFileProvider;
-import com.pichillilorenzo.flutter_inappwebview.R;
import com.pichillilorenzo.flutter_inappwebview.types.CreateWindowAction;
import com.pichillilorenzo.flutter_inappwebview.in_app_browser.ActivityResultListener;
import com.pichillilorenzo.flutter_inappwebview.in_app_browser.InAppBrowserDelegate;
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InAppWebViewClient.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InAppWebViewClient.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InAppWebViewClient.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InAppWebViewClient.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InAppWebViewClientCompat.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InAppWebViewClientCompat.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InAppWebViewClientCompat.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InAppWebViewClientCompat.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InAppWebViewRenderProcessClient.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InAppWebViewRenderProcessClient.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InAppWebViewRenderProcessClient.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InAppWebViewRenderProcessClient.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InAppWebViewSettings.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InAppWebViewSettings.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InAppWebViewSettings.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InAppWebViewSettings.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InputAwareWebView.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InputAwareWebView.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InputAwareWebView.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/InputAwareWebView.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/ThreadedInputConnectionProxyAdapterView.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/ThreadedInputConnectionProxyAdapterView.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/ThreadedInputConnectionProxyAdapterView.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/in_app_webview/ThreadedInputConnectionProxyAdapterView.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/web_message/WebMessageChannel.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/web_message/WebMessageChannel.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/web_message/WebMessageChannel.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/web_message/WebMessageChannel.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/web_message/WebMessageChannelChannelDelegate.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/web_message/WebMessageChannelChannelDelegate.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/web_message/WebMessageChannelChannelDelegate.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/web_message/WebMessageChannelChannelDelegate.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/web_message/WebMessageListener.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/web_message/WebMessageListener.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/web_message/WebMessageListener.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/web_message/WebMessageListener.java
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/web_message/WebMessageListenerChannelDelegate.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/web_message/WebMessageListenerChannelDelegate.java
similarity index 100%
rename from android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/web_message/WebMessageListenerChannelDelegate.java
rename to flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/webview/web_message/WebMessageListenerChannelDelegate.java
diff --git a/android/src/main/res/drawable/floating_action_mode_shape.xml b/flutter_inappwebview_android/android/src/main/res/drawable/floating_action_mode_shape.xml
similarity index 100%
rename from android/src/main/res/drawable/floating_action_mode_shape.xml
rename to flutter_inappwebview_android/android/src/main/res/drawable/floating_action_mode_shape.xml
diff --git a/android/src/main/res/layout/activity_web_view.xml b/flutter_inappwebview_android/android/src/main/res/layout/activity_web_view.xml
similarity index 100%
rename from android/src/main/res/layout/activity_web_view.xml
rename to flutter_inappwebview_android/android/src/main/res/layout/activity_web_view.xml
diff --git a/android/src/main/res/layout/chrome_custom_tabs_layout.xml b/flutter_inappwebview_android/android/src/main/res/layout/chrome_custom_tabs_layout.xml
similarity index 100%
rename from android/src/main/res/layout/chrome_custom_tabs_layout.xml
rename to flutter_inappwebview_android/android/src/main/res/layout/chrome_custom_tabs_layout.xml
diff --git a/android/src/main/res/layout/floating_action_mode.xml b/flutter_inappwebview_android/android/src/main/res/layout/floating_action_mode.xml
similarity index 100%
rename from android/src/main/res/layout/floating_action_mode.xml
rename to flutter_inappwebview_android/android/src/main/res/layout/floating_action_mode.xml
diff --git a/android/src/main/res/layout/floating_action_mode_item.xml b/flutter_inappwebview_android/android/src/main/res/layout/floating_action_mode_item.xml
similarity index 100%
rename from android/src/main/res/layout/floating_action_mode_item.xml
rename to flutter_inappwebview_android/android/src/main/res/layout/floating_action_mode_item.xml
diff --git a/android/src/main/res/menu/menu_main.xml b/flutter_inappwebview_android/android/src/main/res/menu/menu_main.xml
similarity index 100%
rename from android/src/main/res/menu/menu_main.xml
rename to flutter_inappwebview_android/android/src/main/res/menu/menu_main.xml
diff --git a/android/src/main/res/values/strings.xml b/flutter_inappwebview_android/android/src/main/res/values/strings.xml
similarity index 100%
rename from android/src/main/res/values/strings.xml
rename to flutter_inappwebview_android/android/src/main/res/values/strings.xml
diff --git a/android/src/main/res/values/styles.xml b/flutter_inappwebview_android/android/src/main/res/values/styles.xml
similarity index 100%
rename from android/src/main/res/values/styles.xml
rename to flutter_inappwebview_android/android/src/main/res/values/styles.xml
diff --git a/android/src/main/res/xml/provider_paths.xml b/flutter_inappwebview_android/android/src/main/res/xml/provider_paths.xml
similarity index 100%
rename from android/src/main/res/xml/provider_paths.xml
rename to flutter_inappwebview_android/android/src/main/res/xml/provider_paths.xml
diff --git a/flutter_inappwebview_android/example/.gitignore b/flutter_inappwebview_android/example/.gitignore
new file mode 100644
index 00000000..24476c5d
--- /dev/null
+++ b/flutter_inappwebview_android/example/.gitignore
@@ -0,0 +1,44 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.buildlog/
+.history
+.svn/
+migrate_working_dir/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# The .vscode folder contains launch configuration and tasks you configure in
+# VS Code which you may wish to be included in version control, so this line
+# is commented out by default.
+#.vscode/
+
+# Flutter/Dart/Pub related
+**/doc/api/
+**/ios/Flutter/.last_build_id
+.dart_tool/
+.flutter-plugins
+.flutter-plugins-dependencies
+.packages
+.pub-cache/
+.pub/
+/build/
+
+# Symbolication related
+app.*.symbols
+
+# Obfuscation related
+app.*.map.json
+
+# Android Studio will place build artifacts here
+/android/app/debug
+/android/app/profile
+/android/app/release
diff --git a/flutter_inappwebview_android/example/README.md b/flutter_inappwebview_android/example/README.md
new file mode 100644
index 00000000..833308e7
--- /dev/null
+++ b/flutter_inappwebview_android/example/README.md
@@ -0,0 +1,16 @@
+# flutter_inappwebview_android_example
+
+Demonstrates how to use the flutter_inappwebview_android plugin.
+
+## Getting Started
+
+This project is a starting point for a Flutter application.
+
+A few resources to get you started if this is your first Flutter project:
+
+- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
+- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
+
+For help getting started with Flutter development, view the
+[online documentation](https://docs.flutter.dev/), which offers tutorials,
+samples, guidance on mobile development, and a full API reference.
diff --git a/flutter_inappwebview_android/example/analysis_options.yaml b/flutter_inappwebview_android/example/analysis_options.yaml
new file mode 100644
index 00000000..0d290213
--- /dev/null
+++ b/flutter_inappwebview_android/example/analysis_options.yaml
@@ -0,0 +1,28 @@
+# This file configures the analyzer, which statically analyzes Dart code to
+# check for errors, warnings, and lints.
+#
+# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
+# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
+# invoked from the command line by running `flutter analyze`.
+
+# The following line activates a set of recommended lints for Flutter apps,
+# packages, and plugins designed to encourage good coding practices.
+include: package:flutter_lints/flutter.yaml
+
+linter:
+ # The lint rules applied to this project can be customized in the
+ # section below to disable rules from the `package:flutter_lints/flutter.yaml`
+ # included above or to enable additional rules. A list of all available lints
+ # and their documentation is published at https://dart.dev/lints.
+ #
+ # Instead of disabling a lint rule for the entire project in the
+ # section below, it can also be suppressed for a single line of code
+ # or a specific dart file by using the `// ignore: name_of_lint` and
+ # `// ignore_for_file: name_of_lint` syntax on the line or in the file
+ # producing the lint.
+ rules:
+ # avoid_print: false # Uncomment to disable the `avoid_print` rule
+ # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
+
+# Additional information about this file can be found at
+# https://dart.dev/guides/language/analysis-options
diff --git a/flutter_inappwebview_android/example/android/.gitignore b/flutter_inappwebview_android/example/android/.gitignore
new file mode 100644
index 00000000..6f568019
--- /dev/null
+++ b/flutter_inappwebview_android/example/android/.gitignore
@@ -0,0 +1,13 @@
+gradle-wrapper.jar
+/.gradle
+/captures/
+/gradlew
+/gradlew.bat
+/local.properties
+GeneratedPluginRegistrant.java
+
+# Remember to never publicly share your keystore.
+# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
+key.properties
+**/*.keystore
+**/*.jks
diff --git a/flutter_inappwebview_android/example/android/app/build.gradle b/flutter_inappwebview_android/example/android/app/build.gradle
new file mode 100644
index 00000000..ec439213
--- /dev/null
+++ b/flutter_inappwebview_android/example/android/app/build.gradle
@@ -0,0 +1,57 @@
+plugins {
+ id "com.android.application"
+ id "kotlin-android"
+ id "dev.flutter.flutter-gradle-plugin"
+}
+
+def localProperties = new Properties()
+def localPropertiesFile = rootProject.file('local.properties')
+if (localPropertiesFile.exists()) {
+ localPropertiesFile.withReader('UTF-8') { reader ->
+ localProperties.load(reader)
+ }
+}
+
+def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
+if (flutterVersionCode == null) {
+ flutterVersionCode = '1'
+}
+
+def flutterVersionName = localProperties.getProperty('flutter.versionName')
+if (flutterVersionName == null) {
+ flutterVersionName = '1.0'
+}
+
+android {
+ namespace "com.pichillilorenzo.flutter_inappwebview_android_example"
+ compileSdkVersion flutter.compileSdkVersion
+ ndkVersion flutter.ndkVersion
+
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+
+ defaultConfig {
+ // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
+ applicationId "com.pichillilorenzo.flutter_inappwebview_android_example"
+ // You can update the following values to match your application needs.
+ // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
+ minSdkVersion flutter.minSdkVersion
+ targetSdkVersion flutter.targetSdkVersion
+ versionCode flutterVersionCode.toInteger()
+ versionName flutterVersionName
+ }
+
+ buildTypes {
+ release {
+ // TODO: Add your own signing config for the release build.
+ // Signing with the debug keys for now, so `flutter run --release` works.
+ signingConfig signingConfigs.debug
+ }
+ }
+}
+
+flutter {
+ source '../..'
+}
diff --git a/flutter_inappwebview_android/example/android/app/src/debug/AndroidManifest.xml b/flutter_inappwebview_android/example/android/app/src/debug/AndroidManifest.xml
new file mode 100644
index 00000000..399f6981
--- /dev/null
+++ b/flutter_inappwebview_android/example/android/app/src/debug/AndroidManifest.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/flutter_inappwebview_android/example/android/app/src/main/AndroidManifest.xml b/flutter_inappwebview_android/example/android/app/src/main/AndroidManifest.xml
new file mode 100644
index 00000000..587125fe
--- /dev/null
+++ b/flutter_inappwebview_android/example/android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter_inappwebview_android/example/android/app/src/main/java/com/pichillilorenzo/flutter_inappwebview_android_example/MainActivity.java b/flutter_inappwebview_android/example/android/app/src/main/java/com/pichillilorenzo/flutter_inappwebview_android_example/MainActivity.java
new file mode 100644
index 00000000..8463e659
--- /dev/null
+++ b/flutter_inappwebview_android/example/android/app/src/main/java/com/pichillilorenzo/flutter_inappwebview_android_example/MainActivity.java
@@ -0,0 +1,6 @@
+package com.pichillilorenzo.flutter_inappwebview_android_example;
+
+import io.flutter.embedding.android.FlutterActivity;
+
+public class MainActivity extends FlutterActivity {
+}
diff --git a/flutter_inappwebview_android/example/android/app/src/main/res/drawable-v21/launch_background.xml b/flutter_inappwebview_android/example/android/app/src/main/res/drawable-v21/launch_background.xml
new file mode 100644
index 00000000..f74085f3
--- /dev/null
+++ b/flutter_inappwebview_android/example/android/app/src/main/res/drawable-v21/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/flutter_inappwebview_android/example/android/app/src/main/res/drawable/launch_background.xml b/flutter_inappwebview_android/example/android/app/src/main/res/drawable/launch_background.xml
new file mode 100644
index 00000000..304732f8
--- /dev/null
+++ b/flutter_inappwebview_android/example/android/app/src/main/res/drawable/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/flutter_inappwebview_android/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/flutter_inappwebview_android/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 00000000..db77bb4b
Binary files /dev/null and b/flutter_inappwebview_android/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/flutter_inappwebview_android/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/flutter_inappwebview_android/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 00000000..17987b79
Binary files /dev/null and b/flutter_inappwebview_android/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/flutter_inappwebview_android/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/flutter_inappwebview_android/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 00000000..09d43914
Binary files /dev/null and b/flutter_inappwebview_android/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/flutter_inappwebview_android/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/flutter_inappwebview_android/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 00000000..d5f1c8d3
Binary files /dev/null and b/flutter_inappwebview_android/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/flutter_inappwebview_android/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/flutter_inappwebview_android/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 00000000..4d6372ee
Binary files /dev/null and b/flutter_inappwebview_android/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/flutter_inappwebview_android/example/android/app/src/main/res/values-night/styles.xml b/flutter_inappwebview_android/example/android/app/src/main/res/values-night/styles.xml
new file mode 100644
index 00000000..06952be7
--- /dev/null
+++ b/flutter_inappwebview_android/example/android/app/src/main/res/values-night/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/flutter_inappwebview_android/example/android/app/src/main/res/values/styles.xml b/flutter_inappwebview_android/example/android/app/src/main/res/values/styles.xml
new file mode 100644
index 00000000..cb1ef880
--- /dev/null
+++ b/flutter_inappwebview_android/example/android/app/src/main/res/values/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/flutter_inappwebview_android/example/android/app/src/profile/AndroidManifest.xml b/flutter_inappwebview_android/example/android/app/src/profile/AndroidManifest.xml
new file mode 100644
index 00000000..399f6981
--- /dev/null
+++ b/flutter_inappwebview_android/example/android/app/src/profile/AndroidManifest.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/flutter_inappwebview_android/example/android/build.gradle b/flutter_inappwebview_android/example/android/build.gradle
new file mode 100644
index 00000000..f7eb7f63
--- /dev/null
+++ b/flutter_inappwebview_android/example/android/build.gradle
@@ -0,0 +1,31 @@
+buildscript {
+ ext.kotlin_version = '1.7.10'
+ repositories {
+ google()
+ mavenCentral()
+ }
+
+ dependencies {
+ classpath 'com.android.tools.build:gradle:7.3.0'
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
+ }
+}
+
+allprojects {
+ repositories {
+ google()
+ mavenCentral()
+ }
+}
+
+rootProject.buildDir = '../build'
+subprojects {
+ project.buildDir = "${rootProject.buildDir}/${project.name}"
+}
+subprojects {
+ project.evaluationDependsOn(':app')
+}
+
+tasks.register("clean", Delete) {
+ delete rootProject.buildDir
+}
diff --git a/flutter_inappwebview_android/example/android/gradle.properties b/flutter_inappwebview_android/example/android/gradle.properties
new file mode 100644
index 00000000..94adc3a3
--- /dev/null
+++ b/flutter_inappwebview_android/example/android/gradle.properties
@@ -0,0 +1,3 @@
+org.gradle.jvmargs=-Xmx1536M
+android.useAndroidX=true
+android.enableJetifier=true
diff --git a/flutter_inappwebview_android/example/android/gradle/wrapper/gradle-wrapper.properties b/flutter_inappwebview_android/example/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 00000000..3c472b99
--- /dev/null
+++ b/flutter_inappwebview_android/example/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
diff --git a/flutter_inappwebview_android/example/android/settings.gradle b/flutter_inappwebview_android/example/android/settings.gradle
new file mode 100644
index 00000000..55c4ca8b
--- /dev/null
+++ b/flutter_inappwebview_android/example/android/settings.gradle
@@ -0,0 +1,20 @@
+pluginManagement {
+ def flutterSdkPath = {
+ def properties = new Properties()
+ file("local.properties").withInputStream { properties.load(it) }
+ def flutterSdkPath = properties.getProperty("flutter.sdk")
+ assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
+ return flutterSdkPath
+ }
+ settings.ext.flutterSdkPath = flutterSdkPath()
+
+ includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
+
+ plugins {
+ id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
+ }
+}
+
+include ":app"
+
+apply from: "${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle/app_plugin_loader.gradle"
diff --git a/flutter_inappwebview_android/example/integration_test/plugin_integration_test.dart b/flutter_inappwebview_android/example/integration_test/plugin_integration_test.dart
new file mode 100644
index 00000000..2784454b
--- /dev/null
+++ b/flutter_inappwebview_android/example/integration_test/plugin_integration_test.dart
@@ -0,0 +1,25 @@
+// This is a basic Flutter integration test.
+//
+// Since integration tests run in a full Flutter application, they can interact
+// with the host side of a plugin implementation, unlike Dart unit tests.
+//
+// For more information about Flutter integration tests, please see
+// https://docs.flutter.dev/cookbook/testing/integration/introduction
+
+
+import 'package:flutter_test/flutter_test.dart';
+import 'package:integration_test/integration_test.dart';
+
+import 'package:flutter_inappwebview_android/flutter_inappwebview_android.dart';
+
+void main() {
+ IntegrationTestWidgetsFlutterBinding.ensureInitialized();
+
+ testWidgets('getPlatformVersion test', (WidgetTester tester) async {
+ final FlutterInappwebviewAndroid plugin = FlutterInappwebviewAndroid();
+ final String? version = await plugin.getPlatformVersion();
+ // The version string depends on the host platform running the test, so
+ // just assert that some non-empty string is returned.
+ expect(version?.isNotEmpty, true);
+ });
+}
diff --git a/flutter_inappwebview_android/example/lib/main.dart b/flutter_inappwebview_android/example/lib/main.dart
new file mode 100644
index 00000000..80ee1023
--- /dev/null
+++ b/flutter_inappwebview_android/example/lib/main.dart
@@ -0,0 +1,63 @@
+import 'package:flutter/material.dart';
+import 'dart:async';
+
+import 'package:flutter/services.dart';
+import 'package:flutter_inappwebview_android/flutter_inappwebview_android.dart';
+
+void main() {
+ runApp(const MyApp());
+}
+
+class MyApp extends StatefulWidget {
+ const MyApp({super.key});
+
+ @override
+ State createState() => _MyAppState();
+}
+
+class _MyAppState extends State {
+ String _platformVersion = 'Unknown';
+ final _flutterInappwebviewAndroidPlugin = FlutterInappwebviewAndroid();
+
+ @override
+ void initState() {
+ super.initState();
+ initPlatformState();
+ }
+
+ // Platform messages are asynchronous, so we initialize in an async method.
+ Future initPlatformState() async {
+ String platformVersion;
+ // Platform messages may fail, so we use a try/catch PlatformException.
+ // We also handle the message potentially returning null.
+ try {
+ platformVersion =
+ await _flutterInappwebviewAndroidPlugin.getPlatformVersion() ?? 'Unknown platform version';
+ } on PlatformException {
+ platformVersion = 'Failed to get platform version.';
+ }
+
+ // If the widget was removed from the tree while the asynchronous platform
+ // message was in flight, we want to discard the reply rather than calling
+ // setState to update our non-existent appearance.
+ if (!mounted) return;
+
+ setState(() {
+ _platformVersion = platformVersion;
+ });
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return MaterialApp(
+ home: Scaffold(
+ appBar: AppBar(
+ title: const Text('Plugin example app'),
+ ),
+ body: Center(
+ child: Text('Running on: $_platformVersion\n'),
+ ),
+ ),
+ );
+ }
+}
diff --git a/flutter_inappwebview_android/example/pubspec.lock b/flutter_inappwebview_android/example/pubspec.lock
new file mode 100644
index 00000000..86d6e013
--- /dev/null
+++ b/flutter_inappwebview_android/example/pubspec.lock
@@ -0,0 +1,282 @@
+# Generated by pub
+# See https://dart.dev/tools/pub/glossary#lockfile
+packages:
+ async:
+ dependency: transitive
+ description:
+ name: async
+ sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.11.0"
+ boolean_selector:
+ dependency: transitive
+ description:
+ name: boolean_selector
+ sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.1"
+ characters:
+ dependency: transitive
+ description:
+ name: characters
+ sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.3.0"
+ clock:
+ dependency: transitive
+ description:
+ name: clock
+ sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.1"
+ collection:
+ dependency: transitive
+ description:
+ name: collection
+ sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.17.2"
+ cupertino_icons:
+ dependency: "direct main"
+ description:
+ name: cupertino_icons
+ sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.6"
+ fake_async:
+ dependency: transitive
+ description:
+ name: fake_async
+ sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.3.1"
+ file:
+ dependency: transitive
+ description:
+ name: file
+ sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d"
+ url: "https://pub.dev"
+ source: hosted
+ version: "6.1.4"
+ flutter:
+ dependency: "direct main"
+ description: flutter
+ source: sdk
+ version: "0.0.0"
+ flutter_driver:
+ dependency: transitive
+ description: flutter
+ source: sdk
+ version: "0.0.0"
+ flutter_inappwebview_android:
+ dependency: "direct main"
+ description:
+ path: ".."
+ relative: true
+ source: path
+ version: "0.0.1"
+ flutter_inappwebview_internal_annotations:
+ dependency: transitive
+ description:
+ name: flutter_inappwebview_internal_annotations
+ sha256: "5f80fd30e208ddded7dbbcd0d569e7995f9f63d45ea3f548d8dd4c0b473fb4c8"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.1"
+ flutter_inappwebview_platform_interface:
+ dependency: transitive
+ description:
+ path: "../../flutter_inappwebview_platform_interface"
+ relative: true
+ source: path
+ version: "0.0.1"
+ flutter_lints:
+ dependency: "direct dev"
+ description:
+ name: flutter_lints
+ sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.0.3"
+ flutter_test:
+ dependency: "direct dev"
+ description: flutter
+ source: sdk
+ version: "0.0.0"
+ fuchsia_remote_debug_protocol:
+ dependency: transitive
+ description: flutter
+ source: sdk
+ version: "0.0.0"
+ integration_test:
+ dependency: "direct dev"
+ description: flutter
+ source: sdk
+ version: "0.0.0"
+ lints:
+ dependency: transitive
+ description:
+ name: lints
+ sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.1"
+ matcher:
+ dependency: transitive
+ description:
+ name: matcher
+ sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.12.16"
+ material_color_utilities:
+ dependency: transitive
+ description:
+ name: material_color_utilities
+ sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.5.0"
+ meta:
+ dependency: transitive
+ description:
+ name: meta
+ sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.9.1"
+ path:
+ dependency: transitive
+ description:
+ name: path
+ sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.8.3"
+ platform:
+ dependency: transitive
+ description:
+ name: platform
+ sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.1.0"
+ plugin_platform_interface:
+ dependency: transitive
+ description:
+ name: plugin_platform_interface
+ sha256: da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.6"
+ process:
+ dependency: transitive
+ description:
+ name: process
+ sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.2.4"
+ sky_engine:
+ dependency: transitive
+ description: flutter
+ source: sdk
+ version: "0.0.99"
+ source_span:
+ dependency: transitive
+ description:
+ name: source_span
+ sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.10.0"
+ stack_trace:
+ dependency: transitive
+ description:
+ name: stack_trace
+ sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.11.0"
+ stream_channel:
+ dependency: transitive
+ description:
+ name: stream_channel
+ sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.1"
+ string_scanner:
+ dependency: transitive
+ description:
+ name: string_scanner
+ sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.2.0"
+ sync_http:
+ dependency: transitive
+ description:
+ name: sync_http
+ sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.3.1"
+ term_glyph:
+ dependency: transitive
+ description:
+ name: term_glyph
+ sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.2.1"
+ test_api:
+ dependency: transitive
+ description:
+ name: test_api
+ sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.6.0"
+ vector_math:
+ dependency: transitive
+ description:
+ name: vector_math
+ sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.4"
+ vm_service:
+ dependency: transitive
+ description:
+ name: vm_service
+ sha256: c620a6f783fa22436da68e42db7ebbf18b8c44b9a46ab911f666ff09ffd9153f
+ url: "https://pub.dev"
+ source: hosted
+ version: "11.7.1"
+ web:
+ dependency: transitive
+ description:
+ name: web
+ sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.1.4-beta"
+ webdriver:
+ dependency: transitive
+ description:
+ name: webdriver
+ sha256: "3c923e918918feeb90c4c9fdf1fe39220fa4c0e8e2c0fffaded174498ef86c49"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.0.2"
+sdks:
+ dart: ">=3.1.4 <4.0.0"
+ flutter: ">=3.0.0"
diff --git a/flutter_inappwebview_android/example/pubspec.yaml b/flutter_inappwebview_android/example/pubspec.yaml
new file mode 100644
index 00000000..4aaafc26
--- /dev/null
+++ b/flutter_inappwebview_android/example/pubspec.yaml
@@ -0,0 +1,85 @@
+name: flutter_inappwebview_android_example
+description: Demonstrates how to use the flutter_inappwebview_android plugin.
+# The following line prevents the package from being accidentally published to
+# pub.dev using `flutter pub publish`. This is preferred for private packages.
+publish_to: 'none' # Remove this line if you wish to publish to pub.dev
+
+environment:
+ sdk: '>=3.1.4 <4.0.0'
+
+# Dependencies specify other packages that your package needs in order to work.
+# To automatically upgrade your package dependencies to the latest versions
+# consider running `flutter pub upgrade --major-versions`. Alternatively,
+# dependencies can be manually updated by changing the version numbers below to
+# the latest version available on pub.dev. To see which dependencies have newer
+# versions available, run `flutter pub outdated`.
+dependencies:
+ flutter:
+ sdk: flutter
+
+ flutter_inappwebview_android:
+ # When depending on this package from a real application you should use:
+ # flutter_inappwebview_android: ^x.y.z
+ # See https://dart.dev/tools/pub/dependencies#version-constraints
+ # The example app is bundled with the plugin so we use a path dependency on
+ # the parent directory to use the current plugin's version.
+ path: ../
+
+ # The following adds the Cupertino Icons font to your application.
+ # Use with the CupertinoIcons class for iOS style icons.
+ cupertino_icons: ^1.0.2
+
+dev_dependencies:
+ integration_test:
+ sdk: flutter
+ flutter_test:
+ sdk: flutter
+
+ # The "flutter_lints" package below contains a set of recommended lints to
+ # encourage good coding practices. The lint set provided by the package is
+ # activated in the `analysis_options.yaml` file located at the root of your
+ # package. See that file for information about deactivating specific lint
+ # rules and activating additional ones.
+ flutter_lints: ^2.0.0
+
+# For information on the generic Dart part of this file, see the
+# following page: https://dart.dev/tools/pub/pubspec
+
+# The following section is specific to Flutter packages.
+flutter:
+
+ # The following line ensures that the Material Icons font is
+ # included with your application, so that you can use the icons in
+ # the material Icons class.
+ uses-material-design: true
+
+ # To add assets to your application, add an assets section, like this:
+ # assets:
+ # - images/a_dot_burr.jpeg
+ # - images/a_dot_ham.jpeg
+
+ # An image asset can refer to one or more resolution-specific "variants", see
+ # https://flutter.dev/assets-and-images/#resolution-aware
+
+ # For details regarding adding assets from package dependencies, see
+ # https://flutter.dev/assets-and-images/#from-packages
+
+ # To add custom fonts to your application, add a fonts section here,
+ # in this "flutter" section. Each entry in this list should have a
+ # "family" key with the font family name, and a "fonts" key with a
+ # list giving the asset and other descriptors for the font. For
+ # example:
+ # fonts:
+ # - family: Schyler
+ # fonts:
+ # - asset: fonts/Schyler-Regular.ttf
+ # - asset: fonts/Schyler-Italic.ttf
+ # style: italic
+ # - family: Trajan Pro
+ # fonts:
+ # - asset: fonts/TrajanPro.ttf
+ # - asset: fonts/TrajanPro_Bold.ttf
+ # weight: 700
+ #
+ # For details regarding fonts from package dependencies,
+ # see https://flutter.dev/custom-fonts/#from-packages
diff --git a/flutter_inappwebview_android/example/test/widget_test.dart b/flutter_inappwebview_android/example/test/widget_test.dart
new file mode 100644
index 00000000..60063477
--- /dev/null
+++ b/flutter_inappwebview_android/example/test/widget_test.dart
@@ -0,0 +1,27 @@
+// This is a basic Flutter widget test.
+//
+// To perform an interaction with a widget in your test, use the WidgetTester
+// utility in the flutter_test package. For example, you can send tap and scroll
+// gestures. You can also use WidgetTester to find child widgets in the widget
+// tree, read text, and verify that the values of widget properties are correct.
+
+import 'package:flutter/material.dart';
+import 'package:flutter_test/flutter_test.dart';
+
+import 'package:flutter_inappwebview_android_example/main.dart';
+
+void main() {
+ testWidgets('Verify Platform version', (WidgetTester tester) async {
+ // Build our app and trigger a frame.
+ await tester.pumpWidget(const MyApp());
+
+ // Verify that platform version is retrieved.
+ expect(
+ find.byWidgetPredicate(
+ (Widget widget) => widget is Text &&
+ widget.data!.startsWith('Running on:'),
+ ),
+ findsOneWidget,
+ );
+ });
+}
diff --git a/flutter_inappwebview_android/lib/flutter_inappwebview_android.dart b/flutter_inappwebview_android/lib/flutter_inappwebview_android.dart
new file mode 100644
index 00000000..3f3145f4
--- /dev/null
+++ b/flutter_inappwebview_android/lib/flutter_inappwebview_android.dart
@@ -0,0 +1,3 @@
+library flutter_inappwebview_android;
+
+export 'src/main.dart';
\ No newline at end of file
diff --git a/flutter_inappwebview_android/lib/src/cookie_manager.dart b/flutter_inappwebview_android/lib/src/cookie_manager.dart
new file mode 100755
index 00000000..04e44aa5
--- /dev/null
+++ b/flutter_inappwebview_android/lib/src/cookie_manager.dart
@@ -0,0 +1,575 @@
+import 'dart:async';
+
+import 'package:flutter/foundation.dart';
+import 'package:flutter/services.dart';
+
+import 'package:flutter_inappwebview_platform_interface/flutter_inappwebview_platform_interface.dart';
+
+import 'in_app_webview/headless_in_app_webview.dart';
+import 'platform_util.dart';
+
+/// Object specifying creation parameters for creating a [AndroidCookieManager].
+///
+/// When adding additional fields make sure they can be null or have a default
+/// value to avoid breaking changes. See [PlatformCookieManagerCreationParams] for
+/// more information.
+@immutable
+class AndroidCookieManagerCreationParams
+ extends PlatformCookieManagerCreationParams {
+ /// Creates a new [AndroidCookieManagerCreationParams] instance.
+ const AndroidCookieManagerCreationParams(
+ // This parameter prevents breaking changes later.
+ // ignore: avoid_unused_constructor_parameters
+ PlatformCookieManagerCreationParams params,
+ ) : super();
+
+ /// Creates a [AndroidCookieManagerCreationParams] instance based on [PlatformCookieManagerCreationParams].
+ factory AndroidCookieManagerCreationParams.fromPlatformCookieManagerCreationParams(
+ PlatformCookieManagerCreationParams params) {
+ return AndroidCookieManagerCreationParams(params);
+ }
+}
+
+///Class that implements a singleton object (shared instance) which manages the cookies used by WebView instances.
+///On Android, it is implemented using [CookieManager](https://developer.android.com/reference/android/webkit/CookieManager).
+///On iOS, it is implemented using [WKHTTPCookieStore](https://developer.apple.com/documentation/webkit/wkhttpcookiestore).
+///
+///**NOTE for iOS below 11.0 and Web platform (LIMITED SUPPORT!)**: in this case, almost all of the methods ([AndroidCookieManager.deleteAllCookies] and [AndroidCookieManager.getAllCookies] are not supported!)
+///has been implemented using JavaScript because there is no other way to work with them on iOS below 11.0.
+///See https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies for JavaScript restrictions.
+///
+///**Supported Platforms/Implementations**:
+///- Android native WebView
+///- iOS
+///- MacOS
+///- Web
+class AndroidCookieManager extends PlatformCookieManager
+ with ChannelController {
+ /// Creates a new [AndroidCookieManager].
+ AndroidCookieManager(PlatformCookieManagerCreationParams params)
+ : super.implementation(
+ params is AndroidCookieManagerCreationParams
+ ? params
+ : AndroidCookieManagerCreationParams
+ .fromPlatformCookieManagerCreationParams(params),
+ ) {
+ channel = const MethodChannel(
+ 'com.pichillilorenzo/flutter_inappwebview_cookiemanager');
+ handler = handleMethod;
+ initMethodCallHandler();
+ }
+
+ static AndroidCookieManager? _instance;
+
+ ///Gets the [AndroidCookieManager] shared instance.
+ static AndroidCookieManager instance() {
+ return (_instance != null) ? _instance! : _init();
+ }
+
+ static AndroidCookieManager _init() {
+ _instance = AndroidCookieManager(AndroidCookieManagerCreationParams(
+ const PlatformCookieManagerCreationParams()));
+ return _instance!;
+ }
+
+ Future _handleMethod(MethodCall call) async {}
+
+ ///Sets a cookie for the given [url]. Any existing cookie with the same [host], [path] and [name] will be replaced with the new cookie.
+ ///The cookie being set will be ignored if it is expired.
+ ///
+ ///The default value of [path] is `"/"`.
+ ///
+ ///[webViewController] could be used if you need to set a session-only cookie using JavaScript (so [isHttpOnly] cannot be set, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies)
+ ///on the current URL of the [WebView] managed by that controller when you need to target iOS below 11, MacOS below 10.13 and Web platform. In this case the [url] parameter is ignored.
+ ///
+ ///The return value indicates whether the cookie was set successfully.
+ ///Note that it will return always `true` for Web platform, iOS below 11.0 and MacOS below 10.13.
+ ///
+ ///**NOTE for iOS below 11.0 and MacOS below 10.13**: If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [AndroidHeadlessInAppWebView]
+ ///to set the cookie (session-only cookie won't work! In that case, you should set also [expiresDate] or [maxAge]).
+ ///
+ ///**NOTE for Web**: this method will have effect only if the iframe has the same origin.
+ ///If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [AndroidHeadlessInAppWebView]
+ ///to set the cookie (session-only cookie won't work! In that case, you should set also [expiresDate] or [maxAge]).
+ ///
+ ///**Supported Platforms/Implementations**:
+ ///- Android native WebView ([Official API - CookieManager.setCookie](https://developer.android.com/reference/android/webkit/CookieManager#setCookie(java.lang.String,%20java.lang.String,%20android.webkit.ValueCallback%3Cjava.lang.Boolean%3E)))
+ ///- iOS ([Official API - WKHTTPCookieStore.setCookie](https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882007-setcookie))
+ ///- MacOS ([Official API - WKHTTPCookieStore.setCookie](https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882007-setcookie))
+ ///- Web
+ @override
+ Future setCookie(
+ {required WebUri url,
+ required String name,
+ required String value,
+ String path = "/",
+ String? domain,
+ int? expiresDate,
+ int? maxAge,
+ bool? isSecure,
+ bool? isHttpOnly,
+ HTTPCookieSameSitePolicy? sameSite,
+ @Deprecated("Use webViewController instead")
+ PlatformInAppWebViewController? iosBelow11WebViewController,
+ PlatformInAppWebViewController? webViewController}) async {
+ webViewController = webViewController ?? iosBelow11WebViewController;
+
+ assert(url.toString().isNotEmpty);
+ assert(name.isNotEmpty);
+ assert(value.isNotEmpty);
+ assert(path.isNotEmpty);
+
+ if (await _shouldUseJavascript()) {
+ await _setCookieWithJavaScript(
+ url: url,
+ name: name,
+ value: value,
+ domain: domain,
+ path: path,
+ expiresDate: expiresDate,
+ maxAge: maxAge,
+ isSecure: isSecure,
+ sameSite: sameSite,
+ webViewController: webViewController);
+ return true;
+ }
+
+ Map args = {};
+ args.putIfAbsent('url', () => url.toString());
+ args.putIfAbsent('name', () => name);
+ args.putIfAbsent('value', () => value);
+ args.putIfAbsent('domain', () => domain);
+ args.putIfAbsent('path', () => path);
+ args.putIfAbsent('expiresDate', () => expiresDate?.toString());
+ args.putIfAbsent('maxAge', () => maxAge);
+ args.putIfAbsent('isSecure', () => isSecure);
+ args.putIfAbsent('isHttpOnly', () => isHttpOnly);
+ args.putIfAbsent('sameSite', () => sameSite?.toNativeValue());
+
+ return await channel?.invokeMethod('setCookie', args) ?? false;
+ }
+
+ Future _setCookieWithJavaScript(
+ {required WebUri url,
+ required String name,
+ required String value,
+ String path = "/",
+ String? domain,
+ int? expiresDate,
+ int? maxAge,
+ bool? isSecure,
+ HTTPCookieSameSitePolicy? sameSite,
+ PlatformInAppWebViewController? webViewController}) async {
+ var cookieValue = name + "=" + value + "; Path=" + path;
+
+ if (domain != null) cookieValue += "; Domain=" + domain;
+
+ if (expiresDate != null)
+ cookieValue += "; Expires=" + await _getCookieExpirationDate(expiresDate);
+
+ if (maxAge != null) cookieValue += "; Max-Age=" + maxAge.toString();
+
+ if (isSecure != null && isSecure) cookieValue += "; Secure";
+
+ if (sameSite != null)
+ cookieValue += "; SameSite=" + sameSite.toNativeValue();
+
+ cookieValue += ";";
+
+ if (webViewController != null) {
+ final javaScriptEnabled =
+ (await webViewController.getSettings())?.javaScriptEnabled ?? false;
+ if (javaScriptEnabled) {
+ await webViewController.evaluateJavascript(
+ source: 'document.cookie="$cookieValue"');
+ return;
+ }
+ }
+
+ final setCookieCompleter = Completer();
+ final headlessWebView =
+ AndroidHeadlessInAppWebView(AndroidHeadlessInAppWebViewCreationParams(
+ initialUrlRequest: URLRequest(url: url),
+ onLoadStop: (controller, url) async {
+ await controller.evaluateJavascript(
+ source: 'document.cookie="$cookieValue"');
+ setCookieCompleter.complete();
+ },
+ ));
+ await headlessWebView.run();
+ await setCookieCompleter.future;
+ await headlessWebView.dispose();
+ }
+
+ ///Gets all the cookies for the given [url].
+ ///
+ ///[webViewController] is used for getting the cookies (also session-only cookies) using JavaScript (cookies with `isHttpOnly` enabled cannot be found, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#restrict_access_to_cookies)
+ ///from the current context of the [WebView] managed by that controller when you need to target iOS below 11, MacOS below 10.13 and Web platform. JavaScript must be enabled in order to work.
+ ///In this case the [url] parameter is ignored.
+ ///
+ ///**NOTE for iOS below 11.0 and MacOS below 10.13**: All the cookies returned this way will have all the properties to `null` except for [Cookie.name] and [Cookie.value].
+ ///If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [AndroidHeadlessInAppWebView]
+ ///to get the cookies (session-only cookies and cookies with `isHttpOnly` enabled won't be found!).
+ ///
+ ///**NOTE for Web**: this method will have effect only if the iframe has the same origin.
+ ///If [webViewController] is `null` or JavaScript is disabled for it, it will try to use a [AndroidHeadlessInAppWebView]
+ ///to get the cookies (session-only cookies and cookies with `isHttpOnly` enabled won't be found!).
+ ///
+ ///**Supported Platforms/Implementations**:
+ ///- Android native WebView ([Official API - CookieManager.getCookie](https://developer.android.com/reference/android/webkit/CookieManager#getCookie(java.lang.String)))
+ ///- iOS ([Official API - WKHTTPCookieStore.getAllCookies](https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882005-getallcookies))
+ ///- MacOS ([Official API - WKHTTPCookieStore.getAllCookies](https://developer.apple.com/documentation/webkit/wkhttpcookiestore/2882005-getallcookies))
+ ///- Web
+ @override
+ Future> getCookies(
+ {required WebUri url,
+ @Deprecated("Use webViewController instead")
+ PlatformInAppWebViewController? iosBelow11WebViewController,
+ PlatformInAppWebViewController? webViewController}) async {
+ assert(url.toString().isNotEmpty);
+
+ webViewController = webViewController ?? iosBelow11WebViewController;
+
+ if (await _shouldUseJavascript()) {
+ return await _getCookiesWithJavaScript(
+ url: url, webViewController: webViewController);
+ }
+
+ List cookies = [];
+
+ Map args = {};
+ args.putIfAbsent('url', () => url.toString());
+ List cookieListMap =
+ await channel?.invokeMethod('getCookies', args) ?? [];
+ cookieListMap = cookieListMap.cast