renamed plugin to flutter_inappwebview
This commit is contained in:
parent
6677917bc3
commit
8a356bdef4
|
@ -2,8 +2,8 @@
|
|||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/flutter_inappbrowser.iml" filepath="$PROJECT_DIR$/flutter_inappbrowser.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/flutter_inappbrowser_android.iml" filepath="$PROJECT_DIR$/flutter_inappbrowser_android.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/flutter_inappwebview.iml" filepath="$PROJECT_DIR$/flutter_inappwebview.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/flutter_inappwebview_android.iml" filepath="$PROJECT_DIR$/flutter_inappwebview_android.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
1022
.idea/workspace.xml
1022
.idea/workspace.xml
File diff suppressed because it is too large
Load Diff
60
CHANGELOG.md
60
CHANGELOG.md
|
@ -4,17 +4,17 @@
|
|||
|
||||
## 2.0.0
|
||||
|
||||
- Merge "Avoid null pointer exception after webview is disposed" [#116](https://github.com/pichillilorenzo/flutter_inappbrowser/pull/116) (thanks to [robsonfingo](https://github.com/robsonfingo))
|
||||
- Merge "Remove async call in close" [#119](https://github.com/pichillilorenzo/flutter_inappbrowser/pull/119) (thanks to [benfingo](https://github.com/benfingo))
|
||||
- Merge "Android takeScreenshot does not work properly." [#122](https://github.com/pichillilorenzo/flutter_inappbrowser/pull/122) (thanks to [PauloMelo](https://github.com/PauloMelo))
|
||||
- Merge "Resolving gradle error." [#144](https://github.com/pichillilorenzo/flutter_inappbrowser/pull/144) (thanks to [Klingens13](https://github.com/Klingens13))
|
||||
- Merge "Create issue and pull request templates" [#150](https://github.com/pichillilorenzo/flutter_inappbrowser/pull/150) (thanks to [deandreamatias](https://github.com/deandreamatias))
|
||||
- Merge "Fix abstract method error && swift version error" [#155](https://github.com/pichillilorenzo/flutter_inappbrowser/pull/155) (thanks to [AlexVincent525](https://github.com/AlexVincent525))
|
||||
- Merge "migrating to swift 5.0" [#162](https://github.com/pichillilorenzo/flutter_inappbrowser/pull/162) (thanks to [fattiger00](https://github.com/fattiger00))
|
||||
- Merge "Update readme example" [#178](https://github.com/pichillilorenzo/flutter_inappbrowser/pull/178) (thanks to [SebastienBtr](https://github.com/SebastienBtr))
|
||||
- Merge "handle choose file callback in android" [#183](https://github.com/pichillilorenzo/flutter_inappbrowser/pull/183) (thanks to [crazecoder](https://github.com/crazecoder))
|
||||
- Merge "add initialScale in android" [#186](https://github.com/pichillilorenzo/flutter_inappbrowser/pull/186) (thanks to [crazecoder](https://github.com/crazecoder))
|
||||
- Added `horizontalScrollBarEnabled` and `verticalScrollBarEnabled` options to enable/disable the corresponding scrollbar of the WebView [#165](https://github.com/pichillilorenzo/flutter_inappbrowser/issues/165)
|
||||
- Merge "Avoid null pointer exception after webview is disposed" [#116](https://github.com/pichillilorenzo/flutter_inappwebview/pull/116) (thanks to [robsonfingo](https://github.com/robsonfingo))
|
||||
- Merge "Remove async call in close" [#119](https://github.com/pichillilorenzo/flutter_inappwebview/pull/119) (thanks to [benfingo](https://github.com/benfingo))
|
||||
- Merge "Android takeScreenshot does not work properly." [#122](https://github.com/pichillilorenzo/flutter_inappwebview/pull/122) (thanks to [PauloMelo](https://github.com/PauloMelo))
|
||||
- Merge "Resolving gradle error." [#144](https://github.com/pichillilorenzo/flutter_inappwebview/pull/144) (thanks to [Klingens13](https://github.com/Klingens13))
|
||||
- Merge "Create issue and pull request templates" [#150](https://github.com/pichillilorenzo/flutter_inappwebview/pull/150) (thanks to [deandreamatias](https://github.com/deandreamatias))
|
||||
- Merge "Fix abstract method error && swift version error" [#155](https://github.com/pichillilorenzo/flutter_inappwebview/pull/155) (thanks to [AlexVincent525](https://github.com/AlexVincent525))
|
||||
- Merge "migrating to swift 5.0" [#162](https://github.com/pichillilorenzo/flutter_inappwebview/pull/162) (thanks to [fattiger00](https://github.com/fattiger00))
|
||||
- Merge "Update readme example" [#178](https://github.com/pichillilorenzo/flutter_inappwebview/pull/178) (thanks to [SebastienBtr](https://github.com/SebastienBtr))
|
||||
- Merge "handle choose file callback in android" [#183](https://github.com/pichillilorenzo/flutter_inappwebview/pull/183) (thanks to [crazecoder](https://github.com/crazecoder))
|
||||
- Merge "add initialScale in android" [#186](https://github.com/pichillilorenzo/flutter_inappwebview/pull/186) (thanks to [crazecoder](https://github.com/crazecoder))
|
||||
- Added `horizontalScrollBarEnabled` and `verticalScrollBarEnabled` options to enable/disable the corresponding scrollbar of the WebView [#165](https://github.com/pichillilorenzo/flutter_inappwebview/issues/165)
|
||||
- Added `onDownloadStart` event and `useOnDownloadStart` option: event fires when the WebView recognizes and starts a downloadable file.
|
||||
- Added `onLoadResourceCustomScheme` event and `resourceCustomSchemes` option to set custom schemes that WebView must handle to load resources
|
||||
- Added `onTargetBlank` event and `useOnTargetBlank` option to manage links with `target="_blank"`
|
||||
|
@ -52,37 +52,37 @@
|
|||
|
||||
## 1.2.2
|
||||
|
||||
- Merge "added a shared WKProcessPool for webview instances" [#198](https://github.com/pichillilorenzo/flutter_inappbrowser/pull/198) (thanks to [robertcnst](https://github.com/robertcnst))
|
||||
- Merge "added a shared WKProcessPool for webview instances" [#198](https://github.com/pichillilorenzo/flutter_inappwebview/pull/198) (thanks to [robertcnst](https://github.com/robertcnst))
|
||||
- Fixed iOS setCookie.
|
||||
|
||||
## 1.2.1
|
||||
|
||||
- Merge "Add new option to control the contentMode in Android platform" [#101](https://github.com/pichillilorenzo/flutter_inappbrowser/pull/101) (thanks to [DreamBuddy](https://github.com/DreamBuddy))
|
||||
- Merge "Fix crash on xcode 10.2" [#107](https://github.com/pichillilorenzo/flutter_inappbrowser/pull/107) (thanks to [robsonfingo](https://github.com/robsonfingo))
|
||||
- Merge "Remove headers_build_phase from example's Podfile" [#108](https://github.com/pichillilorenzo/flutter_inappbrowser/pull/108) (thanks to [robsonfingo](https://github.com/robsonfingo))
|
||||
- Fixed "Make html5 video fullscreen" for Android [#43](https://github.com/pichillilorenzo/flutter_inappbrowser/issues/43)
|
||||
- Fixed "AllowsInlineMediaPlayback not working" for iOS [#73](https://github.com/pichillilorenzo/flutter_inappbrowser/issues/73)
|
||||
- Merge "Add new option to control the contentMode in Android platform" [#101](https://github.com/pichillilorenzo/flutter_inappwebview/pull/101) (thanks to [DreamBuddy](https://github.com/DreamBuddy))
|
||||
- Merge "Fix crash on xcode 10.2" [#107](https://github.com/pichillilorenzo/flutter_inappwebview/pull/107) (thanks to [robsonfingo](https://github.com/robsonfingo))
|
||||
- Merge "Remove headers_build_phase from example's Podfile" [#108](https://github.com/pichillilorenzo/flutter_inappwebview/pull/108) (thanks to [robsonfingo](https://github.com/robsonfingo))
|
||||
- Fixed "Make html5 video fullscreen" for Android [#43](https://github.com/pichillilorenzo/flutter_inappwebview/issues/43)
|
||||
- Fixed "AllowsInlineMediaPlayback not working" for iOS [#73](https://github.com/pichillilorenzo/flutter_inappwebview/issues/73)
|
||||
|
||||
## 1.2.0
|
||||
|
||||
- Merge "Adds a transparentBackground option for iOS and Android" [#86](https://github.com/pichillilorenzo/flutter_inappbrowser/pull/86) (thanks to [matthewlloyd](https://github.com/matthewlloyd))
|
||||
- Merge "The 'open' method requires an options dictionary" [#87](https://github.com/pichillilorenzo/flutter_inappbrowser/pull/87) (thanks to [matthewlloyd](https://github.com/matthewlloyd))
|
||||
- Merge "iOS: Call setNeedsLayout() in scrollViewDidScroll()" [#88](https://github.com/pichillilorenzo/flutter_inappbrowser/pull/88) (thanks to [matthewlloyd](https://github.com/matthewlloyd))
|
||||
- Fixed "java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread." [#98](https://github.com/pichillilorenzo/flutter_inappbrowser/issues/98) (thanks to [DreamBuddy](https://github.com/DreamBuddy))
|
||||
- Fixed "app force close/crash when enabling zoom and repeatedly changing orientation and zoomin zoomout" [#93](https://github.com/pichillilorenzo/flutter_inappbrowser/issues/93)
|
||||
- Merge "Adds a transparentBackground option for iOS and Android" [#86](https://github.com/pichillilorenzo/flutter_inappwebview/pull/86) (thanks to [matthewlloyd](https://github.com/matthewlloyd))
|
||||
- Merge "The 'open' method requires an options dictionary" [#87](https://github.com/pichillilorenzo/flutter_inappwebview/pull/87) (thanks to [matthewlloyd](https://github.com/matthewlloyd))
|
||||
- Merge "iOS: Call setNeedsLayout() in scrollViewDidScroll()" [#88](https://github.com/pichillilorenzo/flutter_inappwebview/pull/88) (thanks to [matthewlloyd](https://github.com/matthewlloyd))
|
||||
- Fixed "java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread." [#98](https://github.com/pichillilorenzo/flutter_inappwebview/issues/98) (thanks to [DreamBuddy](https://github.com/DreamBuddy))
|
||||
- Fixed "app force close/crash when enabling zoom and repeatedly changing orientation and zoomin zoomout" [#93](https://github.com/pichillilorenzo/flutter_inappwebview/issues/93)
|
||||
- Added `displayZoomControls` webview option for Android
|
||||
- Fixed "Compatibility with other plugins" [#80](https://github.com/pichillilorenzo/flutter_inappbrowser/issues/80)
|
||||
- Fixed "Compatibility with other plugins" [#80](https://github.com/pichillilorenzo/flutter_inappwebview/issues/80)
|
||||
|
||||
## 1.1.3
|
||||
|
||||
- Merge "Add null checks around calls to InAppWebView callbacks" [#85](https://github.com/pichillilorenzo/flutter_inappbrowser/pull/85) (thanks to [matthewlloyd](https://github.com/matthewlloyd))
|
||||
- Merge "Add null checks around calls to InAppWebView callbacks" [#85](https://github.com/pichillilorenzo/flutter_inappwebview/pull/85) (thanks to [matthewlloyd](https://github.com/matthewlloyd))
|
||||
|
||||
## 1.1.2
|
||||
|
||||
- Fix InAppBrowser crashes the app when i change the page "Lost connection" [#74](https://github.com/pichillilorenzo/flutter_inappbrowser/issues/74)
|
||||
- Fix javascript `...args` parameter of `window.flutter_inappbrowser.callHandler()`
|
||||
- Merge Enable setTextZoom function of Android WebViewSetting [#81](https://github.com/pichillilorenzo/flutter_inappbrowser/pull/81) (thanks to [YouCii](https://github.com/YouCii))
|
||||
- Merge bug fix for android build: Android dependency 'androidx.core:core' has different version for the compile (1.0.0) and runtime (1.0.1) classpath [#83](https://github.com/pichillilorenzo/flutter_inappbrowser/pull/83) (thanks to [cinos1](https://github.com/cinos1))
|
||||
- Fix InAppBrowser crashes the app when i change the page "Lost connection" [#74](https://github.com/pichillilorenzo/flutter_inappwebview/issues/74)
|
||||
- Fix javascript `...args` parameter of `window.flutter_inappwebview.callHandler()`
|
||||
- Merge Enable setTextZoom function of Android WebViewSetting [#81](https://github.com/pichillilorenzo/flutter_inappwebview/pull/81) (thanks to [YouCii](https://github.com/YouCii))
|
||||
- Merge bug fix for android build: Android dependency 'androidx.core:core' has different version for the compile (1.0.0) and runtime (1.0.1) classpath [#83](https://github.com/pichillilorenzo/flutter_inappwebview/pull/83) (thanks to [cinos1](https://github.com/cinos1))
|
||||
|
||||
## 1.1.1
|
||||
|
||||
|
@ -91,8 +91,8 @@
|
|||
## 1.1.0
|
||||
|
||||
- Breaking change for `addJavaScriptHandler` and `removeJavaScriptHandler` methods.
|
||||
- `addJavaScriptHandler` method can return data to JavaScript using `Promise` [#46](https://github.com/pichillilorenzo/flutter_inappbrowser/issues/46)
|
||||
- added `flutterInAppBrowserPlatformReady` JavaScript event to wait until the platform is ready [#64](https://github.com/pichillilorenzo/flutter_inappbrowser/issues/64)
|
||||
- `addJavaScriptHandler` method can return data to JavaScript using `Promise` [#46](https://github.com/pichillilorenzo/flutter_inappwebview/issues/46)
|
||||
- added `flutterInAppBrowserPlatformReady` JavaScript event to wait until the platform is ready [#64](https://github.com/pichillilorenzo/flutter_inappwebview/issues/64)
|
||||
|
||||
## 1.0.1
|
||||
|
||||
|
|
34
README.md
34
README.md
|
@ -1,6 +1,6 @@
|
|||
# Flutter InAppBrowser Plugin [![Share on Twitter](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Flutter%20InAppBrowser%20plugin!&url=https://github.com/pichillilorenzo/flutter_inappbrowser&hashtags=flutter,flutterio,dart,dartlang,webview) [![Share on Facebook](https://img.shields.io/badge/share-facebook-blue.svg?longCache=true&style=flat&colorB=%234267b2)](https://www.facebook.com/sharer/sharer.php?u=https%3A//github.com/pichillilorenzo/flutter_inappbrowser)
|
||||
# Flutter InAppBrowser Plugin [![Share on Twitter](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Flutter%20InAppBrowser%20plugin!&url=https://github.com/pichillilorenzo/flutter_inappwebview&hashtags=flutter,flutterio,dart,dartlang,webview) [![Share on Facebook](https://img.shields.io/badge/share-facebook-blue.svg?longCache=true&style=flat&colorB=%234267b2)](https://www.facebook.com/sharer/sharer.php?u=https%3A//github.com/pichillilorenzo/flutter_inappwebview)
|
||||
|
||||
[![Pub](https://img.shields.io/pub/v/flutter_inappbrowser.svg)](https://pub.dartlang.org/packages/flutter_inappbrowser)
|
||||
[![Pub](https://img.shields.io/pub/v/flutter_inappwebview.svg)](https://pub.dartlang.org/packages/flutter_inappwebview)
|
||||
[![Awesome Flutter](https://img.shields.io/badge/Awesome-Flutter-blue.svg?longCache=true&style=flat-square)](https://stackoverflow.com/questions/tagged/flutter?sort=votes)
|
||||
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](/LICENSE)
|
||||
|
||||
|
@ -26,11 +26,11 @@ Because of [Flutter AndroidX compatibility](https://flutter.dev/docs/development
|
|||
|
||||
If you are starting a new fresh app, you need to create the Flutter App with `flutter create -i swift` (see [flutter/flutter#13422 (comment)](https://github.com/flutter/flutter/issues/13422#issuecomment-392133780)), otherwise, you will get this message:
|
||||
```
|
||||
=== BUILD TARGET flutter_inappbrowser OF PROJECT Pods WITH CONFIGURATION Debug ===
|
||||
=== BUILD TARGET flutter_inappwebview OF PROJECT Pods WITH CONFIGURATION Debug ===
|
||||
The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. Supported values are: 3.0, 4.0, 4.2, 5.0. This setting can be set in the build settings editor.
|
||||
```
|
||||
|
||||
If you still have this problem, try to edit iOS `Podfile` like this (see [#15](https://github.com/pichillilorenzo/flutter_inappbrowser/issues/15)):
|
||||
If you still have this problem, try to edit iOS `Podfile` like this (see [#15](https://github.com/pichillilorenzo/flutter_inappwebview/issues/15)):
|
||||
```
|
||||
target 'Runner' do
|
||||
use_frameworks! # required by simple_permission
|
||||
|
@ -58,7 +58,7 @@ For help on editing plugin code, view the [documentation](https://flutter.io/dev
|
|||
|
||||
## Installation
|
||||
|
||||
First, add `flutter_inappbrowser` as a [dependency in your pubspec.yaml file](https://flutter.io/using-packages/).
|
||||
First, add `flutter_inappwebview` as a [dependency in your pubspec.yaml file](https://flutter.io/using-packages/).
|
||||
|
||||
## Usage
|
||||
|
||||
|
@ -72,7 +72,7 @@ Classes:
|
|||
|
||||
## API Reference
|
||||
|
||||
See the online [API Reference](https://pub.dartlang.org/documentation/flutter_inappbrowser/latest/) to get the full documentation.
|
||||
See the online [API Reference](https://pub.dartlang.org/documentation/flutter_inappwebview/latest/) to get the full documentation.
|
||||
|
||||
### Load a file inside `assets` folder
|
||||
|
||||
|
@ -113,7 +113,7 @@ Example:
|
|||
```dart
|
||||
import 'dart:async';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
Future main() async {
|
||||
runApp(new MyApp());
|
||||
|
@ -290,30 +290,30 @@ Screenshots:
|
|||
The Android implementation uses [addJavascriptInterface](https://developer.android.com/reference/android/webkit/WebView#addJavascriptInterface(java.lang.Object,%20java.lang.String)).
|
||||
The iOS implementation uses [addScriptMessageHandler](https://developer.apple.com/documentation/webkit/wkusercontentcontroller/1537172-addscriptmessagehandler?language=objc)
|
||||
|
||||
The JavaScript function that can be used to call the handler is `window.flutter_inappbrowser.callHandler(handlerName <String>, ...args)`, where `args` are [rest parameters](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters).
|
||||
The JavaScript function that can be used to call the handler is `window.flutter_inappwebview.callHandler(handlerName <String>, ...args)`, where `args` are [rest parameters](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters).
|
||||
The `args` will be stringified automatically using `JSON.stringify(args)` method and then they will be decoded on the Dart side.
|
||||
|
||||
In order to call `window.flutter_inappbrowser.callHandler(handlerName <String>, ...args)` properly, you need to wait and listen the JavaScript event `flutterInAppBrowserPlatformReady`.
|
||||
In order to call `window.flutter_inappwebview.callHandler(handlerName <String>, ...args)` properly, you need to wait and listen the JavaScript event `flutterInAppWebViewPlatformReady`.
|
||||
This event will be dispatched as soon as the platform (Android or iOS) is ready to handle the `callHandler` method.
|
||||
```javascript
|
||||
window.addEventListener("flutterInAppBrowserPlatformReady", function(event) {
|
||||
window.addEventListener("flutterInAppWebViewPlatformReady", function(event) {
|
||||
console.log("ready");
|
||||
});
|
||||
```
|
||||
|
||||
`window.flutter_inappbrowser.callHandler` returns a JavaScript [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)
|
||||
`window.flutter_inappwebview.callHandler` returns a JavaScript [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)
|
||||
that can be used to get the json result returned by [JavaScriptHandlerCallback].
|
||||
In this case, simply return data that you want to send and it will be automatically json encoded using [jsonEncode] from the `dart:convert` library.
|
||||
|
||||
So, on the JavaScript side, to get data coming from the Dart side, you will use:
|
||||
```html
|
||||
<script>
|
||||
window.addEventListener("flutterInAppBrowserPlatformReady", function(event) {
|
||||
window.flutter_inappbrowser.callHandler('handlerFoo').then(function(result) {
|
||||
window.addEventListener("flutterInAppWebViewPlatformReady", function(event) {
|
||||
window.flutter_inappwebview.callHandler('handlerFoo').then(function(result) {
|
||||
console.log(result);
|
||||
});
|
||||
|
||||
window.flutter_inappbrowser.callHandler('handlerFooWithArgs', 1, true, ['bar', 5], {foo: 'baz'}).then(function(result) {
|
||||
window.flutter_inappwebview.callHandler('handlerFooWithArgs', 1, true, ['bar', 5], {foo: 'baz'}).then(function(result) {
|
||||
console.log(result);
|
||||
});
|
||||
});
|
||||
|
@ -324,7 +324,7 @@ Instead, on the `onLoadStop` WebView event, you can use `callHandler` directly:
|
|||
```dart
|
||||
// Inject JavaScript that will receive data back from Flutter
|
||||
inAppWebViewController.evaluateJavascript(source: """
|
||||
window.flutter_inappbrowser.callHandler('test', 'Text from Javascript').then(function(result) {
|
||||
window.flutter_inappwebview.callHandler('test', 'Text from Javascript').then(function(result) {
|
||||
console.log(result);
|
||||
});
|
||||
""");
|
||||
|
@ -459,7 +459,7 @@ Create a Class that extends the `InAppBrowser` Class in order to override the ca
|
|||
Example:
|
||||
```dart
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
class MyInAppBrowser extends InAppBrowser {
|
||||
@override
|
||||
|
@ -626,7 +626,7 @@ You can initialize the `ChromeSafariBrowser` instance with an `InAppBrowser` fal
|
|||
Create a Class that extends the `ChromeSafariBrowser` Class in order to override the callbacks to manage the browser events. Example:
|
||||
```dart
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
class MyInAppBrowser extends InAppBrowser {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
group 'com.pichillilorenzo.flutter_inappbrowser'
|
||||
group 'com.pichillilorenzo.flutter_inappwebview'
|
||||
version '1.0-SNAPSHOT'
|
||||
|
||||
buildscript {
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
public boolean *(android.webkit.WebView, java.lang.String);
|
||||
public void *(android.webkit.webView, jav.lang.String);
|
||||
}
|
||||
-keepclassmembers class com.pichillilorenzo.flutter_inappbrowser$JavaScriptBridgeInterface {
|
||||
-keepclassmembers class flutter_inappwebview$JavaScriptBridgeInterface {
|
||||
<fields>;
|
||||
<methods>;
|
||||
public *;
|
||||
private *;
|
||||
}
|
||||
-keep class com.pichillilorenzo.flutter_inappbrowser.** { *; }
|
||||
-keep class flutter_inappwebview.** { *; }
|
|
@ -1 +1 @@
|
|||
rootProject.name = 'flutter_inappbrowser'
|
||||
rootProject.name = 'flutter_inappwebview'
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.pichillilorenzo.flutter_inappbrowser">
|
||||
package="com.pichillilorenzo.flutter_inappwebview">
|
||||
<application>
|
||||
<activity android:theme="@style/AppTheme" android:name=".InAppBrowserActivity" android:configChanges="orientation|screenSize"></activity>
|
||||
<activity android:theme="@style/ThemeTransparent" android:name=".ChromeCustomTabs.ChromeCustomTabsActivity" android:configChanges="orientation|screenSize"></activity>
|
||||
<activity android:theme="@style/AppTheme" android:name="com.pichillilorenzo.flutter_inappwebview.InAppBrowserActivity" android:configChanges="orientation|screenSize"></activity>
|
||||
<activity android:theme="@style/ThemeTransparent" android:name="com.pichillilorenzo.flutter_inappwebview.ChromeCustomTabs.ChromeCustomTabsActivity" android:configChanges="orientation|screenSize"></activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser.ChromeCustomTabs;
|
||||
package com.pichillilorenzo.flutter_inappwebview.ChromeCustomTabs;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
|
@ -7,8 +7,8 @@ import android.net.Uri;
|
|||
import android.os.Bundle;
|
||||
import androidx.browser.customtabs.CustomTabsIntent;
|
||||
|
||||
import com.pichillilorenzo.flutter_inappbrowser.InAppBrowserFlutterPlugin;
|
||||
import com.pichillilorenzo.flutter_inappbrowser.R;
|
||||
import com.pichillilorenzo.flutter_inappwebview.InAppWebViewFlutterPlugin;
|
||||
import com.pichillilorenzo.flutter_inappwebview.R;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
@ -36,7 +36,7 @@ public class ChromeCustomTabsActivity extends Activity {
|
|||
options = new ChromeCustomTabsOptions();
|
||||
options.parse((HashMap<String, Object>) b.getSerializable("options"));
|
||||
|
||||
InAppBrowserFlutterPlugin.inAppBrowser.chromeCustomTabsActivities.put(uuid, this);
|
||||
InAppWebViewFlutterPlugin.inAppBrowser.chromeCustomTabsActivities.put(uuid, this);
|
||||
|
||||
customTabActivityHelper = new CustomTabActivityHelper();
|
||||
builder = new CustomTabsIntent.Builder();
|
||||
|
@ -49,8 +49,8 @@ public class ChromeCustomTabsActivity extends Activity {
|
|||
|
||||
Map<String, Object> obj = new HashMap<>();
|
||||
obj.put("uuid", uuid);
|
||||
InAppBrowserFlutterPlugin.inAppBrowser.channel.invokeMethod("onChromeSafariBrowserOpened", obj);
|
||||
InAppBrowserFlutterPlugin.inAppBrowser.channel.invokeMethod("onChromeSafariBrowserLoaded", obj);
|
||||
InAppWebViewFlutterPlugin.inAppBrowser.channel.invokeMethod("onChromeSafariBrowserOpened", obj);
|
||||
InAppWebViewFlutterPlugin.inAppBrowser.channel.invokeMethod("onChromeSafariBrowserLoaded", obj);
|
||||
}
|
||||
|
||||
private void prepareCustomTabs() {
|
||||
|
@ -86,7 +86,7 @@ public class ChromeCustomTabsActivity extends Activity {
|
|||
finish();
|
||||
Map<String, Object> obj = new HashMap<>();
|
||||
obj.put("uuid", uuid);
|
||||
InAppBrowserFlutterPlugin.inAppBrowser.channel.invokeMethod("onChromeSafariBrowserClosed", obj);
|
||||
InAppWebViewFlutterPlugin.inAppBrowser.channel.invokeMethod("onChromeSafariBrowserClosed", obj);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser.ChromeCustomTabs;
|
||||
package com.pichillilorenzo.flutter_inappwebview.ChromeCustomTabs;
|
||||
|
||||
import com.pichillilorenzo.flutter_inappbrowser.Options;
|
||||
import com.pichillilorenzo.flutter_inappwebview.Options;
|
||||
|
||||
public class ChromeCustomTabsOptions extends Options {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser.ChromeCustomTabs;
|
||||
package com.pichillilorenzo.flutter_inappwebview.ChromeCustomTabs;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.net.Uri;
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser.ChromeCustomTabs;
|
||||
package com.pichillilorenzo.flutter_inappwebview.ChromeCustomTabs;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser.ChromeCustomTabs;
|
||||
package com.pichillilorenzo.flutter_inappwebview.ChromeCustomTabs;
|
||||
|
||||
import android.app.Service;
|
||||
import android.content.Intent;
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser.ChromeCustomTabs;
|
||||
package com.pichillilorenzo.flutter_inappwebview.ChromeCustomTabs;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import androidx.browser.customtabs.CustomTabsClient;
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser.ChromeCustomTabs;
|
||||
package com.pichillilorenzo.flutter_inappwebview.ChromeCustomTabs;
|
||||
|
||||
import androidx.browser.customtabs.CustomTabsClient;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser.ContentBlocker;
|
||||
package com.pichillilorenzo.flutter_inappwebview.ContentBlocker;
|
||||
|
||||
public class ContentBlocker {
|
||||
public ContentBlockerTrigger trigger;
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser.ContentBlocker;
|
||||
package com.pichillilorenzo.flutter_inappwebview.ContentBlocker;
|
||||
|
||||
import java.util.Map;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser.ContentBlocker;
|
||||
package com.pichillilorenzo.flutter_inappwebview.ContentBlocker;
|
||||
|
||||
public enum ContentBlockerActionType {
|
||||
BLOCK ("block"),
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser.ContentBlocker;
|
||||
package com.pichillilorenzo.flutter_inappwebview.ContentBlocker;
|
||||
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
|
@ -6,8 +6,8 @@ import android.os.Looper;
|
|||
import android.util.Log;
|
||||
import android.webkit.WebResourceResponse;
|
||||
|
||||
import com.pichillilorenzo.flutter_inappbrowser.InAppWebView.InAppWebView;
|
||||
import com.pichillilorenzo.flutter_inappbrowser.Util;
|
||||
import com.pichillilorenzo.flutter_inappwebview.InAppWebView.InAppWebView;
|
||||
import com.pichillilorenzo.flutter_inappwebview.Util;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.InputStream;
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser.ContentBlocker;
|
||||
package com.pichillilorenzo.flutter_inappwebview.ContentBlocker;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser.ContentBlocker;
|
||||
package com.pichillilorenzo.flutter_inappwebview.ContentBlocker;
|
||||
|
||||
public enum ContentBlockerTriggerResourceType {
|
||||
DOCUMENT ("document"),
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser.CredentialDatabase;
|
||||
package com.pichillilorenzo.flutter_inappwebview.CredentialDatabase;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser.CredentialDatabase;
|
||||
package com.pichillilorenzo.flutter_inappwebview.CredentialDatabase;
|
||||
|
||||
import android.provider.BaseColumns;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser.CredentialDatabase;
|
||||
package com.pichillilorenzo.flutter_inappwebview.CredentialDatabase;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.database.Cursor;
|
|
@ -1,7 +1,6 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser.CredentialDatabase;
|
||||
package com.pichillilorenzo.flutter_inappwebview.CredentialDatabase;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser.CredentialDatabase;
|
||||
package com.pichillilorenzo.flutter_inappwebview.CredentialDatabase;
|
||||
|
||||
import android.content.Context;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser.CredentialDatabase;
|
||||
package com.pichillilorenzo.flutter_inappwebview.CredentialDatabase;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser.CredentialDatabase;
|
||||
package com.pichillilorenzo.flutter_inappwebview.CredentialDatabase;
|
||||
|
||||
import android.provider.BaseColumns;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser.CredentialDatabase;
|
||||
package com.pichillilorenzo.flutter_inappwebview.CredentialDatabase;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.database.Cursor;
|
|
@ -1,12 +1,12 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser;
|
||||
package com.pichillilorenzo.flutter_inappwebview;
|
||||
|
||||
import android.os.Build;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import com.pichillilorenzo.flutter_inappbrowser.CredentialDatabase.Credential;
|
||||
import com.pichillilorenzo.flutter_inappbrowser.CredentialDatabase.CredentialDatabase;
|
||||
import com.pichillilorenzo.flutter_inappbrowser.CredentialDatabase.ProtectionSpace;
|
||||
import com.pichillilorenzo.flutter_inappwebview.CredentialDatabase.Credential;
|
||||
import com.pichillilorenzo.flutter_inappwebview.CredentialDatabase.CredentialDatabase;
|
||||
import com.pichillilorenzo.flutter_inappwebview.CredentialDatabase.ProtectionSpace;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
@ -28,7 +28,7 @@ public class CredentialDatabaseHandler implements MethodChannel.MethodCallHandle
|
|||
|
||||
public CredentialDatabaseHandler(PluginRegistry.Registrar r) {
|
||||
registrar = r;
|
||||
channel = new MethodChannel(registrar.messenger(), "com.pichillilorenzo/flutter_inappbrowser_credential_database");
|
||||
channel = new MethodChannel(registrar.messenger(), "com.pichillilorenzo/flutter_inappwebview_credential_database");
|
||||
channel.setMethodCallHandler(this);
|
||||
credentialDatabase = CredentialDatabase.getInstance(registrar.context());
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser;
|
||||
package com.pichillilorenzo.flutter_inappwebview;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
|
@ -10,9 +10,9 @@ import android.webkit.WebChromeClient;
|
|||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
|
||||
import com.pichillilorenzo.flutter_inappbrowser.InAppWebView.DisplayListenerProxy;
|
||||
import com.pichillilorenzo.flutter_inappbrowser.InAppWebView.InAppWebView;
|
||||
import com.pichillilorenzo.flutter_inappbrowser.InAppWebView.InAppWebViewOptions;
|
||||
import com.pichillilorenzo.flutter_inappwebview.InAppWebView.DisplayListenerProxy;
|
||||
import com.pichillilorenzo.flutter_inappwebview.InAppWebView.InAppWebView;
|
||||
import com.pichillilorenzo.flutter_inappwebview.InAppWebView.InAppWebViewOptions;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser;
|
||||
package com.pichillilorenzo.flutter_inappwebview;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
|
@ -19,13 +19,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
package com.pichillilorenzo.flutter_inappbrowser;
|
||||
package com.pichillilorenzo.flutter_inappwebview;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.os.Build;
|
||||
import android.os.Parcelable;
|
||||
import android.provider.Browser;
|
||||
import android.net.Uri;
|
||||
|
@ -35,8 +34,8 @@ import android.webkit.WebView;
|
|||
import android.webkit.WebViewClient;
|
||||
import android.util.Log;
|
||||
|
||||
import com.pichillilorenzo.flutter_inappbrowser.ChromeCustomTabs.ChromeCustomTabsActivity;
|
||||
import com.pichillilorenzo.flutter_inappbrowser.ChromeCustomTabs.CustomTabActivityHelper;
|
||||
import com.pichillilorenzo.flutter_inappwebview.ChromeCustomTabs.ChromeCustomTabsActivity;
|
||||
import com.pichillilorenzo.flutter_inappwebview.ChromeCustomTabs.CustomTabActivityHelper;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
|
@ -45,8 +44,6 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import io.flutter.embedding.engine.plugins.FlutterPlugin;
|
||||
import io.flutter.plugin.common.BinaryMessenger;
|
||||
import io.flutter.plugin.common.MethodCall;
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
import io.flutter.plugin.common.MethodChannel.Result;
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser;
|
||||
package com.pichillilorenzo.flutter_inappwebview;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
|
@ -23,8 +23,8 @@ import android.webkit.WebViewClient;
|
|||
import android.widget.ProgressBar;
|
||||
import android.widget.SearchView;
|
||||
|
||||
import com.pichillilorenzo.flutter_inappbrowser.InAppWebView.InAppWebView;
|
||||
import com.pichillilorenzo.flutter_inappbrowser.InAppWebView.InAppWebViewOptions;
|
||||
import com.pichillilorenzo.flutter_inappwebview.InAppWebView.InAppWebView;
|
||||
import com.pichillilorenzo.flutter_inappwebview.InAppWebView.InAppWebViewOptions;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
|
@ -56,7 +56,7 @@ public class InAppBrowserActivity extends AppCompatActivity {
|
|||
|
||||
webView = findViewById(R.id.webView);
|
||||
webView.inAppBrowserActivity = this;
|
||||
webView.registrar = InAppBrowserFlutterPlugin.inAppBrowser.registrar;
|
||||
webView.registrar = InAppWebViewFlutterPlugin.inAppBrowser.registrar;
|
||||
|
||||
Bundle b = getIntent().getExtras();
|
||||
uuid = b.getString("uuid");
|
||||
|
@ -71,7 +71,7 @@ public class InAppBrowserActivity extends AppCompatActivity {
|
|||
webViewOptions.parse(optionsMap);
|
||||
webView.options = webViewOptions;
|
||||
|
||||
InAppBrowserFlutterPlugin.inAppBrowser.webViewActivities.put(uuid, this);
|
||||
InAppWebViewFlutterPlugin.inAppBrowser.webViewActivities.put(uuid, this);
|
||||
|
||||
actionBar = getSupportActionBar();
|
||||
|
||||
|
@ -93,7 +93,7 @@ public class InAppBrowserActivity extends AppCompatActivity {
|
|||
|
||||
Map<String, Object> obj = new HashMap<>();
|
||||
obj.put("uuid", uuid);
|
||||
InAppBrowserFlutterPlugin.inAppBrowser.channel.invokeMethod("onBrowserCreated", obj);
|
||||
InAppWebViewFlutterPlugin.inAppBrowser.channel.invokeMethod("onBrowserCreated", obj);
|
||||
|
||||
}
|
||||
|
||||
|
@ -257,7 +257,7 @@ public class InAppBrowserActivity extends AppCompatActivity {
|
|||
if (canGoBack())
|
||||
goBack();
|
||||
else if (options.closeOnCannotGoBack)
|
||||
InAppBrowserFlutterPlugin.inAppBrowser.close(this, uuid, null);
|
||||
InAppWebViewFlutterPlugin.inAppBrowser.close(this, uuid, null);
|
||||
return true;
|
||||
}
|
||||
return super.onKeyDown(keyCode, event);
|
||||
|
@ -356,7 +356,7 @@ public class InAppBrowserActivity extends AppCompatActivity {
|
|||
}
|
||||
|
||||
public void closeButtonClicked(MenuItem item) {
|
||||
InAppBrowserFlutterPlugin.inAppBrowser.close(this, uuid, null);
|
||||
InAppWebViewFlutterPlugin.inAppBrowser.close(this, uuid, null);
|
||||
}
|
||||
|
||||
public byte[] takeScreenshot() {
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser;
|
||||
package com.pichillilorenzo.flutter_inappwebview;
|
||||
|
||||
public class InAppBrowserOptions extends Options {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser.InAppWebView;
|
||||
package com.pichillilorenzo.flutter_inappwebview.InAppWebView;
|
||||
|
||||
import static android.hardware.display.DisplayManager.DisplayListener;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser.InAppWebView;
|
||||
package com.pichillilorenzo.flutter_inappwebview.InAppWebView;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
|
@ -17,15 +17,15 @@ import android.webkit.WebBackForwardList;
|
|||
import android.webkit.WebHistoryItem;
|
||||
import android.webkit.WebSettings;
|
||||
|
||||
import com.pichillilorenzo.flutter_inappbrowser.ContentBlocker.ContentBlocker;
|
||||
import com.pichillilorenzo.flutter_inappbrowser.ContentBlocker.ContentBlockerAction;
|
||||
import com.pichillilorenzo.flutter_inappbrowser.ContentBlocker.ContentBlockerHandler;
|
||||
import com.pichillilorenzo.flutter_inappbrowser.ContentBlocker.ContentBlockerTrigger;
|
||||
import com.pichillilorenzo.flutter_inappbrowser.FlutterWebView;
|
||||
import com.pichillilorenzo.flutter_inappbrowser.InAppBrowserActivity;
|
||||
import com.pichillilorenzo.flutter_inappbrowser.InAppBrowserFlutterPlugin;
|
||||
import com.pichillilorenzo.flutter_inappbrowser.JavaScriptBridgeInterface;
|
||||
import com.pichillilorenzo.flutter_inappbrowser.Util;
|
||||
import com.pichillilorenzo.flutter_inappwebview.ContentBlocker.ContentBlocker;
|
||||
import com.pichillilorenzo.flutter_inappwebview.ContentBlocker.ContentBlockerAction;
|
||||
import com.pichillilorenzo.flutter_inappwebview.ContentBlocker.ContentBlockerHandler;
|
||||
import com.pichillilorenzo.flutter_inappwebview.ContentBlocker.ContentBlockerTrigger;
|
||||
import com.pichillilorenzo.flutter_inappwebview.FlutterWebView;
|
||||
import com.pichillilorenzo.flutter_inappwebview.InAppBrowserActivity;
|
||||
import com.pichillilorenzo.flutter_inappwebview.InAppWebViewFlutterPlugin;
|
||||
import com.pichillilorenzo.flutter_inappwebview.JavaScriptBridgeInterface;
|
||||
import com.pichillilorenzo.flutter_inappwebview.Util;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
|
@ -38,7 +38,7 @@ import io.flutter.plugin.common.MethodChannel;
|
|||
import io.flutter.plugin.common.PluginRegistry;
|
||||
import okhttp3.OkHttpClient;
|
||||
|
||||
import static com.pichillilorenzo.flutter_inappbrowser.InAppWebView.PreferredContentModeOptionType.*;
|
||||
import static com.pichillilorenzo.flutter_inappwebview.InAppWebView.PreferredContentModeOptionType.*;
|
||||
|
||||
final public class InAppWebView extends InputAwareWebView {
|
||||
|
||||
|
@ -83,9 +83,9 @@ final public class InAppWebView extends InputAwareWebView {
|
|||
" }" +
|
||||
"})(window.console);";
|
||||
|
||||
static final String platformReadyJS = "window.dispatchEvent(new Event('flutterInAppBrowserPlatformReady'));";
|
||||
static final String platformReadyJS = "window.dispatchEvent(new Event('flutterInAppWebViewPlatformReady'));";
|
||||
|
||||
static final String variableForOnLoadResourceJS = "window._flutter_inappbrowser_useOnLoadResource";
|
||||
static final String variableForOnLoadResourceJS = "window._flutter_inappwebview_useOnLoadResource";
|
||||
static final String enableVariableForOnLoadResourceJS = variableForOnLoadResourceJS + " = $PLACEHOLDER_VALUE;";
|
||||
|
||||
static final String resourceObserverJS = "(function() {" +
|
||||
|
@ -99,21 +99,21 @@ final public class InAppWebView extends InputAwareWebView {
|
|||
" observer.observe({entryTypes: ['resource']});" +
|
||||
"})();";
|
||||
|
||||
static final String variableForShouldInterceptAjaxRequestJS = "window._flutter_inappbrowser_useShouldInterceptAjaxRequest";
|
||||
static final String variableForShouldInterceptAjaxRequestJS = "window._flutter_inappwebview_useShouldInterceptAjaxRequest";
|
||||
static final String enableVariableForShouldInterceptAjaxRequestJS = variableForShouldInterceptAjaxRequestJS + " = $PLACEHOLDER_VALUE;";
|
||||
|
||||
static final String interceptAjaxRequestsJS = "(function(ajax) {" +
|
||||
" var send = ajax.prototype.send;" +
|
||||
" var open = ajax.prototype.open;" +
|
||||
" var setRequestHeader = ajax.prototype.setRequestHeader;" +
|
||||
" ajax.prototype._flutter_inappbrowser_url = null;" +
|
||||
" ajax.prototype._flutter_inappbrowser_method = null;" +
|
||||
" ajax.prototype._flutter_inappbrowser_isAsync = null;" +
|
||||
" ajax.prototype._flutter_inappbrowser_user = null;" +
|
||||
" ajax.prototype._flutter_inappbrowser_password = null;" +
|
||||
" ajax.prototype._flutter_inappbrowser_password = null;" +
|
||||
" ajax.prototype._flutter_inappbrowser_already_onreadystatechange_wrapped = false;" +
|
||||
" ajax.prototype._flutter_inappbrowser_request_headers = {};" +
|
||||
" ajax.prototype._flutter_inappwebview_url = null;" +
|
||||
" ajax.prototype._flutter_inappwebview_method = null;" +
|
||||
" ajax.prototype._flutter_inappwebview_isAsync = null;" +
|
||||
" ajax.prototype._flutter_inappwebview_user = null;" +
|
||||
" ajax.prototype._flutter_inappwebview_password = null;" +
|
||||
" ajax.prototype._flutter_inappwebview_password = null;" +
|
||||
" ajax.prototype._flutter_inappwebview_already_onreadystatechange_wrapped = false;" +
|
||||
" ajax.prototype._flutter_inappwebview_request_headers = {};" +
|
||||
" function convertRequestResponse(request, callback) {" +
|
||||
" if (request.response != null && request.responseType != null) {" +
|
||||
" switch (request.responseType) {" +
|
||||
|
@ -139,16 +139,16 @@ final public class InAppWebView extends InputAwareWebView {
|
|||
" };" +
|
||||
" ajax.prototype.open = function(method, url, isAsync, user, password) {" +
|
||||
" isAsync = (isAsync != null) ? isAsync : true;" +
|
||||
" this._flutter_inappbrowser_url = url;" +
|
||||
" this._flutter_inappbrowser_method = method;" +
|
||||
" this._flutter_inappbrowser_isAsync = isAsync;" +
|
||||
" this._flutter_inappbrowser_user = user;" +
|
||||
" this._flutter_inappbrowser_password = password;" +
|
||||
" this._flutter_inappbrowser_request_headers = {};" +
|
||||
" this._flutter_inappwebview_url = url;" +
|
||||
" this._flutter_inappwebview_method = method;" +
|
||||
" this._flutter_inappwebview_isAsync = isAsync;" +
|
||||
" this._flutter_inappwebview_user = user;" +
|
||||
" this._flutter_inappwebview_password = password;" +
|
||||
" this._flutter_inappwebview_request_headers = {};" +
|
||||
" open.call(this, method, url, isAsync, user, password);" +
|
||||
" };" +
|
||||
" ajax.prototype.setRequestHeader = function(header, value) {" +
|
||||
" this._flutter_inappbrowser_request_headers[header] = value;" +
|
||||
" this._flutter_inappwebview_request_headers[header] = value;" +
|
||||
" setRequestHeader.call(this, header, value);" +
|
||||
" };" +
|
||||
" function handleEvent(e) {" +
|
||||
|
@ -167,13 +167,13 @@ final public class InAppWebView extends InputAwareWebView {
|
|||
" }" +
|
||||
" convertRequestResponse(this, function(response) {" +
|
||||
" var ajaxRequest = {" +
|
||||
" method: self._flutter_inappbrowser_method," +
|
||||
" url: self._flutter_inappbrowser_url," +
|
||||
" isAsync: self._flutter_inappbrowser_isAsync," +
|
||||
" user: self._flutter_inappbrowser_user," +
|
||||
" password: self._flutter_inappbrowser_password," +
|
||||
" method: self._flutter_inappwebview_method," +
|
||||
" url: self._flutter_inappwebview_url," +
|
||||
" isAsync: self._flutter_inappwebview_isAsync," +
|
||||
" user: self._flutter_inappwebview_user," +
|
||||
" password: self._flutter_inappwebview_password," +
|
||||
" withCredentials: self.withCredentials," +
|
||||
" headers: self._flutter_inappbrowser_request_headers," +
|
||||
" headers: self._flutter_inappwebview_request_headers," +
|
||||
" readyState: self.readyState," +
|
||||
" status: self.status," +
|
||||
" responseURL: self.responseURL," +
|
||||
|
@ -205,8 +205,8 @@ final public class InAppWebView extends InputAwareWebView {
|
|||
" ajax.prototype.send = function(data) {" +
|
||||
" var self = this;" +
|
||||
" if (window." + variableForShouldInterceptAjaxRequestJS + " == null || window." + variableForShouldInterceptAjaxRequestJS + " == true) {" +
|
||||
" if (!this._flutter_inappbrowser_already_onreadystatechange_wrapped) {" +
|
||||
" this._flutter_inappbrowser_already_onreadystatechange_wrapped = true;" +
|
||||
" if (!this._flutter_inappwebview_already_onreadystatechange_wrapped) {" +
|
||||
" this._flutter_inappwebview_already_onreadystatechange_wrapped = true;" +
|
||||
" var onreadystatechange = this.onreadystatechange;" +
|
||||
" this.onreadystatechange = function() {" +
|
||||
" if (window." + variableForShouldInterceptAjaxRequestJS + " == null || window." + variableForShouldInterceptAjaxRequestJS + " == true) {" +
|
||||
|
@ -223,13 +223,13 @@ final public class InAppWebView extends InputAwareWebView {
|
|||
" }" +
|
||||
" convertRequestResponse(this, function(response) {" +
|
||||
" var ajaxRequest = {" +
|
||||
" method: self._flutter_inappbrowser_method," +
|
||||
" url: self._flutter_inappbrowser_url," +
|
||||
" isAsync: self._flutter_inappbrowser_isAsync," +
|
||||
" user: self._flutter_inappbrowser_user," +
|
||||
" password: self._flutter_inappbrowser_password," +
|
||||
" method: self._flutter_inappwebview_method," +
|
||||
" url: self._flutter_inappwebview_url," +
|
||||
" isAsync: self._flutter_inappwebview_isAsync," +
|
||||
" user: self._flutter_inappwebview_user," +
|
||||
" password: self._flutter_inappwebview_password," +
|
||||
" withCredentials: self.withCredentials," +
|
||||
" headers: self._flutter_inappbrowser_request_headers," +
|
||||
" headers: self._flutter_inappwebview_request_headers," +
|
||||
" readyState: self.readyState," +
|
||||
" status: self.status," +
|
||||
" responseURL: self.responseURL," +
|
||||
|
@ -267,13 +267,13 @@ final public class InAppWebView extends InputAwareWebView {
|
|||
" this.addEventListener('timeout', handleEvent);" +
|
||||
" var ajaxRequest = {" +
|
||||
" data: data," +
|
||||
" method: this._flutter_inappbrowser_method," +
|
||||
" url: this._flutter_inappbrowser_url," +
|
||||
" isAsync: this._flutter_inappbrowser_isAsync," +
|
||||
" user: this._flutter_inappbrowser_user," +
|
||||
" password: this._flutter_inappbrowser_password," +
|
||||
" method: this._flutter_inappwebview_method," +
|
||||
" url: this._flutter_inappwebview_url," +
|
||||
" isAsync: this._flutter_inappwebview_isAsync," +
|
||||
" user: this._flutter_inappwebview_user," +
|
||||
" password: this._flutter_inappwebview_password," +
|
||||
" withCredentials: this.withCredentials," +
|
||||
" headers: this._flutter_inappbrowser_request_headers," +
|
||||
" headers: this._flutter_inappwebview_request_headers," +
|
||||
" responseType: this.responseType" +
|
||||
" };" +
|
||||
" window." + JavaScriptBridgeInterface.name + ".callHandler('shouldInterceptAjaxRequest', ajaxRequest).then(function(result) {" +
|
||||
|
@ -290,15 +290,15 @@ final public class InAppWebView extends InputAwareWebView {
|
|||
" };" +
|
||||
" for (var header in result.headers) {" +
|
||||
" var value = result.headers[header];" +
|
||||
" var flutter_inappbrowser_value = self._flutter_inappbrowser_request_headers[header];" +
|
||||
" if (flutter_inappbrowser_value == null) {" +
|
||||
" self._flutter_inappbrowser_request_headers[header] = value;" +
|
||||
" var flutter_inappwebview_value = self._flutter_inappwebview_request_headers[header];" +
|
||||
" if (flutter_inappwebview_value == null) {" +
|
||||
" self._flutter_inappwebview_request_headers[header] = value;" +
|
||||
" } else {" +
|
||||
" self._flutter_inappbrowser_request_headers[header] += ', ' + value;" +
|
||||
" self._flutter_inappwebview_request_headers[header] += ', ' + value;" +
|
||||
" }" +
|
||||
" setRequestHeader.call(self, header, value);" +
|
||||
" };" +
|
||||
" if ((self._flutter_inappbrowser_method != result.method && result.method != null) || (self._flutter_inappbrowser_url != result.url && result.url != null)) {" +
|
||||
" if ((self._flutter_inappwebview_method != result.method && result.method != null) || (self._flutter_inappwebview_url != result.url && result.url != null)) {" +
|
||||
" self.abort();" +
|
||||
" self.open(result.method, result.url, result.isAsync, result.user, result.password);" +
|
||||
" return;" +
|
||||
|
@ -312,7 +312,7 @@ final public class InAppWebView extends InputAwareWebView {
|
|||
" };" +
|
||||
"})(window.XMLHttpRequest);";
|
||||
|
||||
static final String variableForShouldInterceptFetchRequestsJS = "window._flutter_inappbrowser_useShouldInterceptFetchRequest";
|
||||
static final String variableForShouldInterceptFetchRequestsJS = "window._flutter_inappwebview_useShouldInterceptFetchRequest";
|
||||
static final String enableVariableForShouldInterceptFetchRequestsJS = variableForShouldInterceptFetchRequestsJS + " = $PLACEHOLDER_VALUE;";
|
||||
|
||||
static final String interceptFetchRequestsJS = "(function(fetch) {" +
|
||||
|
@ -1243,7 +1243,7 @@ final public class InAppWebView extends InputAwareWebView {
|
|||
}
|
||||
|
||||
private MethodChannel getChannel() {
|
||||
return (inAppBrowserActivity != null) ? InAppBrowserFlutterPlugin.inAppBrowser.channel : flutterWebView.channel;
|
||||
return (inAppBrowserActivity != null) ? InAppWebViewFlutterPlugin.inAppBrowser.channel : flutterWebView.channel;
|
||||
}
|
||||
|
||||
public void startSafeBrowsing(final MethodChannel.Result result) {
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser.InAppWebView;
|
||||
package com.pichillilorenzo.flutter_inappwebview.InAppWebView;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.ActivityNotFoundException;
|
||||
|
@ -27,10 +27,10 @@ import android.widget.LinearLayout;
|
|||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
|
||||
import com.pichillilorenzo.flutter_inappbrowser.FlutterWebView;
|
||||
import com.pichillilorenzo.flutter_inappbrowser.InAppBrowserActivity;
|
||||
import com.pichillilorenzo.flutter_inappbrowser.InAppBrowserFlutterPlugin;
|
||||
import com.pichillilorenzo.flutter_inappbrowser.R;
|
||||
import com.pichillilorenzo.flutter_inappwebview.FlutterWebView;
|
||||
import com.pichillilorenzo.flutter_inappwebview.InAppBrowserActivity;
|
||||
import com.pichillilorenzo.flutter_inappwebview.InAppWebViewFlutterPlugin;
|
||||
import com.pichillilorenzo.flutter_inappwebview.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
@ -548,7 +548,7 @@ public class InAppWebViewChromeClient extends WebChromeClient implements PluginR
|
|||
|
||||
//For Android 5.0+
|
||||
public boolean onShowFileChooser(WebView webView, ValueCallback<Uri[]> filePathCallback, FileChooserParams fileChooserParams) {
|
||||
InAppBrowserFlutterPlugin.uploadMessageArray = filePathCallback;
|
||||
InAppWebViewFlutterPlugin.uploadMessageArray = filePathCallback;
|
||||
try {
|
||||
Intent contentSelectionIntent = new Intent(Intent.ACTION_GET_CONTENT);
|
||||
contentSelectionIntent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||
|
@ -572,7 +572,7 @@ public class InAppWebViewChromeClient extends WebChromeClient implements PluginR
|
|||
@Override
|
||||
public boolean onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
if (requestCode == FILECHOOSER_RESULTCODE && (resultCode == RESULT_OK || resultCode == RESULT_CANCELED)) {
|
||||
InAppBrowserFlutterPlugin.uploadMessageArray.onReceiveValue(WebChromeClient.FileChooserParams.parseResult(resultCode, data));
|
||||
InAppWebViewFlutterPlugin.uploadMessageArray.onReceiveValue(WebChromeClient.FileChooserParams.parseResult(resultCode, data));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -625,6 +625,6 @@ public class InAppWebViewChromeClient extends WebChromeClient implements PluginR
|
|||
}
|
||||
|
||||
private MethodChannel getChannel() {
|
||||
return (inAppBrowserActivity != null) ? InAppBrowserFlutterPlugin.inAppBrowser.channel : flutterWebView.channel;
|
||||
return (inAppBrowserActivity != null) ? InAppWebViewFlutterPlugin.inAppBrowser.channel : flutterWebView.channel;
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser.InAppWebView;
|
||||
package com.pichillilorenzo.flutter_inappwebview.InAppWebView;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
|
@ -22,13 +22,13 @@ import android.webkit.WebViewClient;
|
|||
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import com.pichillilorenzo.flutter_inappbrowser.CredentialDatabase.Credential;
|
||||
import com.pichillilorenzo.flutter_inappbrowser.CredentialDatabase.CredentialDatabase;
|
||||
import com.pichillilorenzo.flutter_inappbrowser.FlutterWebView;
|
||||
import com.pichillilorenzo.flutter_inappbrowser.InAppBrowserActivity;
|
||||
import com.pichillilorenzo.flutter_inappbrowser.InAppBrowserFlutterPlugin;
|
||||
import com.pichillilorenzo.flutter_inappbrowser.JavaScriptBridgeInterface;
|
||||
import com.pichillilorenzo.flutter_inappbrowser.Util;
|
||||
import com.pichillilorenzo.flutter_inappwebview.CredentialDatabase.Credential;
|
||||
import com.pichillilorenzo.flutter_inappwebview.CredentialDatabase.CredentialDatabase;
|
||||
import com.pichillilorenzo.flutter_inappwebview.FlutterWebView;
|
||||
import com.pichillilorenzo.flutter_inappwebview.InAppBrowserActivity;
|
||||
import com.pichillilorenzo.flutter_inappwebview.InAppWebViewFlutterPlugin;
|
||||
import com.pichillilorenzo.flutter_inappwebview.JavaScriptBridgeInterface;
|
||||
import com.pichillilorenzo.flutter_inappwebview.Util;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.net.MalformedURLException;
|
||||
|
@ -668,7 +668,7 @@ public class InAppWebViewClient extends WebViewClient {
|
|||
}
|
||||
|
||||
private MethodChannel getChannel() {
|
||||
return (inAppBrowserActivity != null) ? InAppBrowserFlutterPlugin.inAppBrowser.channel : flutterWebView.channel;
|
||||
return (inAppBrowserActivity != null) ? InAppWebViewFlutterPlugin.inAppBrowser.channel : flutterWebView.channel;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser.InAppWebView;
|
||||
package com.pichillilorenzo.flutter_inappwebview.InAppWebView;
|
||||
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
import android.webkit.WebSettings;
|
||||
|
||||
import com.pichillilorenzo.flutter_inappbrowser.Options;
|
||||
import com.pichillilorenzo.flutter_inappwebview.Options;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser.InAppWebView;
|
||||
package com.pichillilorenzo.flutter_inappwebview.InAppWebView;
|
||||
|
||||
import static android.content.Context.INPUT_METHOD_SERVICE;
|
||||
|
|
@ -1,6 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser.InAppWebView;
|
||||
|
||||
import com.pichillilorenzo.flutter_inappbrowser.ContentBlocker.ContentBlockerActionType;
|
||||
package com.pichillilorenzo.flutter_inappwebview.InAppWebView;
|
||||
|
||||
public enum PreferredContentModeOptionType {
|
||||
RECOMMENDED (0),
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser.InAppWebView;
|
||||
package com.pichillilorenzo.flutter_inappwebview.InAppWebView;
|
||||
|
||||
import android.os.Handler;
|
||||
import android.os.IBinder;
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser;
|
||||
package com.pichillilorenzo.flutter_inappwebview;
|
||||
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
|
@ -8,18 +8,18 @@ import io.flutter.plugin.common.MethodChannel;
|
|||
import io.flutter.plugin.common.PluginRegistry;
|
||||
import io.flutter.embedding.engine.plugins.FlutterPlugin;
|
||||
|
||||
public class InAppBrowserFlutterPlugin implements FlutterPlugin {
|
||||
public class InAppWebViewFlutterPlugin implements FlutterPlugin {
|
||||
public PluginRegistry.Registrar registrar;
|
||||
public MethodChannel channel;
|
||||
|
||||
protected static final String LOG_TAG = "InAppBrowserFlutterPlugin";
|
||||
protected static final String LOG_TAG = "InAppWebViewFlutterPlugin";
|
||||
|
||||
public static InAppBrowser inAppBrowser;
|
||||
public static MyCookieManager myCookieManager;
|
||||
public static CredentialDatabaseHandler credentialDatabaseHandler;
|
||||
public static ValueCallback<Uri[]> uploadMessageArray;
|
||||
|
||||
public InAppBrowserFlutterPlugin() {}
|
||||
public InAppWebViewFlutterPlugin() {}
|
||||
|
||||
public static void registerWith(PluginRegistry.Registrar registrar) {
|
||||
inAppBrowser = new InAppBrowser(registrar);
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser;
|
||||
package com.pichillilorenzo.flutter_inappwebview;
|
||||
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
|
@ -7,10 +7,7 @@ import android.util.Log;
|
|||
import android.webkit.JavascriptInterface;
|
||||
import android.webkit.ValueCallback;
|
||||
|
||||
import com.pichillilorenzo.flutter_inappbrowser.InAppWebView.InAppWebView;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import com.pichillilorenzo.flutter_inappwebview.InAppWebView.InAppWebView;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
@ -19,7 +16,7 @@ import io.flutter.plugin.common.MethodChannel;
|
|||
|
||||
public class JavaScriptBridgeInterface {
|
||||
private static final String LOG_TAG = "JSBridgeInterface";
|
||||
public static final String name = "flutter_inappbrowser";
|
||||
public static final String name = "flutter_inappwebview";
|
||||
private FlutterWebView flutterWebView;
|
||||
private InAppBrowserActivity inAppBrowserActivity;
|
||||
|
||||
|
@ -47,7 +44,7 @@ public class JavaScriptBridgeInterface {
|
|||
obj.put("args", args);
|
||||
|
||||
// java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread.
|
||||
// https://github.com/pichillilorenzo/flutter_inappbrowser/issues/98
|
||||
// https://github.com/pichillilorenzo/flutter_inappwebview/issues/98
|
||||
final Handler handler = new Handler(Looper.getMainLooper());
|
||||
handler.post(new Runnable() {
|
||||
@Override
|
||||
|
@ -84,6 +81,6 @@ public class JavaScriptBridgeInterface {
|
|||
}
|
||||
|
||||
private MethodChannel getChannel() {
|
||||
return (inAppBrowserActivity != null) ? InAppBrowserFlutterPlugin.inAppBrowser.channel : flutterWebView.channel;
|
||||
return (inAppBrowserActivity != null) ? InAppWebViewFlutterPlugin.inAppBrowser.channel : flutterWebView.channel;
|
||||
}
|
||||
}
|
|
@ -1,13 +1,10 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser;
|
||||
package com.pichillilorenzo.flutter_inappwebview;
|
||||
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
import android.webkit.CookieManager;
|
||||
import android.webkit.CookieSyncManager;
|
||||
import android.webkit.ValueCallback;
|
||||
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
|
@ -30,7 +27,7 @@ public class MyCookieManager implements MethodChannel.MethodCallHandler {
|
|||
|
||||
public MyCookieManager(PluginRegistry.Registrar r) {
|
||||
registrar = r;
|
||||
channel = new MethodChannel(registrar.messenger(), "com.pichillilorenzo/flutter_inappbrowser_cookiemanager");
|
||||
channel = new MethodChannel(registrar.messenger(), "com.pichillilorenzo/flutter_inappwebview_cookiemanager");
|
||||
channel.setMethodCallHandler(this);
|
||||
cookieManager = CookieManager.getInstance();
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser;
|
||||
package com.pichillilorenzo.flutter_inappwebview;
|
||||
|
||||
import android.util.Log;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser;
|
||||
package com.pichillilorenzo.flutter_inappwebview;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.pm.PackageManager;
|
|
@ -1,12 +1,10 @@
|
|||
package com.pichillilorenzo.flutter_inappbrowser;
|
||||
package com.pichillilorenzo.flutter_inappwebview;
|
||||
|
||||
import android.content.res.AssetManager;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.util.Log;
|
||||
|
||||
import com.pichillilorenzo.flutter_inappbrowser.InAppWebView.InAppWebView;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.security.Key;
|
|
@ -10,7 +10,7 @@
|
|||
tools:context=".InAppBrowserActivity"
|
||||
android:focusable="true">
|
||||
|
||||
<com.pichillilorenzo.flutter_inappbrowser.InAppWebView.InAppWebView
|
||||
<com.pichillilorenzo.flutter_inappwebview.InAppWebView.InAppWebView
|
||||
android:id="@+id/webView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# flutter_inappbrowser_example
|
||||
# flutter_inappwebview_example
|
||||
|
||||
Demonstrates how to use the flutter_inappbrowser plugin.
|
||||
Demonstrates how to use the flutter_inappwebview plugin.
|
||||
|
||||
## Getting Started
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ android {
|
|||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId "com.pichillilorenzo.flutter_inappbrowserexample"
|
||||
applicationId "com.pichillilorenzo.flutter_inappwebviewexample"
|
||||
minSdkVersion 17
|
||||
targetSdkVersion 28
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
FlutterApplication and put your custom class here. -->
|
||||
<application
|
||||
android:name=".MyApplication"
|
||||
android:label="flutter_inappbrowser_example"
|
||||
android:label="flutter_inappwebview_example"
|
||||
android:usesCleartextTraffic="true"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
<activity
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
#!/bin/sh
|
||||
# This is a generated file; do not edit or check into version control.
|
||||
export "FLUTTER_ROOT=/Users/lorenzopichilli/flutter"
|
||||
export "FLUTTER_APPLICATION_PATH=/Users/lorenzopichilli/Desktop/flutter_inappbrowser/example"
|
||||
export "FLUTTER_TARGET=/Users/lorenzopichilli/Desktop/flutter_inappbrowser/example/lib/main.dart"
|
||||
export "FLUTTER_APPLICATION_PATH=/Users/lorenzopichilli/Desktop/flutter_inappwebview/example"
|
||||
export "FLUTTER_TARGET=/Users/lorenzopichilli/Desktop/flutter_inappwebview/example/test_driver/app.dart"
|
||||
export "FLUTTER_BUILD_DIR=build"
|
||||
export "SYMROOT=${SOURCE_ROOT}/../build/ios"
|
||||
export "FLUTTER_FRAMEWORK_DIR=/Users/lorenzopichilli/flutter/bin/cache/artifacts/engine/ios"
|
||||
export "FLUTTER_BUILD_NAME=1.0.0"
|
||||
export "FLUTTER_BUILD_NUMBER=1"
|
||||
export "TRACK_WIDGET_CREATION=true"
|
||||
|
|
|
@ -269,14 +269,14 @@
|
|||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
|
||||
"${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/flutter_downloader/flutter_downloader.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/flutter_inappbrowser/flutter_inappbrowser.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/flutter_inappwebview/flutter_inappwebview.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/path_provider/path_provider.framework",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_downloader.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_inappbrowser.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_inappwebview.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider.framework",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
|
@ -462,7 +462,7 @@
|
|||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.pichillilorenzo.flutter_inappbrowserExample;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.pichillilorenzo.flutter_inappwebviewExample;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
|
@ -490,7 +490,7 @@
|
|||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.pichillilorenzo.flutter_inappbrowserExample;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.pichillilorenzo.flutter_inappwebviewExample;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>flutter_inappbrowser_example</string>
|
||||
<string>flutter_inappwebview_example</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
import 'main.dart';
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
import 'main.dart';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
import 'main.dart';
|
||||
|
||||
|
|
|
@ -2,10 +2,10 @@ import 'dart:async';
|
|||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappbrowser_example/chrome_safari_browser_example.screen.dart';
|
||||
import 'package:flutter_inappbrowser_example/in_app_webiew_example.screen.dart';
|
||||
import 'package:flutter_inappbrowser_example/in_app_browser_example.screen.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
import 'package:flutter_inappwebview_example/chrome_safari_browser_example.screen.dart';
|
||||
import 'package:flutter_inappwebview_example/in_app_webiew_example.screen.dart';
|
||||
import 'package:flutter_inappwebview_example/in_app_browser_example.screen.dart';
|
||||
|
||||
// InAppLocalhostServer localhostServer = new InAppLocalhostServer();
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
name: flutter_inappbrowser_example
|
||||
description: Demonstrates how to use the flutter_inappbrowser plugin.
|
||||
name: flutter_inappwebview_example
|
||||
description: Demonstrates how to use the flutter_inappwebview plugin.
|
||||
|
||||
# The following defines the version and build number for your application.
|
||||
# A version number is three numbers separated by dots, like 1.2.43
|
||||
|
@ -22,7 +22,7 @@ dependencies:
|
|||
flutter_downloader: ^1.3.2
|
||||
path_provider: ^1.4.0
|
||||
permission_handler: ^3.3.0
|
||||
flutter_inappbrowser:
|
||||
flutter_inappwebview:
|
||||
path: ../
|
||||
|
||||
dev_dependencies:
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<p>
|
||||
<img src="https://via.placeholder.com/100x50" alt="placeholder 100x50">
|
||||
</p>
|
||||
<a id="link" href="https://github.com/pichillilorenzo/flutter_inappbrowser">flutter_inappbrowser</a>
|
||||
<a id="link" href="https://github.com/pichillilorenzo/flutter_inappwebview">flutter_inappwebview</a>
|
||||
</main>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
<body>
|
||||
<h1>InAppWebViewJavaScriptHandlerTest</h1>
|
||||
<script>
|
||||
window.addEventListener("flutterInAppBrowserPlatformReady", function(event) {
|
||||
window.flutter_inappbrowser.callHandler('handlerFoo').then(function(result) {
|
||||
window.flutter_inappbrowser.callHandler('handlerFooWithArgs', 1, true, ['bar', 5], {foo: 'baz'}, result).then(function(result) {
|
||||
window.addEventListener("flutterInAppWebViewPlatformReady", function(event) {
|
||||
window.flutter_inappwebview.callHandler('handlerFoo').then(function(result) {
|
||||
window.flutter_inappwebview.callHandler('handlerFooWithArgs', 1, true, ['bar', 5], {foo: 'baz'}, result).then(function(result) {
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
<body>
|
||||
<h1>InAppWebViewOnJsDialogTest</h1>
|
||||
<script>
|
||||
window.addEventListener("flutterInAppBrowserPlatformReady", function(event) {
|
||||
window.addEventListener("flutterInAppWebViewPlatformReady", function(event) {
|
||||
alert("alert message");
|
||||
window.flutter_inappbrowser.callHandler('confirm', confirm("confirm message"));
|
||||
window.flutter_inappbrowser.callHandler('prompt', prompt("prompt message", "prompt default value"));
|
||||
window.flutter_inappwebview.callHandler('confirm', confirm("confirm message"));
|
||||
window.flutter_inappwebview.callHandler('prompt', prompt("prompt message", "prompt default value"));
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<script>
|
||||
var image = document.querySelector("#image");
|
||||
image.addEventListener('load', function() {
|
||||
window.flutter_inappbrowser.callHandler('imageLoaded');
|
||||
window.flutter_inappwebview.callHandler('imageLoaded');
|
||||
});
|
||||
</script>
|
||||
</html>
|
|
@ -10,7 +10,7 @@
|
|||
<body>
|
||||
<h1>InAppWebViewOnNavigationStateChangeTest</h1>
|
||||
<script>
|
||||
window.addEventListener("flutterInAppBrowserPlatformReady", function(event) {
|
||||
window.addEventListener("flutterInAppWebViewPlatformReady", function(event) {
|
||||
var state = {}
|
||||
var title = ''
|
||||
var url = 'first-push';
|
||||
|
|
|
@ -77,9 +77,9 @@
|
|||
window.location = "#foo-" + randomNumber;
|
||||
}
|
||||
|
||||
window.addEventListener("flutterInAppBrowserPlatformReady", function(event) {
|
||||
window.flutter_inappbrowser.callHandler('handlerFoo').then(function(result) {
|
||||
window.flutter_inappbrowser.callHandler('handlerFooWithArgs', 1, true, ['bar', 5], {foo: 'baz'}, result).then(function(result) {
|
||||
window.addEventListener("flutterInAppWebViewPlatformReady", function(event) {
|
||||
window.flutter_inappwebview.callHandler('handlerFoo').then(function(result) {
|
||||
window.flutter_inappwebview.callHandler('handlerFooWithArgs', 1, true, ['bar', 5], {foo: 'baz'}, result).then(function(result) {
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
class WidgetTest extends StatefulWidget {
|
||||
final WidgetTestState state = WidgetTestState();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
import 'main_test.dart';
|
||||
import 'custom_widget_test.dart';
|
||||
|
@ -41,7 +41,7 @@ class InAppWebViewAjaxTestState extends WidgetTestState {
|
|||
<body>
|
||||
<h1>InAppWebViewAjaxTest</h1>
|
||||
<script>
|
||||
window.addEventListener('flutterInAppBrowserPlatformReady', function(event) {
|
||||
window.addEventListener('flutterInAppWebViewPlatformReady', function(event) {
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.open("POST", "http://${environment["NODE_SERVER_IP"]}:8082/test-ajax-post");
|
||||
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
import 'custom_widget_test.dart';
|
||||
import 'main_test.dart';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
import 'custom_widget_test.dart';
|
||||
import 'main_test.dart';
|
||||
|
|
|
@ -2,7 +2,7 @@ import 'dart:convert';
|
|||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
import 'main_test.dart';
|
||||
import 'custom_widget_test.dart';
|
||||
|
@ -43,11 +43,11 @@ class InAppWebViewFetchTestState extends WidgetTestState {
|
|||
<body>
|
||||
<h1>InAppWebViewFetchTest</h1>
|
||||
<script>
|
||||
window.addEventListener('flutterInAppBrowserPlatformReady', function(event) {
|
||||
window.addEventListener('flutterInAppWebViewPlatformReady', function(event) {
|
||||
fetch(new Request("http://${environment["NODE_SERVER_IP"]}:8082/test-download-file")).then(function(response) {
|
||||
window.flutter_inappbrowser.callHandler('fetchGet', response.status);
|
||||
window.flutter_inappwebview.callHandler('fetchGet', response.status);
|
||||
}).catch(function(error) {
|
||||
window.flutter_inappbrowser.callHandler('fetchGet', "ERROR: " + error);
|
||||
window.flutter_inappwebview.callHandler('fetchGet', "ERROR: " + error);
|
||||
});
|
||||
|
||||
fetch("http://${environment["NODE_SERVER_IP"]}:8082/test-ajax-post", {
|
||||
|
@ -61,12 +61,12 @@ class InAppWebViewFetchTestState extends WidgetTestState {
|
|||
}
|
||||
}).then(function(response) {
|
||||
response.json().then(function(value) {
|
||||
window.flutter_inappbrowser.callHandler('fetchPost', value);
|
||||
window.flutter_inappwebview.callHandler('fetchPost', value);
|
||||
}).catch(function(error) {
|
||||
window.flutter_inappbrowser.callHandler('fetchPost', "ERROR: " + error);
|
||||
window.flutter_inappwebview.callHandler('fetchPost', "ERROR: " + error);
|
||||
});
|
||||
}).catch(function(error) {
|
||||
window.flutter_inappbrowser.callHandler('fetchPost', "ERROR: " + error);
|
||||
window.flutter_inappwebview.callHandler('fetchPost', "ERROR: " + error);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
import 'custom_widget_test.dart';
|
||||
import 'main_test.dart';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
import 'main_test.dart';
|
||||
import 'custom_widget_test.dart';
|
||||
|
@ -58,7 +58,7 @@ class InAppWebViewInitialDataTestState extends WidgetTestState {
|
|||
<p>
|
||||
<img src="https://via.placeholder.com/100x50" alt="placeholder 100x50">
|
||||
</p>
|
||||
<a id="link" href="https://github.com/pichillilorenzo/flutter_inappbrowser">flutter_inappbrowser</a>
|
||||
<a id="link" href="https://github.com/pichillilorenzo/flutter_inappwebview">flutter_inappwebview</a>
|
||||
</main>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
import 'main_test.dart';
|
||||
import 'custom_widget_test.dart';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
import 'custom_widget_test.dart';
|
||||
import 'main_test.dart';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
import 'main_test.dart';
|
||||
import 'custom_widget_test.dart';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
import 'main_test.dart';
|
||||
import 'custom_widget_test.dart';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
import 'main_test.dart';
|
||||
import 'custom_widget_test.dart';
|
||||
|
@ -40,7 +40,7 @@ class InAppWebViewOnDownloadStartTestState extends WidgetTestState {
|
|||
<h1>InAppWebViewOnDownloadStartTest</h1>
|
||||
<a id="download-file" href="http://${environment["NODE_SERVER_IP"]}:8082/test-download-file">download file</a>
|
||||
<script>
|
||||
window.addEventListener("flutterInAppBrowserPlatformReady", function(event) {
|
||||
window.addEventListener("flutterInAppWebViewPlatformReady", function(event) {
|
||||
document.querySelector("#download-file").click();
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
import 'main_test.dart';
|
||||
import 'custom_widget_test.dart';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
import 'main_test.dart';
|
||||
import 'custom_widget_test.dart';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
import 'custom_widget_test.dart';
|
||||
import 'main_test.dart';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
import 'custom_widget_test.dart';
|
||||
import 'main_test.dart';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
import 'main_test.dart';
|
||||
import 'custom_widget_test.dart';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
import 'main_test.dart';
|
||||
import 'custom_widget_test.dart';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
import 'main_test.dart';
|
||||
import 'custom_widget_test.dart';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
import 'custom_widget_test.dart';
|
||||
import 'main_test.dart';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
import 'custom_widget_test.dart';
|
||||
import 'main_test.dart';
|
||||
|
|
|
@ -2,7 +2,7 @@ import 'dart:io';
|
|||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
import 'custom_widget_test.dart';
|
||||
import 'main_test.dart';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
import 'custom_widget_test.dart';
|
||||
import 'main_test.dart';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
import 'main_test.dart';
|
||||
import 'custom_widget_test.dart';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
import 'custom_widget_test.dart';
|
||||
import 'main_test.dart';
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_inappbrowser/flutter_inappbrowser.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
import 'custom_widget_test.dart';
|
||||
import 'main_test.dart';
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_inappbrowser/example/.dart_tool" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_inappbrowser/example/.pub" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_inappbrowser/example/build" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_inappbrowser/example/ios/Flutter/App.framework/flutter_assets/packages" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/example/ios/Flutter/App.framework/flutter_assets/packages" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/flutter_inappbrowser_tests/.dart_tool" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/flutter_inappbrowser_tests/.pub" />
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// CredentialDatabase.swift
|
||||
// flutter_inappbrowser
|
||||
// flutter_inappwebview
|
||||
//
|
||||
// Created by Lorenzo Pichilli on 29/10/2019.
|
||||
//
|
||||
|
@ -22,7 +22,7 @@ class CredentialDatabase: NSObject, FlutterPlugin {
|
|||
CredentialDatabase.registrar = registrar
|
||||
CredentialDatabase.credentialStore = URLCredentialStorage.shared
|
||||
|
||||
CredentialDatabase.channel = FlutterMethodChannel(name: "com.pichillilorenzo/flutter_inappbrowser_credential_database", binaryMessenger: registrar.messenger())
|
||||
CredentialDatabase.channel = FlutterMethodChannel(name: "com.pichillilorenzo/flutter_inappwebview_credential_database", binaryMessenger: registrar.messenger())
|
||||
registrar.addMethodCallDelegate(self, channel: CredentialDatabase.channel!)
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// CustomeSchemeHandler.swift
|
||||
// flutter_downloader
|
||||
// flutter_inappwebview
|
||||
//
|
||||
// Created by Lorenzo Pichilli on 25/10/2019.
|
||||
//
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// FlutterWebViewController.swift
|
||||
// flutter_inappbrowser
|
||||
// flutter_inappwebview
|
||||
//
|
||||
// Created by Lorenzo on 13/11/18.
|
||||
//
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// FlutterWebViewFactory.swift
|
||||
// flutter_inappbrowser
|
||||
// flutter_inappwebview
|
||||
//
|
||||
// Created by Lorenzo on 13/11/18.
|
||||
//
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// InAppBrowserOptions.swift
|
||||
// flutter_inappbrowser
|
||||
// flutter_inappwebview
|
||||
//
|
||||
// Created by Lorenzo on 17/09/18.
|
||||
//
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue