code format
This commit is contained in:
parent
a3c20be1e7
commit
3b2add4199
|
@ -21,9 +21,7 @@ void customActionButton() {
|
||||||
id: 1,
|
id: 1,
|
||||||
description: 'Action Button description',
|
description: 'Action Button description',
|
||||||
icon: actionButtonIcon.buffer.asUint8List(),
|
icon: actionButtonIcon.buffer.asUint8List(),
|
||||||
action: (url, title) {
|
action: (url, title) {}));
|
||||||
|
|
||||||
}));
|
|
||||||
expect(chromeSafariBrowser.isOpened(), false);
|
expect(chromeSafariBrowser.isOpened(), false);
|
||||||
|
|
||||||
await chromeSafariBrowser.open(url: TEST_URL_1);
|
await chromeSafariBrowser.open(url: TEST_URL_1);
|
||||||
|
|
|
@ -17,11 +17,7 @@ void customMenuItem() {
|
||||||
test('add custom menu item', () async {
|
test('add custom menu item', () async {
|
||||||
var chromeSafariBrowser = MyChromeSafariBrowser();
|
var chromeSafariBrowser = MyChromeSafariBrowser();
|
||||||
chromeSafariBrowser.addMenuItem(ChromeSafariBrowserMenuItem(
|
chromeSafariBrowser.addMenuItem(ChromeSafariBrowserMenuItem(
|
||||||
id: 2,
|
id: 2, label: 'Custom item menu 1', action: (url, title) {}));
|
||||||
label: 'Custom item menu 1',
|
|
||||||
action: (url, title) {
|
|
||||||
|
|
||||||
}));
|
|
||||||
expect(chromeSafariBrowser.isOpened(), false);
|
expect(chromeSafariBrowser.isOpened(), false);
|
||||||
|
|
||||||
await chromeSafariBrowser.open(url: TEST_URL_1);
|
await chromeSafariBrowser.open(url: TEST_URL_1);
|
||||||
|
|
|
@ -3,16 +3,23 @@ final TEST_CROSS_PLATFORM_URL_1 = Uri.parse('https://flutter.dev/');
|
||||||
final TEST_CROSS_PLATFORM_URL_2 = Uri.parse('https://www.bing.com/');
|
final TEST_CROSS_PLATFORM_URL_2 = Uri.parse('https://www.bing.com/');
|
||||||
final TEST_URL_1 = Uri.parse('https://github.com/flutter');
|
final TEST_URL_1 = Uri.parse('https://github.com/flutter');
|
||||||
final TEST_URL_2 = Uri.parse('https://www.google.com/');
|
final TEST_URL_2 = Uri.parse('https://www.google.com/');
|
||||||
final TEST_URL_3 = Uri.parse('https://github.com/pichillilorenzo/flutter_inappwebview');
|
final TEST_URL_3 =
|
||||||
|
Uri.parse('https://github.com/pichillilorenzo/flutter_inappwebview');
|
||||||
final TEST_URL_4 = Uri.parse('https://www.youtube.com/');
|
final TEST_URL_4 = Uri.parse('https://www.youtube.com/');
|
||||||
final TEST_URL_EXAMPLE = Uri.parse('https://www.example.com/');
|
final TEST_URL_EXAMPLE = Uri.parse('https://www.example.com/');
|
||||||
final TEST_URL_HTTP_EXAMPLE = Uri.parse('http://www.example.com/');
|
final TEST_URL_HTTP_EXAMPLE = Uri.parse('http://www.example.com/');
|
||||||
final TEST_URL_404 = Uri.parse('https://google.com/404');
|
final TEST_URL_404 = Uri.parse('https://google.com/404');
|
||||||
final TEST_WEB_PLATFORM_BASE_URL = Uri.parse(Uri.base.toString().replaceFirst("/#/", "/"));
|
final TEST_WEB_PLATFORM_BASE_URL =
|
||||||
final TEST_WEB_PLATFORM_URL_1 = Uri.parse(TEST_WEB_PLATFORM_BASE_URL.toString() + 'page.html');
|
Uri.parse(Uri.base.toString().replaceFirst("/#/", "/"));
|
||||||
final TEST_WEB_PLATFORM_URL_2 = Uri.parse(TEST_WEB_PLATFORM_BASE_URL.toString() + 'page-2.html');
|
final TEST_WEB_PLATFORM_URL_1 =
|
||||||
final TEST_WEB_PLATFORM_URL_3 = Uri.parse(TEST_WEB_PLATFORM_BASE_URL.toString() + 'heavy-page.html');
|
Uri.parse(TEST_WEB_PLATFORM_BASE_URL.toString() + 'page.html');
|
||||||
|
final TEST_WEB_PLATFORM_URL_2 =
|
||||||
|
Uri.parse(TEST_WEB_PLATFORM_BASE_URL.toString() + 'page-2.html');
|
||||||
|
final TEST_WEB_PLATFORM_URL_3 =
|
||||||
|
Uri.parse(TEST_WEB_PLATFORM_BASE_URL.toString() + 'heavy-page.html');
|
||||||
final TEST_NOT_A_WEBSITE_URL = Uri.parse('https://www.notawebsite..com/');
|
final TEST_NOT_A_WEBSITE_URL = Uri.parse('https://www.notawebsite..com/');
|
||||||
final TEST_CHROME_SAFE_BROWSING_MALWARE = Uri.parse('chrome://safe-browsing/match?type=malware');
|
final TEST_CHROME_SAFE_BROWSING_MALWARE =
|
||||||
|
Uri.parse('chrome://safe-browsing/match?type=malware');
|
||||||
final TEST_PERMISSION_SITE = Uri.parse('https://permission.site/');
|
final TEST_PERMISSION_SITE = Uri.parse('https://permission.site/');
|
||||||
final TEST_SERVICE_WORKER_URL = Uri.parse('https://mdn.github.io/dom-examples/service-worker/simple-service-worker/');
|
final TEST_SERVICE_WORKER_URL = Uri.parse(
|
||||||
|
'https://mdn.github.io/dom-examples/service-worker/simple-service-worker/');
|
||||||
|
|
|
@ -9,10 +9,10 @@ void findInteractions() {
|
||||||
final shouldSkip = kIsWeb
|
final shouldSkip = kIsWeb
|
||||||
? true
|
? true
|
||||||
: ![
|
: ![
|
||||||
TargetPlatform.android,
|
TargetPlatform.android,
|
||||||
TargetPlatform.iOS,
|
TargetPlatform.iOS,
|
||||||
TargetPlatform.macOS,
|
TargetPlatform.macOS,
|
||||||
].contains(defaultTargetPlatform);
|
].contains(defaultTargetPlatform);
|
||||||
|
|
||||||
testWidgets('find interactions', (WidgetTester tester) async {
|
testWidgets('find interactions', (WidgetTester tester) async {
|
||||||
final Completer controllerCompleter = Completer<InAppWebViewController>();
|
final Completer controllerCompleter = Completer<InAppWebViewController>();
|
||||||
|
@ -27,9 +27,7 @@ void findInteractions() {
|
||||||
initialFile: "test_assets/in_app_webview_initial_file_test.html",
|
initialFile: "test_assets/in_app_webview_initial_file_test.html",
|
||||||
findInteractionController: findInteractionController,
|
findInteractionController: findInteractionController,
|
||||||
initialSettings: InAppWebViewSettings(
|
initialSettings: InAppWebViewSettings(
|
||||||
clearCache: true,
|
clearCache: true, isFindInteractionEnabled: true),
|
||||||
isFindInteractionEnabled: true
|
|
||||||
),
|
|
||||||
onWebViewCreated: (controller) {
|
onWebViewCreated: (controller) {
|
||||||
controllerCompleter.complete(controller);
|
controllerCompleter.complete(controller);
|
||||||
},
|
},
|
||||||
|
@ -46,17 +44,23 @@ void findInteractions() {
|
||||||
await Future.delayed(Duration(seconds: 1));
|
await Future.delayed(Duration(seconds: 1));
|
||||||
|
|
||||||
const firstSearchText = "InAppWebViewInitialFileTest";
|
const firstSearchText = "InAppWebViewInitialFileTest";
|
||||||
await expectLater(findInteractionController.findAllAsync(find: firstSearchText), completes);
|
await expectLater(
|
||||||
if ([TargetPlatform.iOS, TargetPlatform.macOS].contains(defaultTargetPlatform)) {
|
findInteractionController.findAllAsync(find: firstSearchText),
|
||||||
|
completes);
|
||||||
|
if ([TargetPlatform.iOS, TargetPlatform.macOS]
|
||||||
|
.contains(defaultTargetPlatform)) {
|
||||||
expect(await findInteractionController.getSearchText(), firstSearchText);
|
expect(await findInteractionController.getSearchText(), firstSearchText);
|
||||||
final session = await findInteractionController.getActiveFindSession();
|
final session = await findInteractionController.getActiveFindSession();
|
||||||
expect(session!.resultCount, 2);
|
expect(session!.resultCount, 2);
|
||||||
}
|
}
|
||||||
await expectLater(findInteractionController.findNext(forward: true), completes);
|
await expectLater(
|
||||||
await expectLater(findInteractionController.findNext(forward: false), completes);
|
findInteractionController.findNext(forward: true), completes);
|
||||||
|
await expectLater(
|
||||||
|
findInteractionController.findNext(forward: false), completes);
|
||||||
await expectLater(findInteractionController.clearMatches(), completes);
|
await expectLater(findInteractionController.clearMatches(), completes);
|
||||||
|
|
||||||
if ([TargetPlatform.iOS, TargetPlatform.macOS].contains(defaultTargetPlatform)) {
|
if ([TargetPlatform.iOS, TargetPlatform.macOS]
|
||||||
|
.contains(defaultTargetPlatform)) {
|
||||||
const secondSearchText = "text";
|
const secondSearchText = "text";
|
||||||
await expectLater(
|
await expectLater(
|
||||||
findInteractionController.setSearchText(secondSearchText), completes);
|
findInteractionController.setSearchText(secondSearchText), completes);
|
||||||
|
@ -64,7 +68,8 @@ void findInteractions() {
|
||||||
findInteractionController.presentFindNavigator(), completes);
|
findInteractionController.presentFindNavigator(), completes);
|
||||||
expect(await findInteractionController.getSearchText(), secondSearchText);
|
expect(await findInteractionController.getSearchText(), secondSearchText);
|
||||||
expect(await findInteractionController.isFindNavigatorVisible(), true);
|
expect(await findInteractionController.isFindNavigatorVisible(), true);
|
||||||
await expectLater(findInteractionController.updateResultCount(), completes);
|
await expectLater(
|
||||||
|
findInteractionController.updateResultCount(), completes);
|
||||||
await expectLater(
|
await expectLater(
|
||||||
findInteractionController.dismissFindNavigator(), completes);
|
findInteractionController.dismissFindNavigator(), completes);
|
||||||
expect(await findInteractionController.isFindNavigatorVisible(), false);
|
expect(await findInteractionController.isFindNavigatorVisible(), false);
|
||||||
|
@ -91,9 +96,7 @@ void findInteractions() {
|
||||||
key: GlobalKey(),
|
key: GlobalKey(),
|
||||||
initialFile: "test_assets/in_app_webview_initial_file_test.html",
|
initialFile: "test_assets/in_app_webview_initial_file_test.html",
|
||||||
initialSettings: InAppWebViewSettings(
|
initialSettings: InAppWebViewSettings(
|
||||||
clearCache: true,
|
clearCache: true, isFindInteractionEnabled: false),
|
||||||
isFindInteractionEnabled: false
|
|
||||||
),
|
|
||||||
findInteractionController: findInteractionController,
|
findInteractionController: findInteractionController,
|
||||||
onWebViewCreated: (controller) {
|
onWebViewCreated: (controller) {
|
||||||
controllerCompleter.complete(controller);
|
controllerCompleter.complete(controller);
|
||||||
|
|
|
@ -7,20 +7,20 @@ import 'package:flutter_test/flutter_test.dart';
|
||||||
import '../constants.dart';
|
import '../constants.dart';
|
||||||
|
|
||||||
void runAndDispose() {
|
void runAndDispose() {
|
||||||
final shouldSkip = kIsWeb ? false :
|
final shouldSkip = kIsWeb
|
||||||
![
|
? false
|
||||||
TargetPlatform.android,
|
: ![
|
||||||
TargetPlatform.iOS,
|
TargetPlatform.android,
|
||||||
TargetPlatform.macOS,
|
TargetPlatform.iOS,
|
||||||
].contains(defaultTargetPlatform);
|
TargetPlatform.macOS,
|
||||||
|
].contains(defaultTargetPlatform);
|
||||||
|
|
||||||
test('run and dispose', () async {
|
test('run and dispose', () async {
|
||||||
final Completer controllerCompleter = Completer<InAppWebViewController>();
|
final Completer controllerCompleter = Completer<InAppWebViewController>();
|
||||||
final Completer<void> pageLoaded = Completer<void>();
|
final Completer<void> pageLoaded = Completer<void>();
|
||||||
|
|
||||||
var headlessWebView = new HeadlessInAppWebView(
|
var headlessWebView = new HeadlessInAppWebView(
|
||||||
initialUrlRequest:
|
initialUrlRequest: URLRequest(url: TEST_CROSS_PLATFORM_URL_1),
|
||||||
URLRequest(url: TEST_CROSS_PLATFORM_URL_1),
|
|
||||||
onWebViewCreated: (controller) {
|
onWebViewCreated: (controller) {
|
||||||
controllerCompleter.complete(controller);
|
controllerCompleter.complete(controller);
|
||||||
},
|
},
|
||||||
|
@ -32,8 +32,7 @@ void runAndDispose() {
|
||||||
await headlessWebView.run();
|
await headlessWebView.run();
|
||||||
expect(headlessWebView.isRunning(), true);
|
expect(headlessWebView.isRunning(), true);
|
||||||
|
|
||||||
final InAppWebViewController controller =
|
final InAppWebViewController controller = await controllerCompleter.future;
|
||||||
await controllerCompleter.future;
|
|
||||||
await pageLoaded.future;
|
await pageLoaded.future;
|
||||||
|
|
||||||
final String? url = (await controller.getUrl())?.toString();
|
final String? url = (await controller.getUrl())?.toString();
|
||||||
|
|
|
@ -20,8 +20,7 @@ void takeScreenshot() {
|
||||||
final Completer<void> pageLoaded = Completer<void>();
|
final Completer<void> pageLoaded = Completer<void>();
|
||||||
|
|
||||||
var headlessWebView = new HeadlessInAppWebView(
|
var headlessWebView = new HeadlessInAppWebView(
|
||||||
initialUrlRequest:
|
initialUrlRequest: URLRequest(url: TEST_URL_1),
|
||||||
URLRequest(url: TEST_URL_1),
|
|
||||||
onWebViewCreated: (controller) {
|
onWebViewCreated: (controller) {
|
||||||
controllerCompleter.complete(controller);
|
controllerCompleter.complete(controller);
|
||||||
},
|
},
|
||||||
|
@ -32,8 +31,7 @@ void takeScreenshot() {
|
||||||
await headlessWebView.run();
|
await headlessWebView.run();
|
||||||
expect(headlessWebView.isRunning(), true);
|
expect(headlessWebView.isRunning(), true);
|
||||||
|
|
||||||
final InAppWebViewController controller =
|
final InAppWebViewController controller = await controllerCompleter.future;
|
||||||
await controllerCompleter.future;
|
|
||||||
await pageLoaded.future;
|
await pageLoaded.future;
|
||||||
|
|
||||||
final String? url = (await controller.getUrl())?.toString();
|
final String? url = (await controller.getUrl())?.toString();
|
||||||
|
|
|
@ -60,10 +60,10 @@ void initialUrlRequest() {
|
||||||
final shouldSkipTest1 = kIsWeb
|
final shouldSkipTest1 = kIsWeb
|
||||||
? false
|
? false
|
||||||
: ![
|
: ![
|
||||||
TargetPlatform.android,
|
TargetPlatform.android,
|
||||||
TargetPlatform.iOS,
|
TargetPlatform.iOS,
|
||||||
TargetPlatform.macOS,
|
TargetPlatform.macOS,
|
||||||
].contains(defaultTargetPlatform);
|
].contains(defaultTargetPlatform);
|
||||||
|
|
||||||
testWidgets('basic', (WidgetTester tester) async {
|
testWidgets('basic', (WidgetTester tester) async {
|
||||||
final Completer<void> pageLoaded = Completer<void>();
|
final Completer<void> pageLoaded = Completer<void>();
|
||||||
|
@ -87,7 +87,7 @@ void initialUrlRequest() {
|
||||||
|
|
||||||
await pageLoaded.future;
|
await pageLoaded.future;
|
||||||
final InAppWebViewController controller =
|
final InAppWebViewController controller =
|
||||||
await controllerCompleter.future;
|
await controllerCompleter.future;
|
||||||
final String? currentUrl = (await controller.getUrl())?.toString();
|
final String? currentUrl = (await controller.getUrl())?.toString();
|
||||||
|
|
||||||
expect(currentUrl, TEST_CROSS_PLATFORM_URL_1.toString());
|
expect(currentUrl, TEST_CROSS_PLATFORM_URL_1.toString());
|
||||||
|
|
|
@ -8,11 +8,12 @@ import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:path_provider/path_provider.dart';
|
import 'package:path_provider/path_provider.dart';
|
||||||
|
|
||||||
void loadFileUrl() {
|
void loadFileUrl() {
|
||||||
final shouldSkip = kIsWeb ? true :
|
final shouldSkip = kIsWeb
|
||||||
![
|
? true
|
||||||
TargetPlatform.iOS,
|
: ![
|
||||||
TargetPlatform.macOS,
|
TargetPlatform.iOS,
|
||||||
].contains(defaultTargetPlatform);
|
TargetPlatform.macOS,
|
||||||
|
].contains(defaultTargetPlatform);
|
||||||
|
|
||||||
group('load file URL', () {
|
group('load file URL', () {
|
||||||
late Directory appSupportDir;
|
late Directory appSupportDir;
|
||||||
|
@ -83,8 +84,8 @@ void loadFileUrl() {
|
||||||
initialUrlRequest:
|
initialUrlRequest:
|
||||||
URLRequest(url: Uri.parse('file://${fileHtml.path}')),
|
URLRequest(url: Uri.parse('file://${fileHtml.path}')),
|
||||||
initialSettings: InAppWebViewSettings(
|
initialSettings: InAppWebViewSettings(
|
||||||
allowingReadAccessTo:
|
allowingReadAccessTo:
|
||||||
Uri.parse('file://${appSupportDir.path}/')),
|
Uri.parse('file://${appSupportDir.path}/')),
|
||||||
onConsoleMessage: (controller, consoleMessage) {
|
onConsoleMessage: (controller, consoleMessage) {
|
||||||
consoleMessageCompleter.complete(consoleMessage);
|
consoleMessageCompleter.complete(consoleMessage);
|
||||||
},
|
},
|
||||||
|
|
|
@ -9,12 +9,13 @@ import 'package:flutter_test/flutter_test.dart';
|
||||||
import '../constants.dart';
|
import '../constants.dart';
|
||||||
|
|
||||||
void loadUrl() {
|
void loadUrl() {
|
||||||
final shouldSkip1 = kIsWeb ? false :
|
final shouldSkip1 = kIsWeb
|
||||||
![
|
? false
|
||||||
TargetPlatform.android,
|
: ![
|
||||||
TargetPlatform.iOS,
|
TargetPlatform.android,
|
||||||
TargetPlatform.macOS,
|
TargetPlatform.iOS,
|
||||||
].contains(defaultTargetPlatform);
|
TargetPlatform.macOS,
|
||||||
|
].contains(defaultTargetPlatform);
|
||||||
|
|
||||||
var initialUrl = !kIsWeb ? TEST_URL_1 : TEST_WEB_PLATFORM_URL_1;
|
var initialUrl = !kIsWeb ? TEST_URL_1 : TEST_WEB_PLATFORM_URL_1;
|
||||||
|
|
||||||
|
@ -28,23 +29,23 @@ void loadUrl() {
|
||||||
textDirection: TextDirection.ltr,
|
textDirection: TextDirection.ltr,
|
||||||
child: InAppWebView(
|
child: InAppWebView(
|
||||||
key: GlobalKey(),
|
key: GlobalKey(),
|
||||||
initialUrlRequest:
|
initialUrlRequest: URLRequest(url: initialUrl),
|
||||||
URLRequest(url: initialUrl),
|
|
||||||
onWebViewCreated: (controller) {
|
onWebViewCreated: (controller) {
|
||||||
controllerCompleter.complete(controller);
|
controllerCompleter.complete(controller);
|
||||||
},
|
},
|
||||||
onLoadStop: (controller, url) {
|
onLoadStop: (controller, url) {
|
||||||
if (url.toString() == initialUrl.toString() && !firstUrlLoad.isCompleted) {
|
if (url.toString() == initialUrl.toString() &&
|
||||||
|
!firstUrlLoad.isCompleted) {
|
||||||
firstUrlLoad.complete(url.toString());
|
firstUrlLoad.complete(url.toString());
|
||||||
} else if (url.toString() == TEST_CROSS_PLATFORM_URL_1.toString() && !loadedUrl.isCompleted) {
|
} else if (url.toString() == TEST_CROSS_PLATFORM_URL_1.toString() &&
|
||||||
|
!loadedUrl.isCompleted) {
|
||||||
loadedUrl.complete(url.toString());
|
loadedUrl.complete(url.toString());
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
final InAppWebViewController controller =
|
final InAppWebViewController controller = await controllerCompleter.future;
|
||||||
await controllerCompleter.future;
|
|
||||||
expect(await firstUrlLoad.future, initialUrl.toString());
|
expect(await firstUrlLoad.future, initialUrl.toString());
|
||||||
|
|
||||||
await controller.loadUrl(
|
await controller.loadUrl(
|
||||||
|
@ -52,11 +53,12 @@ void loadUrl() {
|
||||||
expect(await loadedUrl.future, TEST_CROSS_PLATFORM_URL_1.toString());
|
expect(await loadedUrl.future, TEST_CROSS_PLATFORM_URL_1.toString());
|
||||||
}, skip: shouldSkip1);
|
}, skip: shouldSkip1);
|
||||||
|
|
||||||
final shouldSkip2 = kIsWeb ? true :
|
final shouldSkip2 = kIsWeb
|
||||||
![
|
? true
|
||||||
TargetPlatform.iOS,
|
: ![
|
||||||
TargetPlatform.macOS,
|
TargetPlatform.iOS,
|
||||||
].contains(defaultTargetPlatform);
|
TargetPlatform.macOS,
|
||||||
|
].contains(defaultTargetPlatform);
|
||||||
|
|
||||||
testWidgets('loadSimulatedRequest', (WidgetTester tester) async {
|
testWidgets('loadSimulatedRequest', (WidgetTester tester) async {
|
||||||
final Completer controllerCompleter = Completer<InAppWebViewController>();
|
final Completer controllerCompleter = Completer<InAppWebViewController>();
|
||||||
|
@ -68,31 +70,34 @@ void loadUrl() {
|
||||||
textDirection: TextDirection.ltr,
|
textDirection: TextDirection.ltr,
|
||||||
child: InAppWebView(
|
child: InAppWebView(
|
||||||
key: GlobalKey(),
|
key: GlobalKey(),
|
||||||
initialUrlRequest:
|
initialUrlRequest: URLRequest(url: initialUrl),
|
||||||
URLRequest(url: initialUrl),
|
|
||||||
onWebViewCreated: (controller) {
|
onWebViewCreated: (controller) {
|
||||||
controllerCompleter.complete(controller);
|
controllerCompleter.complete(controller);
|
||||||
},
|
},
|
||||||
onLoadStop: (controller, url) {
|
onLoadStop: (controller, url) {
|
||||||
if (url.toString() == initialUrl.toString() && !firstUrlLoad.isCompleted) {
|
if (url.toString() == initialUrl.toString() &&
|
||||||
|
!firstUrlLoad.isCompleted) {
|
||||||
firstUrlLoad.complete(url.toString());
|
firstUrlLoad.complete(url.toString());
|
||||||
} else if (url.toString() == TEST_CROSS_PLATFORM_URL_1.toString() && !loadedUrl.isCompleted) {
|
} else if (url.toString() == TEST_CROSS_PLATFORM_URL_1.toString() &&
|
||||||
|
!loadedUrl.isCompleted) {
|
||||||
loadedUrl.complete(url.toString());
|
loadedUrl.complete(url.toString());
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
final InAppWebViewController controller =
|
final InAppWebViewController controller = await controllerCompleter.future;
|
||||||
await controllerCompleter.future;
|
|
||||||
expect(await firstUrlLoad.future, initialUrl.toString());
|
expect(await firstUrlLoad.future, initialUrl.toString());
|
||||||
|
|
||||||
final htmlCode = "<h1>Hello</h1>";
|
final htmlCode = "<h1>Hello</h1>";
|
||||||
await controller.loadSimulatedRequest(
|
await controller.loadSimulatedRequest(
|
||||||
urlRequest: URLRequest(url: TEST_CROSS_PLATFORM_URL_1),
|
urlRequest: URLRequest(url: TEST_CROSS_PLATFORM_URL_1),
|
||||||
data: Uint8List.fromList(utf8.encode(htmlCode))
|
data: Uint8List.fromList(utf8.encode(htmlCode)));
|
||||||
);
|
|
||||||
expect(await loadedUrl.future, TEST_CROSS_PLATFORM_URL_1.toString());
|
expect(await loadedUrl.future, TEST_CROSS_PLATFORM_URL_1.toString());
|
||||||
expect((await controller.evaluateJavascript(source: "document.body.innerHTML")).toString().trim(), htmlCode);
|
expect(
|
||||||
|
(await controller.evaluateJavascript(source: "document.body.innerHTML"))
|
||||||
|
.toString()
|
||||||
|
.trim(),
|
||||||
|
htmlCode);
|
||||||
}, skip: shouldSkip2);
|
}, skip: shouldSkip2);
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,4 +168,4 @@ void main() {
|
||||||
applePayAPI();
|
applePayAPI();
|
||||||
handlesURLScheme();
|
handlesURLScheme();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,7 @@ void onJsBeforeUnload() {
|
||||||
);
|
);
|
||||||
|
|
||||||
final String url = await onJsBeforeUnloadCompleter.future;
|
final String url = await onJsBeforeUnloadCompleter.future;
|
||||||
expect(url, endsWith("test_assets/in_app_webview_on_js_before_unload.html"));
|
expect(
|
||||||
|
url, endsWith("test_assets/in_app_webview_on_js_before_unload.html"));
|
||||||
}, skip: shouldSkip);
|
}, skip: shouldSkip);
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,8 @@ void onReceivedError() {
|
||||||
group('onReceivedError', () {
|
group('onReceivedError', () {
|
||||||
testWidgets('invalid url', (WidgetTester tester) async {
|
testWidgets('invalid url', (WidgetTester tester) async {
|
||||||
final Completer<String> errorUrlCompleter = Completer<String>();
|
final Completer<String> errorUrlCompleter = Completer<String>();
|
||||||
final Completer<WebResourceErrorType> errorCodeCompleter = Completer<WebResourceErrorType>();
|
final Completer<WebResourceErrorType> errorCodeCompleter =
|
||||||
|
Completer<WebResourceErrorType>();
|
||||||
|
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
Directionality(
|
Directionality(
|
||||||
|
|
|
@ -103,8 +103,8 @@ void programmaticScroll() {
|
||||||
final shouldSkipTest2 = kIsWeb
|
final shouldSkipTest2 = kIsWeb
|
||||||
? true
|
? true
|
||||||
: ![
|
: ![
|
||||||
TargetPlatform.android,
|
TargetPlatform.android,
|
||||||
].contains(defaultTargetPlatform);
|
].contains(defaultTargetPlatform);
|
||||||
|
|
||||||
testWidgets(
|
testWidgets(
|
||||||
'set and get scroll position on Android without Hybrid Composition',
|
'set and get scroll position on Android without Hybrid Composition',
|
||||||
|
|
|
@ -166,9 +166,9 @@ void videoPlaybackPolicy() {
|
||||||
final shouldSkipTest3 = kIsWeb
|
final shouldSkipTest3 = kIsWeb
|
||||||
? true
|
? true
|
||||||
: ![
|
: ![
|
||||||
TargetPlatform.iOS,
|
TargetPlatform.iOS,
|
||||||
TargetPlatform.macOS,
|
TargetPlatform.macOS,
|
||||||
].contains(defaultTargetPlatform);
|
].contains(defaultTargetPlatform);
|
||||||
|
|
||||||
testWidgets(
|
testWidgets(
|
||||||
'Video plays fullscreen when allowsInlineMediaPlayback is false',
|
'Video plays fullscreen when allowsInlineMediaPlayback is false',
|
||||||
|
@ -213,9 +213,9 @@ void videoPlaybackPolicy() {
|
||||||
final shouldSkipTest4 = kIsWeb
|
final shouldSkipTest4 = kIsWeb
|
||||||
? true
|
? true
|
||||||
: ![
|
: ![
|
||||||
TargetPlatform.iOS,
|
TargetPlatform.iOS,
|
||||||
TargetPlatform.macOS,
|
TargetPlatform.macOS,
|
||||||
].contains(defaultTargetPlatform);
|
].contains(defaultTargetPlatform);
|
||||||
// on Android, entering fullscreen requires user interaction
|
// on Android, entering fullscreen requires user interaction
|
||||||
testWidgets('exit fullscreen event', (WidgetTester tester) async {
|
testWidgets('exit fullscreen event', (WidgetTester tester) async {
|
||||||
Completer<InAppWebViewController> controllerCompleter =
|
Completer<InAppWebViewController> controllerCompleter =
|
||||||
|
|
|
@ -152,7 +152,8 @@ void webHistory() {
|
||||||
var url = await pageLoads.stream.first;
|
var url = await pageLoads.stream.first;
|
||||||
expect(url, TEST_WEB_PLATFORM_URL_1.toString());
|
expect(url, TEST_WEB_PLATFORM_URL_1.toString());
|
||||||
|
|
||||||
await controller.evaluateJavascript(source: "document.getElementById('link-page-2').click();");
|
await controller.evaluateJavascript(
|
||||||
|
source: "document.getElementById('link-page-2').click();");
|
||||||
url = await pageLoads.stream.first;
|
url = await pageLoads.stream.first;
|
||||||
expect(url, TEST_WEB_PLATFORM_URL_2.toString());
|
expect(url, TEST_WEB_PLATFORM_URL_2.toString());
|
||||||
|
|
||||||
|
|
|
@ -19,15 +19,15 @@ void clearAndSetProxyOverride() {
|
||||||
final Completer controllerCompleter = Completer<InAppWebViewController>();
|
final Completer controllerCompleter = Completer<InAppWebViewController>();
|
||||||
final Completer<String> pageLoaded = Completer<String>();
|
final Completer<String> pageLoaded = Completer<String>();
|
||||||
|
|
||||||
var proxyAvailable = await WebViewFeature.isFeatureSupported(
|
var proxyAvailable =
|
||||||
WebViewFeature.PROXY_OVERRIDE);
|
await WebViewFeature.isFeatureSupported(WebViewFeature.PROXY_OVERRIDE);
|
||||||
|
|
||||||
if (proxyAvailable) {
|
if (proxyAvailable) {
|
||||||
ProxyController proxyController =
|
ProxyController proxyController = ProxyController.instance();
|
||||||
ProxyController.instance();
|
|
||||||
|
|
||||||
await proxyController.clearProxyOverride();
|
await proxyController.clearProxyOverride();
|
||||||
await proxyController.setProxyOverride(settings: ProxySettings(
|
await proxyController.setProxyOverride(
|
||||||
|
settings: ProxySettings(
|
||||||
proxyRules: [ProxyRule(url: "${environment["NODE_SERVER_IP"]}:8083")],
|
proxyRules: [ProxyRule(url: "${environment["NODE_SERVER_IP"]}:8083")],
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -53,8 +53,17 @@ void clearAndSetProxyOverride() {
|
||||||
final String url = await pageLoaded.future;
|
final String url = await pageLoaded.future;
|
||||||
expect(url, TEST_URL_HTTP_EXAMPLE.toString());
|
expect(url, TEST_URL_HTTP_EXAMPLE.toString());
|
||||||
|
|
||||||
expect(await controller.evaluateJavascript(source: "document.getElementById('url').innerHTML;"), TEST_URL_HTTP_EXAMPLE.toString());
|
expect(
|
||||||
expect(await controller.evaluateJavascript(source: "document.getElementById('method').innerHTML;"), "GET");
|
await controller.evaluateJavascript(
|
||||||
expect(await controller.evaluateJavascript(source: "document.getElementById('headers').innerHTML;"), isNotNull);
|
source: "document.getElementById('url').innerHTML;"),
|
||||||
|
TEST_URL_HTTP_EXAMPLE.toString());
|
||||||
|
expect(
|
||||||
|
await controller.evaluateJavascript(
|
||||||
|
source: "document.getElementById('method').innerHTML;"),
|
||||||
|
"GET");
|
||||||
|
expect(
|
||||||
|
await controller.evaluateJavascript(
|
||||||
|
source: "document.getElementById('headers').innerHTML;"),
|
||||||
|
isNotNull);
|
||||||
}, skip: shouldSkip);
|
}, skip: shouldSkip);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,4 +9,4 @@ void main() {
|
||||||
group('Proxy Controller', () {
|
group('Proxy Controller', () {
|
||||||
clearAndSetProxyOverride();
|
clearAndSetProxyOverride();
|
||||||
}, skip: shouldSkip);
|
}, skip: shouldSkip);
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,4 +11,4 @@ void main() {
|
||||||
shouldInterceptRequest();
|
shouldInterceptRequest();
|
||||||
setServiceWorkerClient();
|
setServiceWorkerClient();
|
||||||
}, skip: shouldSkip);
|
}, skip: shouldSkip);
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,4 +72,4 @@ class MyChromeSafariBrowser extends ChromeSafariBrowser {
|
||||||
void onClosed() {
|
void onClosed() {
|
||||||
browserClosed.complete();
|
browserClosed.complete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,8 @@ import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||||
import 'package:integration_test/integration_test.dart';
|
import 'package:integration_test/integration_test.dart';
|
||||||
|
|
||||||
import 'in_app_webview/main.dart' as in_app_webview_tests;
|
import 'in_app_webview/main.dart' as in_app_webview_tests;
|
||||||
import 'find_interaction_controller/main.dart' as find_interaction_controller_tests;
|
import 'find_interaction_controller/main.dart'
|
||||||
|
as find_interaction_controller_tests;
|
||||||
import 'service_worker_controller/main.dart' as service_worker_controller_tests;
|
import 'service_worker_controller/main.dart' as service_worker_controller_tests;
|
||||||
import 'proxy_controller/main.dart' as proxy_controller_tests;
|
import 'proxy_controller/main.dart' as proxy_controller_tests;
|
||||||
import 'headless_in_app_webview/main.dart' as headless_in_app_webview_tests;
|
import 'headless_in_app_webview/main.dart' as headless_in_app_webview_tests;
|
||||||
|
|
|
@ -184,7 +184,8 @@ class ServiceWorkerController {
|
||||||
///This method should only be called if [WebViewFeature.isFeatureSupported] returns `true` for [WebViewFeature.REQUESTED_WITH_HEADER_CONTROL].
|
///This method should only be called if [WebViewFeature.isFeatureSupported] returns `true` for [WebViewFeature.REQUESTED_WITH_HEADER_CONTROL].
|
||||||
///
|
///
|
||||||
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#setRequestedWithHeaderMode(int)
|
///**Official Android API**: https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#setRequestedWithHeaderMode(int)
|
||||||
static Future<void> setRequestedWithHeaderMode(RequestedWithHeaderMode mode) async {
|
static Future<void> setRequestedWithHeaderMode(
|
||||||
|
RequestedWithHeaderMode mode) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent("mode", () => mode.toNativeValue());
|
args.putIfAbsent("mode", () => mode.toNativeValue());
|
||||||
await _channel.invokeMethod('setRequestedWithHeaderMode', args);
|
await _channel.invokeMethod('setRequestedWithHeaderMode', args);
|
||||||
|
|
|
@ -134,7 +134,8 @@ class WebViewFeature_ {
|
||||||
|
|
||||||
///This feature covers [ServiceWorkerClient.shouldInterceptRequest].
|
///This feature covers [ServiceWorkerClient.shouldInterceptRequest].
|
||||||
static const SERVICE_WORKER_SHOULD_INTERCEPT_REQUEST =
|
static const SERVICE_WORKER_SHOULD_INTERCEPT_REQUEST =
|
||||||
const WebViewFeature_._internal("SERVICE_WORKER_SHOULD_INTERCEPT_REQUEST");
|
const WebViewFeature_._internal(
|
||||||
|
"SERVICE_WORKER_SHOULD_INTERCEPT_REQUEST");
|
||||||
|
|
||||||
///
|
///
|
||||||
static const SHOULD_OVERRIDE_WITH_REDIRECTS =
|
static const SHOULD_OVERRIDE_WITH_REDIRECTS =
|
||||||
|
@ -210,7 +211,8 @@ class WebViewFeature_ {
|
||||||
|
|
||||||
///This feature covers [InAppWebViewSettings.enterpriseAuthenticationAppLinkPolicyEnabled].
|
///This feature covers [InAppWebViewSettings.enterpriseAuthenticationAppLinkPolicyEnabled].
|
||||||
static const ENTERPRISE_AUTHENTICATION_APP_LINK_POLICY =
|
static const ENTERPRISE_AUTHENTICATION_APP_LINK_POLICY =
|
||||||
const WebViewFeature_._internal("ENTERPRISE_AUTHENTICATION_APP_LINK_POLICY");
|
const WebViewFeature_._internal(
|
||||||
|
"ENTERPRISE_AUTHENTICATION_APP_LINK_POLICY");
|
||||||
|
|
||||||
///Return whether a feature is supported at run-time. On devices running Android version `Build.VERSION_CODES.LOLLIPOP` and higher,
|
///Return whether a feature is supported at run-time. On devices running Android version `Build.VERSION_CODES.LOLLIPOP` and higher,
|
||||||
///this will check whether a feature is supported, depending on the combination of the desired feature, the Android version of device,
|
///this will check whether a feature is supported, depending on the combination of the desired feature, the Android version of device,
|
||||||
|
@ -249,7 +251,8 @@ class AndroidWebViewFeature_ {
|
||||||
const AndroidWebViewFeature_._internal("DISABLED_ACTION_MODE_MENU_ITEMS");
|
const AndroidWebViewFeature_._internal("DISABLED_ACTION_MODE_MENU_ITEMS");
|
||||||
|
|
||||||
///
|
///
|
||||||
static const FORCE_DARK = const AndroidWebViewFeature_._internal("FORCE_DARK");
|
static const FORCE_DARK =
|
||||||
|
const AndroidWebViewFeature_._internal("FORCE_DARK");
|
||||||
|
|
||||||
///
|
///
|
||||||
static const FORCE_DARK_STRATEGY =
|
static const FORCE_DARK_STRATEGY =
|
||||||
|
@ -305,7 +308,8 @@ class AndroidWebViewFeature_ {
|
||||||
|
|
||||||
///
|
///
|
||||||
static const SAFE_BROWSING_PRIVACY_POLICY_URL =
|
static const SAFE_BROWSING_PRIVACY_POLICY_URL =
|
||||||
const AndroidWebViewFeature_._internal("SAFE_BROWSING_PRIVACY_POLICY_URL");
|
const AndroidWebViewFeature_._internal(
|
||||||
|
"SAFE_BROWSING_PRIVACY_POLICY_URL");
|
||||||
|
|
||||||
///
|
///
|
||||||
static const SAFE_BROWSING_RESPONSE_BACK_TO_SAFETY =
|
static const SAFE_BROWSING_RESPONSE_BACK_TO_SAFETY =
|
||||||
|
@ -400,7 +404,8 @@ class AndroidWebViewFeature_ {
|
||||||
|
|
||||||
///
|
///
|
||||||
static const WEB_RESOURCE_REQUEST_IS_REDIRECT =
|
static const WEB_RESOURCE_REQUEST_IS_REDIRECT =
|
||||||
const AndroidWebViewFeature_._internal("WEB_RESOURCE_REQUEST_IS_REDIRECT");
|
const AndroidWebViewFeature_._internal(
|
||||||
|
"WEB_RESOURCE_REQUEST_IS_REDIRECT");
|
||||||
|
|
||||||
///
|
///
|
||||||
static const WEB_VIEW_RENDERER_CLIENT_BASIC_USAGE =
|
static const WEB_VIEW_RENDERER_CLIENT_BASIC_USAGE =
|
||||||
|
@ -417,7 +422,7 @@ class AndroidWebViewFeature_ {
|
||||||
|
|
||||||
///This feature covers [InAppWebViewSettings.willSuppressErrorPage].
|
///This feature covers [InAppWebViewSettings.willSuppressErrorPage].
|
||||||
static const SUPPRESS_ERROR_PAGE =
|
static const SUPPRESS_ERROR_PAGE =
|
||||||
const AndroidWebViewFeature_._internal("SUPPRESS_ERROR_PAGE");
|
const AndroidWebViewFeature_._internal("SUPPRESS_ERROR_PAGE");
|
||||||
|
|
||||||
///This feature covers [InAppWebViewSettings.algorithmicDarkeningAllowed].
|
///This feature covers [InAppWebViewSettings.algorithmicDarkeningAllowed].
|
||||||
static const ALGORITHMIC_DARKENING =
|
static const ALGORITHMIC_DARKENING =
|
||||||
|
@ -429,7 +434,8 @@ class AndroidWebViewFeature_ {
|
||||||
|
|
||||||
///This feature covers [InAppWebViewSettings.enterpriseAuthenticationAppLinkPolicyEnabled].
|
///This feature covers [InAppWebViewSettings.enterpriseAuthenticationAppLinkPolicyEnabled].
|
||||||
static const ENTERPRISE_AUTHENTICATION_APP_LINK_POLICY =
|
static const ENTERPRISE_AUTHENTICATION_APP_LINK_POLICY =
|
||||||
const AndroidWebViewFeature_._internal("ENTERPRISE_AUTHENTICATION_APP_LINK_POLICY");
|
const AndroidWebViewFeature_._internal(
|
||||||
|
"ENTERPRISE_AUTHENTICATION_APP_LINK_POLICY");
|
||||||
|
|
||||||
///Return whether a feature is supported at run-time. On devices running Android version `Build.VERSION_CODES.LOLLIPOP` and higher,
|
///Return whether a feature is supported at run-time. On devices running Android version `Build.VERSION_CODES.LOLLIPOP` and higher,
|
||||||
///this will check whether a feature is supported, depending on the combination of the desired feature, the Android version of device,
|
///this will check whether a feature is supported, depending on the combination of the desired feature, the Android version of device,
|
||||||
|
|
|
@ -150,7 +150,8 @@ class ContentBlockerTrigger {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
List<String> loadContextStringList = List<String>.from(map["load-context"] ?? []);
|
List<String> loadContextStringList =
|
||||||
|
List<String>.from(map["load-context"] ?? []);
|
||||||
loadContextStringList.forEach((typeValue) {
|
loadContextStringList.forEach((typeValue) {
|
||||||
var context = ContentBlockerTriggerLoadContext.fromNativeValue(typeValue);
|
var context = ContentBlockerTriggerLoadContext.fromNativeValue(typeValue);
|
||||||
if (context != null) {
|
if (context != null) {
|
||||||
|
@ -185,15 +186,17 @@ class ContentBlockerAction {
|
||||||
///It specify a string that defines a selector list. Use CSS identifiers as the individual selector values, separated by commas.
|
///It specify a string that defines a selector list. Use CSS identifiers as the individual selector values, separated by commas.
|
||||||
String? selector;
|
String? selector;
|
||||||
|
|
||||||
ContentBlockerAction(
|
ContentBlockerAction({required this.type, this.selector}) {
|
||||||
{required this.type, this.selector}) {
|
|
||||||
if (this.type == ContentBlockerActionType.CSS_DISPLAY_NONE) {
|
if (this.type == ContentBlockerActionType.CSS_DISPLAY_NONE) {
|
||||||
assert(this.selector != null);
|
assert(this.selector != null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toMap() {
|
Map<String, dynamic> toMap() {
|
||||||
Map<String, dynamic> map = {"type": type.toNativeValue(), "selector": selector};
|
Map<String, dynamic> map = {
|
||||||
|
"type": type.toNativeValue(),
|
||||||
|
"selector": selector
|
||||||
|
};
|
||||||
|
|
||||||
map.keys
|
map.keys
|
||||||
.where((key) =>
|
.where((key) =>
|
||||||
|
|
|
@ -161,7 +161,8 @@ class CookieManager {
|
||||||
|
|
||||||
if (isSecure != null && isSecure) cookieValue += "; Secure";
|
if (isSecure != null && isSecure) cookieValue += "; Secure";
|
||||||
|
|
||||||
if (sameSite != null) cookieValue += "; SameSite=" + sameSite.toNativeValue();
|
if (sameSite != null)
|
||||||
|
cookieValue += "; SameSite=" + sameSite.toNativeValue();
|
||||||
|
|
||||||
cookieValue += ";";
|
cookieValue += ";";
|
||||||
|
|
||||||
|
@ -243,7 +244,8 @@ class CookieManager {
|
||||||
expiresDate: cookieMap["expiresDate"],
|
expiresDate: cookieMap["expiresDate"],
|
||||||
isSessionOnly: cookieMap["isSessionOnly"],
|
isSessionOnly: cookieMap["isSessionOnly"],
|
||||||
domain: cookieMap["domain"],
|
domain: cookieMap["domain"],
|
||||||
sameSite: HTTPCookieSameSitePolicy.fromNativeValue(cookieMap["sameSite"]),
|
sameSite:
|
||||||
|
HTTPCookieSameSitePolicy.fromNativeValue(cookieMap["sameSite"]),
|
||||||
isSecure: cookieMap["isSecure"],
|
isSecure: cookieMap["isSecure"],
|
||||||
isHttpOnly: cookieMap["isHttpOnly"],
|
isHttpOnly: cookieMap["isHttpOnly"],
|
||||||
path: cookieMap["path"]));
|
path: cookieMap["path"]));
|
||||||
|
@ -364,8 +366,8 @@ class CookieManager {
|
||||||
expiresDate: cookies[i]["expiresDate"],
|
expiresDate: cookies[i]["expiresDate"],
|
||||||
isSessionOnly: cookies[i]["isSessionOnly"],
|
isSessionOnly: cookies[i]["isSessionOnly"],
|
||||||
domain: cookies[i]["domain"],
|
domain: cookies[i]["domain"],
|
||||||
sameSite:
|
sameSite: HTTPCookieSameSitePolicy.fromNativeValue(
|
||||||
HTTPCookieSameSitePolicy.fromNativeValue(cookies[i]["sameSite"]),
|
cookies[i]["sameSite"]),
|
||||||
isSecure: cookies[i]["isSecure"],
|
isSecure: cookies[i]["isSecure"],
|
||||||
isHttpOnly: cookies[i]["isHttpOnly"],
|
isHttpOnly: cookies[i]["isHttpOnly"],
|
||||||
path: cookies[i]["path"]);
|
path: cookies[i]["path"]);
|
||||||
|
@ -533,7 +535,8 @@ class CookieManager {
|
||||||
expiresDate: cookieMap["expiresDate"],
|
expiresDate: cookieMap["expiresDate"],
|
||||||
isSessionOnly: cookieMap["isSessionOnly"],
|
isSessionOnly: cookieMap["isSessionOnly"],
|
||||||
domain: cookieMap["domain"],
|
domain: cookieMap["domain"],
|
||||||
sameSite: HTTPCookieSameSitePolicy.fromNativeValue(cookieMap["sameSite"]),
|
sameSite:
|
||||||
|
HTTPCookieSameSitePolicy.fromNativeValue(cookieMap["sameSite"]),
|
||||||
isSecure: cookieMap["isSecure"],
|
isSecure: cookieMap["isSecure"],
|
||||||
isHttpOnly: cookieMap["isHttpOnly"],
|
isHttpOnly: cookieMap["isHttpOnly"],
|
||||||
path: cookieMap["path"]));
|
path: cookieMap["path"]));
|
||||||
|
@ -595,7 +598,8 @@ class IOSCookieManager {
|
||||||
expiresDate: cookieMap["expiresDate"],
|
expiresDate: cookieMap["expiresDate"],
|
||||||
isSessionOnly: cookieMap["isSessionOnly"],
|
isSessionOnly: cookieMap["isSessionOnly"],
|
||||||
domain: cookieMap["domain"],
|
domain: cookieMap["domain"],
|
||||||
sameSite: HTTPCookieSameSitePolicy.fromNativeValue(cookieMap["sameSite"]),
|
sameSite:
|
||||||
|
HTTPCookieSameSitePolicy.fromNativeValue(cookieMap["sameSite"]),
|
||||||
isSecure: cookieMap["isSecure"],
|
isSecure: cookieMap["isSecure"],
|
||||||
isHttpOnly: cookieMap["isHttpOnly"],
|
isHttpOnly: cookieMap["isHttpOnly"],
|
||||||
path: cookieMap["path"]));
|
path: cookieMap["path"]));
|
||||||
|
|
|
@ -24,10 +24,9 @@ class DebugLoggingSettings {
|
||||||
///Use [print] instead of `developer.log` to log messages.
|
///Use [print] instead of `developer.log` to log messages.
|
||||||
bool usePrint;
|
bool usePrint;
|
||||||
|
|
||||||
DebugLoggingSettings({
|
DebugLoggingSettings(
|
||||||
this.enabled = kDebugMode,
|
{this.enabled = kDebugMode,
|
||||||
this.excludeFilter = const [],
|
this.excludeFilter = const [],
|
||||||
this.maxLogMessageLength = -1,
|
this.maxLogMessageLength = -1,
|
||||||
this.usePrint = false
|
this.usePrint = false});
|
||||||
});
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
export 'find_interaction_controller.dart';
|
export 'find_interaction_controller.dart';
|
||||||
|
|
|
@ -103,8 +103,7 @@ class InAppBrowser {
|
||||||
|
|
||||||
_debugLog(String method, dynamic args) {
|
_debugLog(String method, dynamic args) {
|
||||||
if (InAppBrowser.debugLoggingSettings.enabled) {
|
if (InAppBrowser.debugLoggingSettings.enabled) {
|
||||||
for (var regExp
|
for (var regExp in InAppBrowser.debugLoggingSettings.excludeFilter) {
|
||||||
in InAppBrowser.debugLoggingSettings.excludeFilter) {
|
|
||||||
if (regExp.hasMatch(method)) return;
|
if (regExp.hasMatch(method)) return;
|
||||||
}
|
}
|
||||||
var maxLogMessageLength =
|
var maxLogMessageLength =
|
||||||
|
@ -773,7 +772,8 @@ class InAppBrowser {
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- Android native WebView
|
///- Android native WebView
|
||||||
///- iOS
|
///- iOS
|
||||||
Future<bool?>? onPrintRequest(Uri? url, PrintJobController? printJobController) {
|
Future<bool?>? onPrintRequest(
|
||||||
|
Uri? url, PrintJobController? printJobController) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -318,7 +318,8 @@ class AndroidInAppWebViewOptions
|
||||||
"defaultFixedFontSize": defaultFixedFontSize,
|
"defaultFixedFontSize": defaultFixedFontSize,
|
||||||
"defaultFontSize": defaultFontSize,
|
"defaultFontSize": defaultFontSize,
|
||||||
"defaultTextEncodingName": defaultTextEncodingName,
|
"defaultTextEncodingName": defaultTextEncodingName,
|
||||||
"disabledActionModeMenuItems": disabledActionModeMenuItems?.toNativeValue(),
|
"disabledActionModeMenuItems":
|
||||||
|
disabledActionModeMenuItems?.toNativeValue(),
|
||||||
"fantasyFontFamily": fantasyFontFamily,
|
"fantasyFontFamily": fantasyFontFamily,
|
||||||
"fixedFontFamily": fixedFontFamily,
|
"fixedFontFamily": fixedFontFamily,
|
||||||
"forceDark": forceDark?.toNativeValue(),
|
"forceDark": forceDark?.toNativeValue(),
|
||||||
|
@ -380,7 +381,8 @@ class AndroidInAppWebViewOptions
|
||||||
instance.defaultFontSize = map["defaultFontSize"];
|
instance.defaultFontSize = map["defaultFontSize"];
|
||||||
instance.defaultTextEncodingName = map["defaultTextEncodingName"];
|
instance.defaultTextEncodingName = map["defaultTextEncodingName"];
|
||||||
instance.disabledActionModeMenuItems =
|
instance.disabledActionModeMenuItems =
|
||||||
AndroidActionModeMenuItem.fromNativeValue(map["disabledActionModeMenuItems"]);
|
AndroidActionModeMenuItem.fromNativeValue(
|
||||||
|
map["disabledActionModeMenuItems"]);
|
||||||
instance.fantasyFontFamily = map["fantasyFontFamily"];
|
instance.fantasyFontFamily = map["fantasyFontFamily"];
|
||||||
instance.fixedFontFamily = map["fixedFontFamily"];
|
instance.fixedFontFamily = map["fixedFontFamily"];
|
||||||
instance.forceDark = AndroidForceDark.fromNativeValue(map["forceDark"]);
|
instance.forceDark = AndroidForceDark.fromNativeValue(map["forceDark"]);
|
||||||
|
|
|
@ -24,12 +24,12 @@ class IOSInAppWebViewController {
|
||||||
@Deprecated("Use InAppWebViewController.createPdf instead")
|
@Deprecated("Use InAppWebViewController.createPdf instead")
|
||||||
Future<Uint8List?> createPdf(
|
Future<Uint8List?> createPdf(
|
||||||
{@Deprecated("Use pdfConfiguration instead")
|
{@Deprecated("Use pdfConfiguration instead")
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
IOSWKPDFConfiguration? iosWKPdfConfiguration,
|
IOSWKPDFConfiguration? iosWKPdfConfiguration,
|
||||||
PDFConfiguration? pdfConfiguration}) async {
|
PDFConfiguration? pdfConfiguration}) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent('pdfConfiguration',
|
args.putIfAbsent('pdfConfiguration',
|
||||||
() => pdfConfiguration?.toMap() ?? iosWKPdfConfiguration?.toMap());
|
() => pdfConfiguration?.toMap() ?? iosWKPdfConfiguration?.toMap());
|
||||||
return await _channel.invokeMethod('createPdf', args);
|
return await _channel.invokeMethod('createPdf', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -349,8 +349,8 @@ class IOSInAppWebViewOptions
|
||||||
map["automaticallyAdjustsScrollIndicatorInsets"];
|
map["automaticallyAdjustsScrollIndicatorInsets"];
|
||||||
instance.accessibilityIgnoresInvertColors =
|
instance.accessibilityIgnoresInvertColors =
|
||||||
map["accessibilityIgnoresInvertColors"];
|
map["accessibilityIgnoresInvertColors"];
|
||||||
instance.decelerationRate =
|
instance.decelerationRate = IOSUIScrollViewDecelerationRate.fromNativeValue(
|
||||||
IOSUIScrollViewDecelerationRate.fromNativeValue(map["decelerationRate"])!;
|
map["decelerationRate"])!;
|
||||||
instance.alwaysBounceVertical = map["alwaysBounceVertical"];
|
instance.alwaysBounceVertical = map["alwaysBounceVertical"];
|
||||||
instance.alwaysBounceHorizontal = map["alwaysBounceHorizontal"];
|
instance.alwaysBounceHorizontal = map["alwaysBounceHorizontal"];
|
||||||
instance.scrollsToTop = map["scrollsToTop"];
|
instance.scrollsToTop = map["scrollsToTop"];
|
||||||
|
|
|
@ -87,7 +87,7 @@ class HeadlessInAppWebView implements WebView, Disposable {
|
||||||
this.onReceivedServerTrustAuthRequest,
|
this.onReceivedServerTrustAuthRequest,
|
||||||
this.onReceivedClientCertRequest,
|
this.onReceivedClientCertRequest,
|
||||||
@Deprecated('Use FindInteractionController.onFindResultReceived instead')
|
@Deprecated('Use FindInteractionController.onFindResultReceived instead')
|
||||||
this.onFindResultReceived,
|
this.onFindResultReceived,
|
||||||
this.shouldInterceptAjaxRequest,
|
this.shouldInterceptAjaxRequest,
|
||||||
this.onAjaxReadyStateChange,
|
this.onAjaxReadyStateChange,
|
||||||
this.onAjaxProgress,
|
this.onAjaxProgress,
|
||||||
|
|
|
@ -79,7 +79,7 @@ class InAppWebView extends StatefulWidget implements WebView {
|
||||||
this.onReceivedServerTrustAuthRequest,
|
this.onReceivedServerTrustAuthRequest,
|
||||||
this.onReceivedClientCertRequest,
|
this.onReceivedClientCertRequest,
|
||||||
@Deprecated('Use FindInteractionController.onFindResultReceived instead')
|
@Deprecated('Use FindInteractionController.onFindResultReceived instead')
|
||||||
this.onFindResultReceived,
|
this.onFindResultReceived,
|
||||||
this.shouldInterceptAjaxRequest,
|
this.shouldInterceptAjaxRequest,
|
||||||
this.onAjaxReadyStateChange,
|
this.onAjaxReadyStateChange,
|
||||||
this.onAjaxProgress,
|
this.onAjaxProgress,
|
||||||
|
|
|
@ -534,7 +534,8 @@ class InAppWebViewController {
|
||||||
|
|
||||||
if (_webview != null) {
|
if (_webview != null) {
|
||||||
if (_webview!.onFormResubmission != null)
|
if (_webview!.onFormResubmission != null)
|
||||||
return (await _webview!.onFormResubmission!(this, uri))?.toNativeValue();
|
return (await _webview!.onFormResubmission!(this, uri))
|
||||||
|
?.toNativeValue();
|
||||||
else {
|
else {
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
return (await _webview!.androidOnFormResubmission!(this, uri))
|
return (await _webview!.androidOnFormResubmission!(this, uri))
|
||||||
|
@ -802,8 +803,12 @@ class InAppWebViewController {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "onFindResultReceived":
|
case "onFindResultReceived":
|
||||||
if ((_webview != null && (_webview!.onFindResultReceived != null ||
|
if ((_webview != null &&
|
||||||
(_webview!.findInteractionController != null && _webview!.findInteractionController!.onFindResultReceived != null))) ||
|
(_webview!.onFindResultReceived != null ||
|
||||||
|
(_webview!.findInteractionController != null &&
|
||||||
|
_webview!.findInteractionController!
|
||||||
|
.onFindResultReceived !=
|
||||||
|
null))) ||
|
||||||
_inAppBrowser != null) {
|
_inAppBrowser != null) {
|
||||||
int activeMatchOrdinal = call.arguments["activeMatchOrdinal"];
|
int activeMatchOrdinal = call.arguments["activeMatchOrdinal"];
|
||||||
int numberOfMatches = call.arguments["numberOfMatches"];
|
int numberOfMatches = call.arguments["numberOfMatches"];
|
||||||
|
@ -813,19 +818,23 @@ class InAppWebViewController {
|
||||||
_webview!.findInteractionController!.onFindResultReceived !=
|
_webview!.findInteractionController!.onFindResultReceived !=
|
||||||
null)
|
null)
|
||||||
_webview!.findInteractionController!.onFindResultReceived!(
|
_webview!.findInteractionController!.onFindResultReceived!(
|
||||||
_webview!.findInteractionController!, activeMatchOrdinal,
|
_webview!.findInteractionController!,
|
||||||
numberOfMatches, isDoneCounting);
|
activeMatchOrdinal,
|
||||||
|
numberOfMatches,
|
||||||
|
isDoneCounting);
|
||||||
else
|
else
|
||||||
_webview!.onFindResultReceived!(
|
_webview!.onFindResultReceived!(
|
||||||
this, activeMatchOrdinal, numberOfMatches, isDoneCounting);
|
this, activeMatchOrdinal, numberOfMatches, isDoneCounting);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
if (_inAppBrowser!.findInteractionController != null &&
|
if (_inAppBrowser!.findInteractionController != null &&
|
||||||
_inAppBrowser!.findInteractionController!
|
_inAppBrowser!
|
||||||
.onFindResultReceived != null)
|
.findInteractionController!.onFindResultReceived !=
|
||||||
|
null)
|
||||||
_inAppBrowser!.findInteractionController!.onFindResultReceived!(
|
_inAppBrowser!.findInteractionController!.onFindResultReceived!(
|
||||||
_webview!.findInteractionController!, activeMatchOrdinal,
|
_webview!.findInteractionController!,
|
||||||
numberOfMatches, isDoneCounting);
|
activeMatchOrdinal,
|
||||||
|
numberOfMatches,
|
||||||
|
isDoneCounting);
|
||||||
else
|
else
|
||||||
_inAppBrowser!.onFindResultReceived(
|
_inAppBrowser!.onFindResultReceived(
|
||||||
activeMatchOrdinal, numberOfMatches, isDoneCounting);
|
activeMatchOrdinal, numberOfMatches, isDoneCounting);
|
||||||
|
@ -1243,9 +1252,11 @@ class InAppWebViewController {
|
||||||
AjaxRequest request = AjaxRequest.fromMap(arguments)!;
|
AjaxRequest request = AjaxRequest.fromMap(arguments)!;
|
||||||
|
|
||||||
if (_webview != null && _webview!.onAjaxReadyStateChange != null)
|
if (_webview != null && _webview!.onAjaxReadyStateChange != null)
|
||||||
return (await _webview!.onAjaxReadyStateChange!(this, request))?.toNativeValue();
|
return (await _webview!.onAjaxReadyStateChange!(this, request))
|
||||||
|
?.toNativeValue();
|
||||||
else
|
else
|
||||||
return (await _inAppBrowser!.onAjaxReadyStateChange(request))?.toNativeValue();
|
return (await _inAppBrowser!.onAjaxReadyStateChange(request))
|
||||||
|
?.toNativeValue();
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
case "onAjaxProgress":
|
case "onAjaxProgress":
|
||||||
|
@ -1255,9 +1266,11 @@ class InAppWebViewController {
|
||||||
AjaxRequest request = AjaxRequest.fromMap(arguments)!;
|
AjaxRequest request = AjaxRequest.fromMap(arguments)!;
|
||||||
|
|
||||||
if (_webview != null && _webview!.onAjaxProgress != null)
|
if (_webview != null && _webview!.onAjaxProgress != null)
|
||||||
return (await _webview!.onAjaxProgress!(this, request))?.toNativeValue();
|
return (await _webview!.onAjaxProgress!(this, request))
|
||||||
|
?.toNativeValue();
|
||||||
else
|
else
|
||||||
return (await _inAppBrowser!.onAjaxProgress(request))?.toNativeValue();
|
return (await _inAppBrowser!.onAjaxProgress(request))
|
||||||
|
?.toNativeValue();
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
case "shouldInterceptFetchRequest":
|
case "shouldInterceptFetchRequest":
|
||||||
|
@ -2293,7 +2306,8 @@ class InAppWebViewController {
|
||||||
///- Android native WebView ([Official API - PrintManager.print](https://developer.android.com/reference/android/print/PrintManager#print(java.lang.String,%20android.print.PrintDocumentAdapter,%20android.print.PrintAttributes)))
|
///- Android native WebView ([Official API - PrintManager.print](https://developer.android.com/reference/android/print/PrintManager#print(java.lang.String,%20android.print.PrintDocumentAdapter,%20android.print.PrintAttributes)))
|
||||||
///- iOS ([Official API - UIPrintInteractionController.present](https://developer.apple.com/documentation/uikit/uiprintinteractioncontroller/1618149-present))
|
///- iOS ([Official API - UIPrintInteractionController.present](https://developer.apple.com/documentation/uikit/uiprintinteractioncontroller/1618149-present))
|
||||||
///- Web ([Official API - Window.print](https://developer.mozilla.org/en-US/docs/Web/API/Window/print))
|
///- Web ([Official API - Window.print](https://developer.mozilla.org/en-US/docs/Web/API/Window/print))
|
||||||
Future<PrintJobController?> printCurrentPage({PrintJobSettings? settings}) async {
|
Future<PrintJobController?> printCurrentPage(
|
||||||
|
{PrintJobSettings? settings}) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent("settings", () => settings?.toMap());
|
args.putIfAbsent("settings", () => settings?.toMap());
|
||||||
String? jobId = await _channel.invokeMethod('printCurrentPage', args);
|
String? jobId = await _channel.invokeMethod('printCurrentPage', args);
|
||||||
|
@ -2838,7 +2852,8 @@ class InAppWebViewController {
|
||||||
if (defaultTargetPlatform == TargetPlatform.android) {
|
if (defaultTargetPlatform == TargetPlatform.android) {
|
||||||
assert(filePath.endsWith("." + WebArchiveFormat.MHT.toNativeValue()));
|
assert(filePath.endsWith("." + WebArchiveFormat.MHT.toNativeValue()));
|
||||||
} else if (defaultTargetPlatform == TargetPlatform.iOS) {
|
} else if (defaultTargetPlatform == TargetPlatform.iOS) {
|
||||||
assert(filePath.endsWith("." + WebArchiveFormat.WEBARCHIVE.toNativeValue()));
|
assert(filePath
|
||||||
|
.endsWith("." + WebArchiveFormat.WEBARCHIVE.toNativeValue()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3390,7 +3405,10 @@ class InAppWebViewController {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - WKWebView.loadSimulatedRequest(_:response:responseData:)](https://developer.apple.com/documentation/webkit/wkwebview/3763094-loadsimulatedrequest) and [Official API - WKWebView.loadSimulatedRequest(_:responseHTML:)](https://developer.apple.com/documentation/webkit/wkwebview/3763095-loadsimulatedrequest)).
|
///- iOS ([Official API - WKWebView.loadSimulatedRequest(_:response:responseData:)](https://developer.apple.com/documentation/webkit/wkwebview/3763094-loadsimulatedrequest) and [Official API - WKWebView.loadSimulatedRequest(_:responseHTML:)](https://developer.apple.com/documentation/webkit/wkwebview/3763095-loadsimulatedrequest)).
|
||||||
Future<void> loadSimulatedRequest({required URLRequest urlRequest, required Uint8List data, URLResponse? urlResponse}) async {
|
Future<void> loadSimulatedRequest(
|
||||||
|
{required URLRequest urlRequest,
|
||||||
|
required Uint8List data,
|
||||||
|
URLResponse? urlResponse}) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent('urlRequest', () => urlRequest.toMap());
|
args.putIfAbsent('urlRequest', () => urlRequest.toMap());
|
||||||
args.putIfAbsent('data', () => data);
|
args.putIfAbsent('data', () => data);
|
||||||
|
|
|
@ -12,7 +12,6 @@ import '../android/webview_feature.dart';
|
||||||
import '../in_app_webview/in_app_webview_controller.dart';
|
import '../in_app_webview/in_app_webview_controller.dart';
|
||||||
import '../context_menu.dart';
|
import '../context_menu.dart';
|
||||||
|
|
||||||
|
|
||||||
///This class represents all the WebView settings available.
|
///This class represents all the WebView settings available.
|
||||||
class InAppWebViewSettings {
|
class InAppWebViewSettings {
|
||||||
///Set to `true` to be able to listen at the [WebView.shouldOverrideUrlLoading] event. The default value is `false`.
|
///Set to `true` to be able to listen at the [WebView.shouldOverrideUrlLoading] event. The default value is `false`.
|
||||||
|
@ -1184,7 +1183,8 @@ class InAppWebViewSettings {
|
||||||
this.fantasyFontFamily = "fantasy",
|
this.fantasyFontFamily = "fantasy",
|
||||||
this.fixedFontFamily = "monospace",
|
this.fixedFontFamily = "monospace",
|
||||||
this.forceDark = ForceDark.OFF,
|
this.forceDark = ForceDark.OFF,
|
||||||
this.forceDarkStrategy = ForceDarkStrategy.PREFER_WEB_THEME_OVER_USER_AGENT_DARKENING,
|
this.forceDarkStrategy =
|
||||||
|
ForceDarkStrategy.PREFER_WEB_THEME_OVER_USER_AGENT_DARKENING,
|
||||||
this.geolocationEnabled = true,
|
this.geolocationEnabled = true,
|
||||||
this.layoutAlgorithm,
|
this.layoutAlgorithm,
|
||||||
this.loadWithOverviewMode = true,
|
this.loadWithOverviewMode = true,
|
||||||
|
@ -1277,11 +1277,16 @@ class InAppWebViewSettings {
|
||||||
!this.resourceCustomSchemes.contains("https"));
|
!this.resourceCustomSchemes.contains("https"));
|
||||||
assert(
|
assert(
|
||||||
allowingReadAccessTo == null || allowingReadAccessTo!.isScheme("file"));
|
allowingReadAccessTo == null || allowingReadAccessTo!.isScheme("file"));
|
||||||
assert((minimumViewportInset == null && maximumViewportInset == null) ||
|
assert(
|
||||||
minimumViewportInset != null && maximumViewportInset != null &&
|
(minimumViewportInset == null && maximumViewportInset == null) ||
|
||||||
minimumViewportInset!.isNonNegative && maximumViewportInset!.isNonNegative &&
|
minimumViewportInset != null &&
|
||||||
minimumViewportInset!.vertical <= maximumViewportInset!.vertical &&
|
maximumViewportInset != null &&
|
||||||
minimumViewportInset!.horizontal <= maximumViewportInset!.horizontal,
|
minimumViewportInset!.isNonNegative &&
|
||||||
|
maximumViewportInset!.isNonNegative &&
|
||||||
|
minimumViewportInset!.vertical <=
|
||||||
|
maximumViewportInset!.vertical &&
|
||||||
|
minimumViewportInset!.horizontal <=
|
||||||
|
maximumViewportInset!.horizontal,
|
||||||
"minimumViewportInset cannot be larger than maximumViewportInset");
|
"minimumViewportInset cannot be larger than maximumViewportInset");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1341,7 +1346,8 @@ class InAppWebViewSettings {
|
||||||
"defaultFixedFontSize": defaultFixedFontSize,
|
"defaultFixedFontSize": defaultFixedFontSize,
|
||||||
"defaultFontSize": defaultFontSize,
|
"defaultFontSize": defaultFontSize,
|
||||||
"defaultTextEncodingName": defaultTextEncodingName,
|
"defaultTextEncodingName": defaultTextEncodingName,
|
||||||
"disabledActionModeMenuItems": disabledActionModeMenuItems?.toNativeValue(),
|
"disabledActionModeMenuItems":
|
||||||
|
disabledActionModeMenuItems?.toNativeValue(),
|
||||||
"fantasyFontFamily": fantasyFontFamily,
|
"fantasyFontFamily": fantasyFontFamily,
|
||||||
"fixedFontFamily": fixedFontFamily,
|
"fixedFontFamily": fixedFontFamily,
|
||||||
"forceDark": forceDark?.toNativeValue(),
|
"forceDark": forceDark?.toNativeValue(),
|
||||||
|
@ -1381,7 +1387,8 @@ class InAppWebViewSettings {
|
||||||
"willSuppressErrorPage": willSuppressErrorPage,
|
"willSuppressErrorPage": willSuppressErrorPage,
|
||||||
"algorithmicDarkeningAllowed": algorithmicDarkeningAllowed,
|
"algorithmicDarkeningAllowed": algorithmicDarkeningAllowed,
|
||||||
"requestedWithHeaderMode": requestedWithHeaderMode?.toNativeValue(),
|
"requestedWithHeaderMode": requestedWithHeaderMode?.toNativeValue(),
|
||||||
"enterpriseAuthenticationAppLinkPolicyEnabled": enterpriseAuthenticationAppLinkPolicyEnabled,
|
"enterpriseAuthenticationAppLinkPolicyEnabled":
|
||||||
|
enterpriseAuthenticationAppLinkPolicyEnabled,
|
||||||
"disallowOverScroll": disallowOverScroll,
|
"disallowOverScroll": disallowOverScroll,
|
||||||
"enableViewportScale": enableViewportScale,
|
"enableViewportScale": enableViewportScale,
|
||||||
"suppressesIncrementalRendering": suppressesIncrementalRendering,
|
"suppressesIncrementalRendering": suppressesIncrementalRendering,
|
||||||
|
@ -1450,7 +1457,8 @@ class InAppWebViewSettings {
|
||||||
List<String> dataDetectorTypesList =
|
List<String> dataDetectorTypesList =
|
||||||
List<String>.from(map["dataDetectorTypes"] ?? []);
|
List<String>.from(map["dataDetectorTypes"] ?? []);
|
||||||
dataDetectorTypesList.forEach((dataDetectorTypeValue) {
|
dataDetectorTypesList.forEach((dataDetectorTypeValue) {
|
||||||
var dataDetectorType = DataDetectorTypes.fromNativeValue(dataDetectorTypeValue);
|
var dataDetectorType =
|
||||||
|
DataDetectorTypes.fromNativeValue(dataDetectorTypeValue);
|
||||||
if (dataDetectorType != null) {
|
if (dataDetectorType != null) {
|
||||||
dataDetectorTypes.add(dataDetectorType);
|
dataDetectorTypes.add(dataDetectorType);
|
||||||
}
|
}
|
||||||
|
@ -1523,11 +1531,13 @@ class InAppWebViewSettings {
|
||||||
settings.defaultFontSize = map["defaultFontSize"];
|
settings.defaultFontSize = map["defaultFontSize"];
|
||||||
settings.defaultTextEncodingName = map["defaultTextEncodingName"];
|
settings.defaultTextEncodingName = map["defaultTextEncodingName"];
|
||||||
settings.disabledActionModeMenuItems =
|
settings.disabledActionModeMenuItems =
|
||||||
ActionModeMenuItem.fromNativeValue(map["disabledActionModeMenuItems"]);
|
ActionModeMenuItem.fromNativeValue(
|
||||||
|
map["disabledActionModeMenuItems"]);
|
||||||
settings.fantasyFontFamily = map["fantasyFontFamily"];
|
settings.fantasyFontFamily = map["fantasyFontFamily"];
|
||||||
settings.fixedFontFamily = map["fixedFontFamily"];
|
settings.fixedFontFamily = map["fixedFontFamily"];
|
||||||
settings.forceDark = ForceDark.fromNativeValue(map["forceDark"]);
|
settings.forceDark = ForceDark.fromNativeValue(map["forceDark"]);
|
||||||
settings.forceDarkStrategy = ForceDarkStrategy.fromNativeValue(map["forceDarkStrategy"]);
|
settings.forceDarkStrategy =
|
||||||
|
ForceDarkStrategy.fromNativeValue(map["forceDarkStrategy"]);
|
||||||
settings.geolocationEnabled = map["geolocationEnabled"];
|
settings.geolocationEnabled = map["geolocationEnabled"];
|
||||||
settings.layoutAlgorithm =
|
settings.layoutAlgorithm =
|
||||||
LayoutAlgorithm.fromNativeValue(map["layoutAlgorithm"]);
|
LayoutAlgorithm.fromNativeValue(map["layoutAlgorithm"]);
|
||||||
|
@ -1545,17 +1555,20 @@ class InAppWebViewSettings {
|
||||||
settings.hardwareAcceleration = map["hardwareAcceleration"];
|
settings.hardwareAcceleration = map["hardwareAcceleration"];
|
||||||
settings.supportMultipleWindows = map["supportMultipleWindows"];
|
settings.supportMultipleWindows = map["supportMultipleWindows"];
|
||||||
settings.regexToCancelSubFramesLoading =
|
settings.regexToCancelSubFramesLoading =
|
||||||
map["regexToCancelSubFramesLoading"];
|
map["regexToCancelSubFramesLoading"];
|
||||||
settings.useHybridComposition = map["useHybridComposition"];
|
settings.useHybridComposition = map["useHybridComposition"];
|
||||||
settings.useShouldInterceptRequest = map["useShouldInterceptRequest"];
|
settings.useShouldInterceptRequest = map["useShouldInterceptRequest"];
|
||||||
settings.useOnRenderProcessGone = map["useOnRenderProcessGone"];
|
settings.useOnRenderProcessGone = map["useOnRenderProcessGone"];
|
||||||
settings.overScrollMode = OverScrollMode.fromNativeValue(map["overScrollMode"]);
|
settings.overScrollMode =
|
||||||
|
OverScrollMode.fromNativeValue(map["overScrollMode"]);
|
||||||
settings.networkAvailable = map["networkAvailable"];
|
settings.networkAvailable = map["networkAvailable"];
|
||||||
settings.scrollBarStyle = ScrollBarStyle.fromNativeValue(map["scrollBarStyle"]);
|
settings.scrollBarStyle =
|
||||||
|
ScrollBarStyle.fromNativeValue(map["scrollBarStyle"]);
|
||||||
settings.verticalScrollbarPosition =
|
settings.verticalScrollbarPosition =
|
||||||
VerticalScrollbarPosition.fromNativeValue(map["verticalScrollbarPosition"]);
|
VerticalScrollbarPosition.fromNativeValue(
|
||||||
|
map["verticalScrollbarPosition"]);
|
||||||
settings.scrollBarDefaultDelayBeforeFade =
|
settings.scrollBarDefaultDelayBeforeFade =
|
||||||
map["scrollBarDefaultDelayBeforeFade"];
|
map["scrollBarDefaultDelayBeforeFade"];
|
||||||
settings.scrollbarFadingEnabled = map["scrollbarFadingEnabled"];
|
settings.scrollbarFadingEnabled = map["scrollbarFadingEnabled"];
|
||||||
settings.scrollBarFadeDuration = map["scrollBarFadeDuration"];
|
settings.scrollBarFadeDuration = map["scrollBarFadeDuration"];
|
||||||
settings.rendererPriorityPolicy = RendererPriorityPolicy.fromMap(
|
settings.rendererPriorityPolicy = RendererPriorityPolicy.fromMap(
|
||||||
|
@ -1570,37 +1583,40 @@ class InAppWebViewSettings {
|
||||||
settings.horizontalScrollbarTrackColor =
|
settings.horizontalScrollbarTrackColor =
|
||||||
UtilColor.fromHex(map["horizontalScrollbarTrackColor"]);
|
UtilColor.fromHex(map["horizontalScrollbarTrackColor"]);
|
||||||
settings.willSuppressErrorPage = map["willSuppressErrorPage"];
|
settings.willSuppressErrorPage = map["willSuppressErrorPage"];
|
||||||
settings.algorithmicDarkeningAllowed = map["algorithmicDarkeningAllowed"];
|
settings.algorithmicDarkeningAllowed =
|
||||||
settings.requestedWithHeaderMode = RequestedWithHeaderMode.fromNativeValue(map["requestedWithHeaderMode"]);
|
map["algorithmicDarkeningAllowed"];
|
||||||
settings.enterpriseAuthenticationAppLinkPolicyEnabled = map["enterpriseAuthenticationAppLinkPolicyEnabled"];
|
settings.requestedWithHeaderMode =
|
||||||
}
|
RequestedWithHeaderMode.fromNativeValue(
|
||||||
else if (defaultTargetPlatform == TargetPlatform.iOS ||
|
map["requestedWithHeaderMode"]);
|
||||||
|
settings.enterpriseAuthenticationAppLinkPolicyEnabled =
|
||||||
|
map["enterpriseAuthenticationAppLinkPolicyEnabled"];
|
||||||
|
} else if (defaultTargetPlatform == TargetPlatform.iOS ||
|
||||||
defaultTargetPlatform == TargetPlatform.macOS) {
|
defaultTargetPlatform == TargetPlatform.macOS) {
|
||||||
settings.disallowOverScroll = map["disallowOverScroll"];
|
settings.disallowOverScroll = map["disallowOverScroll"];
|
||||||
settings.enableViewportScale = map["enableViewportScale"];
|
settings.enableViewportScale = map["enableViewportScale"];
|
||||||
settings.suppressesIncrementalRendering =
|
settings.suppressesIncrementalRendering =
|
||||||
map["suppressesIncrementalRendering"];
|
map["suppressesIncrementalRendering"];
|
||||||
settings.allowsAirPlayForMediaPlayback =
|
settings.allowsAirPlayForMediaPlayback =
|
||||||
map["allowsAirPlayForMediaPlayback"];
|
map["allowsAirPlayForMediaPlayback"];
|
||||||
settings.allowsBackForwardNavigationGestures =
|
settings.allowsBackForwardNavigationGestures =
|
||||||
map["allowsBackForwardNavigationGestures"];
|
map["allowsBackForwardNavigationGestures"];
|
||||||
settings.allowsLinkPreview = map["allowsLinkPreview"];
|
settings.allowsLinkPreview = map["allowsLinkPreview"];
|
||||||
settings.ignoresViewportScaleLimits = map["ignoresViewportScaleLimits"];
|
settings.ignoresViewportScaleLimits = map["ignoresViewportScaleLimits"];
|
||||||
settings.allowsInlineMediaPlayback = map["allowsInlineMediaPlayback"];
|
settings.allowsInlineMediaPlayback = map["allowsInlineMediaPlayback"];
|
||||||
settings.allowsPictureInPictureMediaPlayback =
|
settings.allowsPictureInPictureMediaPlayback =
|
||||||
map["allowsPictureInPictureMediaPlayback"];
|
map["allowsPictureInPictureMediaPlayback"];
|
||||||
settings.isFraudulentWebsiteWarningEnabled =
|
settings.isFraudulentWebsiteWarningEnabled =
|
||||||
map["isFraudulentWebsiteWarningEnabled"];
|
map["isFraudulentWebsiteWarningEnabled"];
|
||||||
settings.selectionGranularity =
|
settings.selectionGranularity =
|
||||||
SelectionGranularity.fromNativeValue(map["selectionGranularity"])!;
|
SelectionGranularity.fromNativeValue(map["selectionGranularity"])!;
|
||||||
settings.dataDetectorTypes = dataDetectorTypes;
|
settings.dataDetectorTypes = dataDetectorTypes;
|
||||||
settings.sharedCookiesEnabled = map["sharedCookiesEnabled"];
|
settings.sharedCookiesEnabled = map["sharedCookiesEnabled"];
|
||||||
settings.automaticallyAdjustsScrollIndicatorInsets =
|
settings.automaticallyAdjustsScrollIndicatorInsets =
|
||||||
map["automaticallyAdjustsScrollIndicatorInsets"];
|
map["automaticallyAdjustsScrollIndicatorInsets"];
|
||||||
settings.accessibilityIgnoresInvertColors =
|
settings.accessibilityIgnoresInvertColors =
|
||||||
map["accessibilityIgnoresInvertColors"];
|
map["accessibilityIgnoresInvertColors"];
|
||||||
settings.decelerationRate =
|
settings.decelerationRate = ScrollViewDecelerationRate.fromNativeValue(
|
||||||
ScrollViewDecelerationRate.fromNativeValue(map["decelerationRate"])!;
|
map["decelerationRate"])!;
|
||||||
settings.alwaysBounceVertical = map["alwaysBounceVertical"];
|
settings.alwaysBounceVertical = map["alwaysBounceVertical"];
|
||||||
settings.alwaysBounceHorizontal = map["alwaysBounceHorizontal"];
|
settings.alwaysBounceHorizontal = map["alwaysBounceHorizontal"];
|
||||||
settings.scrollsToTop = map["scrollsToTop"];
|
settings.scrollsToTop = map["scrollsToTop"];
|
||||||
|
@ -1608,31 +1624,33 @@ class InAppWebViewSettings {
|
||||||
settings.maximumZoomScale = map["maximumZoomScale"];
|
settings.maximumZoomScale = map["maximumZoomScale"];
|
||||||
settings.minimumZoomScale = map["minimumZoomScale"];
|
settings.minimumZoomScale = map["minimumZoomScale"];
|
||||||
settings.contentInsetAdjustmentBehavior =
|
settings.contentInsetAdjustmentBehavior =
|
||||||
ScrollViewContentInsetAdjustmentBehavior.fromNativeValue(
|
ScrollViewContentInsetAdjustmentBehavior.fromNativeValue(
|
||||||
map["contentInsetAdjustmentBehavior"])!;
|
map["contentInsetAdjustmentBehavior"])!;
|
||||||
settings.isDirectionalLockEnabled = map["isDirectionalLockEnabled"];
|
settings.isDirectionalLockEnabled = map["isDirectionalLockEnabled"];
|
||||||
settings.mediaType = map["mediaType"];
|
settings.mediaType = map["mediaType"];
|
||||||
settings.pageZoom = map["pageZoom"];
|
settings.pageZoom = map["pageZoom"];
|
||||||
settings.limitsNavigationsToAppBoundDomains =
|
settings.limitsNavigationsToAppBoundDomains =
|
||||||
map["limitsNavigationsToAppBoundDomains"];
|
map["limitsNavigationsToAppBoundDomains"];
|
||||||
settings.useOnNavigationResponse = map["useOnNavigationResponse"];
|
settings.useOnNavigationResponse = map["useOnNavigationResponse"];
|
||||||
settings.applePayAPIEnabled = map["applePayAPIEnabled"];
|
settings.applePayAPIEnabled = map["applePayAPIEnabled"];
|
||||||
settings.allowingReadAccessTo = map["allowingReadAccessTo"] != null
|
settings.allowingReadAccessTo = map["allowingReadAccessTo"] != null
|
||||||
? Uri.parse(map["allowingReadAccessTo"])
|
? Uri.parse(map["allowingReadAccessTo"])
|
||||||
: null;
|
: null;
|
||||||
settings.disableLongPressContextMenuOnLinks =
|
settings.disableLongPressContextMenuOnLinks =
|
||||||
map["disableLongPressContextMenuOnLinks"];
|
map["disableLongPressContextMenuOnLinks"];
|
||||||
settings.disableInputAccessoryView = map["disableInputAccessoryView"];
|
settings.disableInputAccessoryView = map["disableInputAccessoryView"];
|
||||||
settings.underPageBackgroundColor =
|
settings.underPageBackgroundColor =
|
||||||
UtilColor.fromHex(map["underPageBackgroundColor"]);
|
UtilColor.fromHex(map["underPageBackgroundColor"]);
|
||||||
settings.isTextInteractionEnabled = map["isTextInteractionEnabled"];
|
settings.isTextInteractionEnabled = map["isTextInteractionEnabled"];
|
||||||
settings.isSiteSpecificQuirksModeEnabled =
|
settings.isSiteSpecificQuirksModeEnabled =
|
||||||
map["isSiteSpecificQuirksModeEnabled"];
|
map["isSiteSpecificQuirksModeEnabled"];
|
||||||
settings.upgradeKnownHostsToHTTPS = map["upgradeKnownHostsToHTTPS"];
|
settings.upgradeKnownHostsToHTTPS = map["upgradeKnownHostsToHTTPS"];
|
||||||
settings.isElementFullscreenEnabled = map["isElementFullscreenEnabled"];
|
settings.isElementFullscreenEnabled = map["isElementFullscreenEnabled"];
|
||||||
settings.isFindInteractionEnabled = map["isFindInteractionEnabled"];
|
settings.isFindInteractionEnabled = map["isFindInteractionEnabled"];
|
||||||
settings.minimumViewportInset = MapEdgeInsets.fromMap(map["minimumViewportInset"]?.cast<String, double>());
|
settings.minimumViewportInset = MapEdgeInsets.fromMap(
|
||||||
settings.maximumViewportInset = MapEdgeInsets.fromMap(map["maximumViewportInset"]?.cast<String, double>());
|
map["minimumViewportInset"]?.cast<String, double>());
|
||||||
|
settings.maximumViewportInset = MapEdgeInsets.fromMap(
|
||||||
|
map["maximumViewportInset"]?.cast<String, double>());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return settings;
|
return settings;
|
||||||
|
|
|
@ -5,4 +5,4 @@ export 'in_app_webview_settings.dart';
|
||||||
export 'headless_in_app_webview.dart';
|
export 'headless_in_app_webview.dart';
|
||||||
export 'android/main.dart';
|
export 'android/main.dart';
|
||||||
export 'apple/main.dart';
|
export 'apple/main.dart';
|
||||||
export '../find_interaction/find_interaction_controller.dart';
|
export '../find_interaction/find_interaction_controller.dart';
|
||||||
|
|
|
@ -993,7 +993,7 @@ abstract class WebView {
|
||||||
this.onReceivedServerTrustAuthRequest,
|
this.onReceivedServerTrustAuthRequest,
|
||||||
this.onReceivedClientCertRequest,
|
this.onReceivedClientCertRequest,
|
||||||
@Deprecated('Use FindInteractionController.onFindResultReceived instead')
|
@Deprecated('Use FindInteractionController.onFindResultReceived instead')
|
||||||
this.onFindResultReceived,
|
this.onFindResultReceived,
|
||||||
this.shouldInterceptAjaxRequest,
|
this.shouldInterceptAjaxRequest,
|
||||||
this.onAjaxReadyStateChange,
|
this.onAjaxReadyStateChange,
|
||||||
this.onAjaxProgress,
|
this.onAjaxProgress,
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
export 'print_job_controller.dart';
|
export 'print_job_controller.dart';
|
||||||
export 'print_job_settings.dart';
|
export 'print_job_settings.dart';
|
||||||
|
|
|
@ -4,7 +4,8 @@ import '../in_app_webview/in_app_webview_controller.dart';
|
||||||
import '../types/disposable.dart';
|
import '../types/disposable.dart';
|
||||||
|
|
||||||
///A completion handler for the [PrintJobController].
|
///A completion handler for the [PrintJobController].
|
||||||
typedef PrintJobCompletionHandler = Future<void> Function(bool completed, String? error)?;
|
typedef PrintJobCompletionHandler = Future<void> Function(
|
||||||
|
bool completed, String? error)?;
|
||||||
|
|
||||||
///Class representing a print job eventually returned by [InAppWebViewController.printCurrentPage].
|
///Class representing a print job eventually returned by [InAppWebViewController.printCurrentPage].
|
||||||
class PrintJobController implements Disposable {
|
class PrintJobController implements Disposable {
|
||||||
|
@ -19,8 +20,7 @@ class PrintJobController implements Disposable {
|
||||||
///- iOS ([Official API - UIPrintInteractionController.CompletionHandler](https://developer.apple.com/documentation/uikit/uiprintinteractioncontroller/completionhandler))
|
///- iOS ([Official API - UIPrintInteractionController.CompletionHandler](https://developer.apple.com/documentation/uikit/uiprintinteractioncontroller/completionhandler))
|
||||||
PrintJobCompletionHandler onComplete;
|
PrintJobCompletionHandler onComplete;
|
||||||
|
|
||||||
PrintJobController(
|
PrintJobController({required this.id}) {
|
||||||
{required this.id}) {
|
|
||||||
this._channel = MethodChannel(
|
this._channel = MethodChannel(
|
||||||
'com.pichillilorenzo/flutter_inappwebview_printjobcontroller_$id');
|
'com.pichillilorenzo/flutter_inappwebview_printjobcontroller_$id');
|
||||||
this._channel.setMethodCallHandler((call) async {
|
this._channel.setMethodCallHandler((call) async {
|
||||||
|
@ -94,8 +94,7 @@ class PrintJobController implements Disposable {
|
||||||
Future<PrintJobInfo?> getInfo() async {
|
Future<PrintJobInfo?> getInfo() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
Map<String, dynamic>? infoMap =
|
Map<String, dynamic>? infoMap =
|
||||||
(await _channel.invokeMethod('getInfo', args))
|
(await _channel.invokeMethod('getInfo', args))?.cast<String, dynamic>();
|
||||||
?.cast<String, dynamic>();
|
|
||||||
return PrintJobInfo.fromMap(infoMap);
|
return PrintJobInfo.fromMap(infoMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,4 +108,4 @@ class PrintJobController implements Disposable {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
await _channel.invokeMethod('dispose', args);
|
await _channel.invokeMethod('dispose', args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -180,30 +180,29 @@ class PrintJobSettings {
|
||||||
///Gets a [PrintJobSettings] instance from a [Map] value.
|
///Gets a [PrintJobSettings] instance from a [Map] value.
|
||||||
factory PrintJobSettings.fromMap(Map<String, dynamic> map) {
|
factory PrintJobSettings.fromMap(Map<String, dynamic> map) {
|
||||||
return PrintJobSettings(
|
return PrintJobSettings(
|
||||||
handledByClient: map["handledByClient"],
|
handledByClient: map["handledByClient"],
|
||||||
jobName: map["jobName"],
|
jobName: map["jobName"],
|
||||||
animated: map["animated"],
|
animated: map["animated"],
|
||||||
orientation: PrintJobOrientation.fromNativeValue(map["orientation"]),
|
orientation: PrintJobOrientation.fromNativeValue(map["orientation"]),
|
||||||
numberOfPages: map["numberOfPages"],
|
numberOfPages: map["numberOfPages"],
|
||||||
forceRenderingQuality:
|
forceRenderingQuality: PrintJobRenderingQuality.fromNativeValue(
|
||||||
PrintJobRenderingQuality.fromNativeValue(map["forceRenderingQuality"]),
|
map["forceRenderingQuality"]),
|
||||||
margins:
|
margins: MapEdgeInsets.fromMap(map["margins"]?.cast<String, dynamic>()),
|
||||||
MapEdgeInsets.fromMap(map["margins"]?.cast<String, dynamic>()),
|
mediaSize:
|
||||||
mediaSize:
|
PrintJobMediaSize.fromMap(map["mediaSize"]?.cast<String, dynamic>()),
|
||||||
PrintJobMediaSize.fromMap(map["mediaSize"]?.cast<String, dynamic>()),
|
colorMode: PrintJobColorMode.fromNativeValue(map["colorMode"]),
|
||||||
colorMode: PrintJobColorMode.fromNativeValue(map["colorMode"]),
|
duplexMode: PrintJobDuplexMode.fromNativeValue(map["duplexMode"]),
|
||||||
duplexMode: PrintJobDuplexMode.fromNativeValue(map["duplexMode"]),
|
outputType: PrintJobOutputType.fromNativeValue(map["outputType"]),
|
||||||
outputType: PrintJobOutputType.fromNativeValue(map["outputType"]),
|
resolution: PrintJobResolution.fromMap(
|
||||||
resolution:
|
map["resolution"]?.cast<String, dynamic>()),
|
||||||
PrintJobResolution.fromMap(map["resolution"]?.cast<String, dynamic>()),
|
showsNumberOfCopies: map["showsNumberOfCopies"],
|
||||||
showsNumberOfCopies: map["showsNumberOfCopies"],
|
showsPaperSelectionForLoadedPapers:
|
||||||
showsPaperSelectionForLoadedPapers:
|
map["showsPaperSelectionForLoadedPapers"],
|
||||||
map["showsPaperSelectionForLoadedPapers"],
|
showsPaperOrientation: map["showsPaperOrientation"],
|
||||||
showsPaperOrientation: map["showsPaperOrientation"],
|
maximumContentHeight: map["maximumContentHeight"],
|
||||||
maximumContentHeight: map["maximumContentHeight"],
|
maximumContentWidth: map["maximumContentWidth"],
|
||||||
maximumContentWidth: map["maximumContentWidth"],
|
footerHeight: map["footerHeight"],
|
||||||
footerHeight: map["footerHeight"],
|
headerHeight: map["headerHeight"],
|
||||||
headerHeight: map["headerHeight"],
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -242,4 +241,4 @@ class PrintJobSettings {
|
||||||
String toString() {
|
String toString() {
|
||||||
return toMap().toString();
|
return toMap().toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ class PullToRefreshController {
|
||||||
_debugLog(String method, dynamic args) {
|
_debugLog(String method, dynamic args) {
|
||||||
if (PullToRefreshController.debugLoggingSettings.enabled) {
|
if (PullToRefreshController.debugLoggingSettings.enabled) {
|
||||||
for (var regExp
|
for (var regExp
|
||||||
in PullToRefreshController.debugLoggingSettings.excludeFilter) {
|
in PullToRefreshController.debugLoggingSettings.excludeFilter) {
|
||||||
if (regExp.hasMatch(method)) return;
|
if (regExp.hasMatch(method)) return;
|
||||||
}
|
}
|
||||||
var maxLogMessageLength =
|
var maxLogMessageLength =
|
||||||
|
|
|
@ -3,9 +3,7 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_i
|
||||||
part 'action_mode_menu_item.g.dart';
|
part 'action_mode_menu_item.g.dart';
|
||||||
|
|
||||||
///Class used to disable the action mode menu items.
|
///Class used to disable the action mode menu items.
|
||||||
@ExchangeableEnum(
|
@ExchangeableEnum(bitwiseOrOperator: true)
|
||||||
bitwiseOrOperator: true
|
|
||||||
)
|
|
||||||
class ActionModeMenuItem_ {
|
class ActionModeMenuItem_ {
|
||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final int _value;
|
final int _value;
|
||||||
|
@ -30,9 +28,7 @@ class ActionModeMenuItem_ {
|
||||||
///
|
///
|
||||||
///Use [ActionModeMenuItem] instead.
|
///Use [ActionModeMenuItem] instead.
|
||||||
@Deprecated("Use ActionModeMenuItem instead")
|
@Deprecated("Use ActionModeMenuItem instead")
|
||||||
@ExchangeableEnum(
|
@ExchangeableEnum(bitwiseOrOperator: true)
|
||||||
bitwiseOrOperator: true
|
|
||||||
)
|
|
||||||
class AndroidActionModeMenuItem_ {
|
class AndroidActionModeMenuItem_ {
|
||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final int _value;
|
final int _value;
|
||||||
|
@ -46,9 +42,9 @@ class AndroidActionModeMenuItem_ {
|
||||||
|
|
||||||
///Disable menu item "Web Search".
|
///Disable menu item "Web Search".
|
||||||
static const MENU_ITEM_WEB_SEARCH =
|
static const MENU_ITEM_WEB_SEARCH =
|
||||||
const AndroidActionModeMenuItem_._internal(2);
|
const AndroidActionModeMenuItem_._internal(2);
|
||||||
|
|
||||||
///Disable all the action mode menu items for text processing.
|
///Disable all the action mode menu items for text processing.
|
||||||
static const MENU_ITEM_PROCESS_TEXT =
|
static const MENU_ITEM_PROCESS_TEXT =
|
||||||
const AndroidActionModeMenuItem_._internal(4);
|
const AndroidActionModeMenuItem_._internal(4);
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,23 +79,22 @@ class AjaxRequest_ {
|
||||||
|
|
||||||
AjaxRequest_(
|
AjaxRequest_(
|
||||||
{this.data,
|
{this.data,
|
||||||
this.method,
|
this.method,
|
||||||
this.url,
|
this.url,
|
||||||
this.isAsync,
|
this.isAsync,
|
||||||
this.user,
|
this.user,
|
||||||
this.password,
|
this.password,
|
||||||
this.withCredentials,
|
this.withCredentials,
|
||||||
this.headers,
|
this.headers,
|
||||||
this.readyState,
|
this.readyState,
|
||||||
this.status,
|
this.status,
|
||||||
this.responseURL,
|
this.responseURL,
|
||||||
this.responseType,
|
this.responseType,
|
||||||
this.response,
|
this.response,
|
||||||
this.responseText,
|
this.responseText,
|
||||||
this.responseXML,
|
this.responseXML,
|
||||||
this.statusText,
|
this.statusText,
|
||||||
this.responseHeaders,
|
this.responseHeaders,
|
||||||
this.event,
|
this.event,
|
||||||
this.action = AjaxRequestAction_.PROCEED});
|
this.action = AjaxRequestAction_.PROCEED});
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -16,4 +16,4 @@ class AjaxRequestAction_ {
|
||||||
|
|
||||||
///Proceeds with the current [AjaxRequest].
|
///Proceeds with the current [AjaxRequest].
|
||||||
static const PROCEED = const AjaxRequestAction_._internal(1);
|
static const PROCEED = const AjaxRequestAction_._internal(1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,5 +24,6 @@ class AjaxRequestEvent_ {
|
||||||
///When downloading a resource using HTTP, this only represent the content itself, not headers and other overhead.
|
///When downloading a resource using HTTP, this only represent the content itself, not headers and other overhead.
|
||||||
int? total;
|
int? total;
|
||||||
|
|
||||||
AjaxRequestEvent_({this.type, this.lengthComputable, this.loaded, this.total});
|
AjaxRequestEvent_(
|
||||||
}
|
{this.type, this.lengthComputable, this.loaded, this.total});
|
||||||
|
}
|
||||||
|
|
|
@ -32,4 +32,4 @@ class AjaxRequestEventType_ {
|
||||||
|
|
||||||
///The TIMEOUT event is fired when progression is terminated due to preset time expiring.
|
///The TIMEOUT event is fired when progression is terminated due to preset time expiring.
|
||||||
static const TIMEOUT = const AjaxRequestEventType_._internal("timeout");
|
static const TIMEOUT = const AjaxRequestEventType_._internal("timeout");
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,4 +44,4 @@ class AjaxRequestHeaders_ {
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'AjaxRequestHeaders{headers: $_headers, requestHeaders: $_newHeaders}';
|
return 'AjaxRequestHeaders{headers: $_headers, requestHeaders: $_newHeaders}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,4 +25,4 @@ class AjaxRequestReadyState_ {
|
||||||
|
|
||||||
///The operation is complete.
|
///The operation is complete.
|
||||||
static const DONE = const AjaxRequestReadyState_._internal(4);
|
static const DONE = const AjaxRequestReadyState_._internal(4);
|
||||||
}
|
}
|
||||||
|
|
|
@ -251,4 +251,4 @@ class IOSNSAttributedString_ {
|
||||||
this.underlineColor,
|
this.underlineColor,
|
||||||
this.underlineStyle,
|
this.underlineStyle,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ class AttributedStringTextEffectStyle_ {
|
||||||
|
|
||||||
///A graphical text effect that gives glyphs the appearance of letterpress printing, which involves pressing the type into the paper.
|
///A graphical text effect that gives glyphs the appearance of letterpress printing, which involves pressing the type into the paper.
|
||||||
static const LETTERPRESS_STYLE =
|
static const LETTERPRESS_STYLE =
|
||||||
const AttributedStringTextEffectStyle_._internal("letterpressStyle");
|
const AttributedStringTextEffectStyle_._internal("letterpressStyle");
|
||||||
}
|
}
|
||||||
|
|
||||||
///An iOS-specific Class that represents the supported proxy types.
|
///An iOS-specific Class that represents the supported proxy types.
|
||||||
|
@ -25,5 +25,5 @@ class IOSNSAttributedStringTextEffectStyle_ {
|
||||||
|
|
||||||
///A graphical text effect that gives glyphs the appearance of letterpress printing, which involves pressing the type into the paper.
|
///A graphical text effect that gives glyphs the appearance of letterpress printing, which involves pressing the type into the paper.
|
||||||
static const LETTERPRESS_STYLE =
|
static const LETTERPRESS_STYLE =
|
||||||
const IOSNSAttributedStringTextEffectStyle_._internal("letterpressStyle");
|
const IOSNSAttributedStringTextEffectStyle_._internal("letterpressStyle");
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,4 +44,4 @@ class AndroidCacheMode_ {
|
||||||
|
|
||||||
///Don't use the network, load from the cache.
|
///Don't use the network, load from the cache.
|
||||||
static const LOAD_CACHE_ONLY = const AndroidCacheMode_._internal(3);
|
static const LOAD_CACHE_ONLY = const AndroidCacheMode_._internal(3);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,4 +14,4 @@ class CallAsyncJavaScriptResult_ {
|
||||||
String? error;
|
String? error;
|
||||||
|
|
||||||
CallAsyncJavaScriptResult_({this.value, this.error});
|
CallAsyncJavaScriptResult_({this.value, this.error});
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,9 +18,9 @@ class ClientCertChallenge_ extends URLAuthenticationChallenge_ {
|
||||||
@SupportedPlatforms(platforms: [
|
@SupportedPlatforms(platforms: [
|
||||||
AndroidPlatform(
|
AndroidPlatform(
|
||||||
apiName: "ClientCertRequest.getPrincipals",
|
apiName: "ClientCertRequest.getPrincipals",
|
||||||
apiUrl: "https://developer.android.com/reference/android/webkit/ClientCertRequest#getPrincipals()",
|
apiUrl:
|
||||||
available: "21"
|
"https://developer.android.com/reference/android/webkit/ClientCertRequest#getPrincipals()",
|
||||||
)
|
available: "21")
|
||||||
])
|
])
|
||||||
List<String>? principals;
|
List<String>? principals;
|
||||||
|
|
||||||
|
@ -32,17 +32,17 @@ class ClientCertChallenge_ extends URLAuthenticationChallenge_ {
|
||||||
@SupportedPlatforms(platforms: [
|
@SupportedPlatforms(platforms: [
|
||||||
AndroidPlatform(
|
AndroidPlatform(
|
||||||
apiName: "ClientCertRequest.getKeyTypes",
|
apiName: "ClientCertRequest.getKeyTypes",
|
||||||
apiUrl: "https://developer.android.com/reference/android/webkit/ClientCertRequest#getKeyTypes()",
|
apiUrl:
|
||||||
available: "21"
|
"https://developer.android.com/reference/android/webkit/ClientCertRequest#getKeyTypes()",
|
||||||
)
|
available: "21")
|
||||||
])
|
])
|
||||||
List<String>? keyTypes;
|
List<String>? keyTypes;
|
||||||
|
|
||||||
ClientCertChallenge_(
|
ClientCertChallenge_(
|
||||||
{required URLProtectionSpace_ protectionSpace,
|
{required URLProtectionSpace_ protectionSpace,
|
||||||
@Deprecated('Use principals instead') this.androidPrincipals,
|
@Deprecated('Use principals instead') this.androidPrincipals,
|
||||||
this.principals,
|
this.principals,
|
||||||
@Deprecated('Use keyTypes instead') this.androidKeyTypes,
|
@Deprecated('Use keyTypes instead') this.androidKeyTypes,
|
||||||
this.keyTypes})
|
this.keyTypes})
|
||||||
: super(protectionSpace: protectionSpace);
|
: super(protectionSpace: protectionSpace);
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,9 +21,7 @@ class ClientCertResponse_ {
|
||||||
String? androidKeyStoreType;
|
String? androidKeyStoreType;
|
||||||
|
|
||||||
///An Android-specific property used by Java [KeyStore](https://developer.android.com/reference/java/security/KeyStore) class to get the instance.
|
///An Android-specific property used by Java [KeyStore](https://developer.android.com/reference/java/security/KeyStore) class to get the instance.
|
||||||
@SupportedPlatforms(platforms: [
|
@SupportedPlatforms(platforms: [AndroidPlatform()])
|
||||||
AndroidPlatform()
|
|
||||||
])
|
|
||||||
String? keyStoreType;
|
String? keyStoreType;
|
||||||
|
|
||||||
///Indicate the [ClientCertResponseAction] to take in response of the client certificate challenge.
|
///Indicate the [ClientCertResponseAction] to take in response of the client certificate challenge.
|
||||||
|
@ -32,11 +30,11 @@ class ClientCertResponse_ {
|
||||||
@ExchangeableObjectConstructor()
|
@ExchangeableObjectConstructor()
|
||||||
ClientCertResponse_(
|
ClientCertResponse_(
|
||||||
{required this.certificatePath,
|
{required this.certificatePath,
|
||||||
this.certificatePassword = "",
|
this.certificatePassword = "",
|
||||||
@Deprecated('Use keyStoreType instead')
|
@Deprecated('Use keyStoreType instead')
|
||||||
this.androidKeyStoreType = "PKCS12",
|
this.androidKeyStoreType = "PKCS12",
|
||||||
this.keyStoreType = "PKCS12",
|
this.keyStoreType = "PKCS12",
|
||||||
this.action = ClientCertResponseAction_.CANCEL}) {
|
this.action = ClientCertResponseAction_.CANCEL}) {
|
||||||
if (this.action == ClientCertResponseAction_.PROCEED)
|
if (this.action == ClientCertResponseAction_.PROCEED)
|
||||||
assert(certificatePath.isNotEmpty);
|
assert(certificatePath.isNotEmpty);
|
||||||
|
|
||||||
|
@ -45,4 +43,4 @@ class ClientCertResponse_ {
|
||||||
if (!kIsWeb && defaultTargetPlatform == TargetPlatform.android)
|
if (!kIsWeb && defaultTargetPlatform == TargetPlatform.android)
|
||||||
assert(this.keyStoreType != null);
|
assert(this.keyStoreType != null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,4 +19,4 @@ class ClientCertResponseAction_ {
|
||||||
|
|
||||||
///Ignore the request for now.
|
///Ignore the request for now.
|
||||||
static const IGNORE = const ClientCertResponseAction_._internal(2);
|
static const IGNORE = const ClientCertResponseAction_._internal(2);
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,4 +43,4 @@ class CompressFormat_ {
|
||||||
///
|
///
|
||||||
///**NOTE for Android**: available on Android 30+.
|
///**NOTE for Android**: available on Android 30+.
|
||||||
static const WEBP_LOSSLESS = const CompressFormat_._internal("WEBP_LOSSLESS");
|
static const WEBP_LOSSLESS = const CompressFormat_._internal("WEBP_LOSSLESS");
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,4 +20,4 @@ class ConsoleMessage_ {
|
||||||
|
|
||||||
ConsoleMessage_(
|
ConsoleMessage_(
|
||||||
{this.message = "", this.messageLevel = ConsoleMessageLevel_.LOG});
|
{this.message = "", this.messageLevel = ConsoleMessageLevel_.LOG});
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,4 +23,4 @@ class ConsoleMessageLevel_ {
|
||||||
|
|
||||||
///Console DEBUG level
|
///Console DEBUG level
|
||||||
static const DEBUG = const ConsoleMessageLevel_._internal(4);
|
static const DEBUG = const ConsoleMessageLevel_._internal(4);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,9 +18,9 @@ class ContentBlockerActionType_ {
|
||||||
///
|
///
|
||||||
///**NOTE**: on Android, JavaScript must be enabled.
|
///**NOTE**: on Android, JavaScript must be enabled.
|
||||||
static const CSS_DISPLAY_NONE =
|
static const CSS_DISPLAY_NONE =
|
||||||
const ContentBlockerActionType_._internal('css-display-none');
|
const ContentBlockerActionType_._internal('css-display-none');
|
||||||
|
|
||||||
///Changes a URL from http to https. URLs with a specified (nondefault) port and links using other protocols are unaffected.
|
///Changes a URL from http to https. URLs with a specified (nondefault) port and links using other protocols are unaffected.
|
||||||
static const MAKE_HTTPS =
|
static const MAKE_HTTPS =
|
||||||
const ContentBlockerActionType_._internal('make-https');
|
const ContentBlockerActionType_._internal('make-https');
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,9 +13,9 @@ class ContentBlockerTriggerLoadType_ {
|
||||||
|
|
||||||
///FIRST_PARTY is triggered only if the resource has the same scheme, domain, and port as the main page resource.
|
///FIRST_PARTY is triggered only if the resource has the same scheme, domain, and port as the main page resource.
|
||||||
static const FIRST_PARTY =
|
static const FIRST_PARTY =
|
||||||
const ContentBlockerTriggerLoadType_._internal('first-party');
|
const ContentBlockerTriggerLoadType_._internal('first-party');
|
||||||
|
|
||||||
///THIRD_PARTY is triggered if the resource is not from the same domain as the main page resource.
|
///THIRD_PARTY is triggered if the resource is not from the same domain as the main page resource.
|
||||||
static const THIRD_PARTY =
|
static const THIRD_PARTY =
|
||||||
const ContentBlockerTriggerLoadType_._internal('third-party');
|
const ContentBlockerTriggerLoadType_._internal('third-party');
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ class ContentWorld {
|
||||||
|
|
||||||
///The default world for clients.
|
///The default world for clients.
|
||||||
static final ContentWorld DEFAULT_CLIENT =
|
static final ContentWorld DEFAULT_CLIENT =
|
||||||
ContentWorld.world(name: "defaultClient");
|
ContentWorld.world(name: "defaultClient");
|
||||||
|
|
||||||
///The content world for the current webpage’s content.
|
///The content world for the current webpage’s content.
|
||||||
///This property contains the content world for scripts that the current webpage executes.
|
///This property contains the content world for scripts that the current webpage executes.
|
||||||
|
@ -47,4 +47,4 @@ class ContentWorld {
|
||||||
String toString() {
|
String toString() {
|
||||||
return toMap().toString();
|
return toMap().toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,12 +51,12 @@ class Cookie_ {
|
||||||
|
|
||||||
Cookie_(
|
Cookie_(
|
||||||
{required this.name,
|
{required this.name,
|
||||||
required this.value,
|
required this.value,
|
||||||
this.expiresDate,
|
this.expiresDate,
|
||||||
this.isSessionOnly,
|
this.isSessionOnly,
|
||||||
this.domain,
|
this.domain,
|
||||||
this.sameSite,
|
this.sameSite,
|
||||||
this.isSecure,
|
this.isSecure,
|
||||||
this.isHttpOnly,
|
this.isHttpOnly,
|
||||||
this.path});
|
this.path});
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,11 +20,7 @@ class CreateWindowAction_ extends NavigationAction_ {
|
||||||
bool? androidIsDialog;
|
bool? androidIsDialog;
|
||||||
|
|
||||||
///Indicates if the new window should be a dialog, rather than a full-size window.
|
///Indicates if the new window should be a dialog, rather than a full-size window.
|
||||||
@SupportedPlatforms(
|
@SupportedPlatforms(platforms: [AndroidPlatform()])
|
||||||
platforms: [
|
|
||||||
AndroidPlatform()
|
|
||||||
]
|
|
||||||
)
|
|
||||||
bool? isDialog;
|
bool? isDialog;
|
||||||
|
|
||||||
///Use [windowFeatures] instead.
|
///Use [windowFeatures] instead.
|
||||||
|
@ -32,55 +28,53 @@ class CreateWindowAction_ extends NavigationAction_ {
|
||||||
IOSWKWindowFeatures_? iosWindowFeatures;
|
IOSWKWindowFeatures_? iosWindowFeatures;
|
||||||
|
|
||||||
///Window features requested by the webpage.
|
///Window features requested by the webpage.
|
||||||
@SupportedPlatforms(
|
@SupportedPlatforms(platforms: [
|
||||||
platforms: [
|
IOSPlatform(
|
||||||
IOSPlatform(
|
apiName: "WKWindowFeatures",
|
||||||
apiName: "WKWindowFeatures",
|
apiUrl:
|
||||||
apiUrl: "https://developer.apple.com/documentation/webkit/wkwindowfeatures"
|
"https://developer.apple.com/documentation/webkit/wkwindowfeatures")
|
||||||
)
|
])
|
||||||
]
|
|
||||||
)
|
|
||||||
WindowFeatures_? windowFeatures;
|
WindowFeatures_? windowFeatures;
|
||||||
|
|
||||||
CreateWindowAction_(
|
CreateWindowAction_(
|
||||||
{required this.windowId,
|
{required this.windowId,
|
||||||
@Deprecated('Use isDialog instead')
|
@Deprecated('Use isDialog instead')
|
||||||
this.androidIsDialog,
|
this.androidIsDialog,
|
||||||
this.isDialog,
|
this.isDialog,
|
||||||
@Deprecated('Use windowFeatures instead')
|
@Deprecated('Use windowFeatures instead')
|
||||||
this.iosWindowFeatures,
|
this.iosWindowFeatures,
|
||||||
this.windowFeatures,
|
this.windowFeatures,
|
||||||
required URLRequest_ request,
|
required URLRequest_ request,
|
||||||
required bool isForMainFrame,
|
required bool isForMainFrame,
|
||||||
@Deprecated('Use hasGesture instead')
|
@Deprecated('Use hasGesture instead')
|
||||||
bool? androidHasGesture,
|
bool? androidHasGesture,
|
||||||
@Deprecated('Use isRedirect instead')
|
@Deprecated('Use isRedirect instead')
|
||||||
bool? androidIsRedirect,
|
bool? androidIsRedirect,
|
||||||
bool? hasGesture,
|
bool? hasGesture,
|
||||||
bool? isRedirect,
|
bool? isRedirect,
|
||||||
@Deprecated('Use navigationType instead')
|
@Deprecated('Use navigationType instead')
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
IOSWKNavigationType_? iosWKNavigationType,
|
IOSWKNavigationType_? iosWKNavigationType,
|
||||||
NavigationType_? navigationType,
|
NavigationType_? navigationType,
|
||||||
@Deprecated('Use sourceFrame instead')
|
@Deprecated('Use sourceFrame instead')
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
IOSWKFrameInfo_? iosSourceFrame,
|
IOSWKFrameInfo_? iosSourceFrame,
|
||||||
FrameInfo_? sourceFrame,
|
FrameInfo_? sourceFrame,
|
||||||
@Deprecated('Use targetFrame instead')
|
@Deprecated('Use targetFrame instead')
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
IOSWKFrameInfo_? iosTargetFrame,
|
IOSWKFrameInfo_? iosTargetFrame,
|
||||||
FrameInfo_? targetFrame})
|
FrameInfo_? targetFrame})
|
||||||
: super(
|
: super(
|
||||||
request: request,
|
request: request,
|
||||||
isForMainFrame: isForMainFrame,
|
isForMainFrame: isForMainFrame,
|
||||||
androidHasGesture: androidHasGesture,
|
androidHasGesture: androidHasGesture,
|
||||||
hasGesture: hasGesture,
|
hasGesture: hasGesture,
|
||||||
androidIsRedirect: androidIsRedirect,
|
androidIsRedirect: androidIsRedirect,
|
||||||
isRedirect: isRedirect,
|
isRedirect: isRedirect,
|
||||||
iosWKNavigationType: iosWKNavigationType,
|
iosWKNavigationType: iosWKNavigationType,
|
||||||
navigationType: navigationType,
|
navigationType: navigationType,
|
||||||
iosSourceFrame: iosSourceFrame,
|
iosSourceFrame: iosSourceFrame,
|
||||||
sourceFrame: sourceFrame,
|
sourceFrame: sourceFrame,
|
||||||
iosTargetFrame: iosTargetFrame,
|
iosTargetFrame: iosTargetFrame,
|
||||||
targetFrame: targetFrame);
|
targetFrame: targetFrame);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,5 +18,6 @@ class CrossOrigin_ {
|
||||||
static const ANONYMOUS = const CrossOrigin_._internal("anonymous");
|
static const ANONYMOUS = const CrossOrigin_._internal("anonymous");
|
||||||
|
|
||||||
///CORS requests for this element will have the credentials flag set to 'include'.
|
///CORS requests for this element will have the credentials flag set to 'include'.
|
||||||
static const USE_CREDENTIALS = const CrossOrigin_._internal("use-credentials");
|
static const USE_CREDENTIALS =
|
||||||
}
|
const CrossOrigin_._internal("use-credentials");
|
||||||
|
}
|
||||||
|
|
|
@ -43,11 +43,11 @@ class CSSLinkHtmlTagAttributes_ {
|
||||||
|
|
||||||
CSSLinkHtmlTagAttributes_(
|
CSSLinkHtmlTagAttributes_(
|
||||||
{this.id,
|
{this.id,
|
||||||
this.media,
|
this.media,
|
||||||
this.crossOrigin,
|
this.crossOrigin,
|
||||||
this.integrity,
|
this.integrity,
|
||||||
this.referrerPolicy,
|
this.referrerPolicy,
|
||||||
this.disabled,
|
this.disabled,
|
||||||
this.alternate,
|
this.alternate,
|
||||||
this.title});
|
this.title});
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,6 @@ class CustomSchemeResponse_ {
|
||||||
|
|
||||||
CustomSchemeResponse_(
|
CustomSchemeResponse_(
|
||||||
{required this.data,
|
{required this.data,
|
||||||
required this.contentType,
|
required this.contentType,
|
||||||
this.contentEncoding = 'utf-8'});
|
this.contentEncoding = 'utf-8'});
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,4 +17,4 @@ class CustomTabsShareState_ {
|
||||||
|
|
||||||
///Explicitly does not show a share option in the tab.
|
///Explicitly does not show a share option in the tab.
|
||||||
static const SHARE_STATE_OFF = const CustomTabsShareState_._internal(2);
|
static const SHARE_STATE_OFF = const CustomTabsShareState_._internal(2);
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,8 @@ class DataDetectorTypes_ {
|
||||||
static const NONE = const DataDetectorTypes_._internal("NONE");
|
static const NONE = const DataDetectorTypes_._internal("NONE");
|
||||||
|
|
||||||
///Phone numbers are detected and turned into links.
|
///Phone numbers are detected and turned into links.
|
||||||
static const PHONE_NUMBER = const DataDetectorTypes_._internal("PHONE_NUMBER");
|
static const PHONE_NUMBER =
|
||||||
|
const DataDetectorTypes_._internal("PHONE_NUMBER");
|
||||||
|
|
||||||
///URLs in text are detected and turned into links.
|
///URLs in text are detected and turned into links.
|
||||||
static const LINK = const DataDetectorTypes_._internal("LINK");
|
static const LINK = const DataDetectorTypes_._internal("LINK");
|
||||||
|
@ -23,23 +24,23 @@ class DataDetectorTypes_ {
|
||||||
|
|
||||||
///Dates and times that are in the future are detected and turned into links.
|
///Dates and times that are in the future are detected and turned into links.
|
||||||
static const CALENDAR_EVENT =
|
static const CALENDAR_EVENT =
|
||||||
const DataDetectorTypes_._internal("CALENDAR_EVENT");
|
const DataDetectorTypes_._internal("CALENDAR_EVENT");
|
||||||
|
|
||||||
///Tracking numbers are detected and turned into links.
|
///Tracking numbers are detected and turned into links.
|
||||||
static const TRACKING_NUMBER =
|
static const TRACKING_NUMBER =
|
||||||
const DataDetectorTypes_._internal("TRACKING_NUMBER");
|
const DataDetectorTypes_._internal("TRACKING_NUMBER");
|
||||||
|
|
||||||
///Flight numbers are detected and turned into links.
|
///Flight numbers are detected and turned into links.
|
||||||
static const FLIGHT_NUMBER =
|
static const FLIGHT_NUMBER =
|
||||||
const DataDetectorTypes_._internal("FLIGHT_NUMBER");
|
const DataDetectorTypes_._internal("FLIGHT_NUMBER");
|
||||||
|
|
||||||
///Lookup suggestions are detected and turned into links.
|
///Lookup suggestions are detected and turned into links.
|
||||||
static const LOOKUP_SUGGESTION =
|
static const LOOKUP_SUGGESTION =
|
||||||
const DataDetectorTypes_._internal("LOOKUP_SUGGESTION");
|
const DataDetectorTypes_._internal("LOOKUP_SUGGESTION");
|
||||||
|
|
||||||
///Spotlight suggestions are detected and turned into links.
|
///Spotlight suggestions are detected and turned into links.
|
||||||
static const SPOTLIGHT_SUGGESTION =
|
static const SPOTLIGHT_SUGGESTION =
|
||||||
const DataDetectorTypes_._internal("SPOTLIGHT_SUGGESTION");
|
const DataDetectorTypes_._internal("SPOTLIGHT_SUGGESTION");
|
||||||
|
|
||||||
///All of the above data types are turned into links when detected. Choosing this value will automatically include any new detection type that is added.
|
///All of the above data types are turned into links when detected. Choosing this value will automatically include any new detection type that is added.
|
||||||
static const ALL = const DataDetectorTypes_._internal("ALL");
|
static const ALL = const DataDetectorTypes_._internal("ALL");
|
||||||
|
@ -62,7 +63,7 @@ class IOSWKDataDetectorTypes_ {
|
||||||
|
|
||||||
///Phone numbers are detected and turned into links.
|
///Phone numbers are detected and turned into links.
|
||||||
static const PHONE_NUMBER =
|
static const PHONE_NUMBER =
|
||||||
const IOSWKDataDetectorTypes_._internal("PHONE_NUMBER");
|
const IOSWKDataDetectorTypes_._internal("PHONE_NUMBER");
|
||||||
|
|
||||||
///URLs in text are detected and turned into links.
|
///URLs in text are detected and turned into links.
|
||||||
static const LINK = const IOSWKDataDetectorTypes_._internal("LINK");
|
static const LINK = const IOSWKDataDetectorTypes_._internal("LINK");
|
||||||
|
@ -72,24 +73,24 @@ class IOSWKDataDetectorTypes_ {
|
||||||
|
|
||||||
///Dates and times that are in the future are detected and turned into links.
|
///Dates and times that are in the future are detected and turned into links.
|
||||||
static const CALENDAR_EVENT =
|
static const CALENDAR_EVENT =
|
||||||
const IOSWKDataDetectorTypes_._internal("CALENDAR_EVENT");
|
const IOSWKDataDetectorTypes_._internal("CALENDAR_EVENT");
|
||||||
|
|
||||||
///Tracking numbers are detected and turned into links.
|
///Tracking numbers are detected and turned into links.
|
||||||
static const TRACKING_NUMBER =
|
static const TRACKING_NUMBER =
|
||||||
const IOSWKDataDetectorTypes_._internal("TRACKING_NUMBER");
|
const IOSWKDataDetectorTypes_._internal("TRACKING_NUMBER");
|
||||||
|
|
||||||
///Flight numbers are detected and turned into links.
|
///Flight numbers are detected and turned into links.
|
||||||
static const FLIGHT_NUMBER =
|
static const FLIGHT_NUMBER =
|
||||||
const IOSWKDataDetectorTypes_._internal("FLIGHT_NUMBER");
|
const IOSWKDataDetectorTypes_._internal("FLIGHT_NUMBER");
|
||||||
|
|
||||||
///Lookup suggestions are detected and turned into links.
|
///Lookup suggestions are detected and turned into links.
|
||||||
static const LOOKUP_SUGGESTION =
|
static const LOOKUP_SUGGESTION =
|
||||||
const IOSWKDataDetectorTypes_._internal("LOOKUP_SUGGESTION");
|
const IOSWKDataDetectorTypes_._internal("LOOKUP_SUGGESTION");
|
||||||
|
|
||||||
///Spotlight suggestions are detected and turned into links.
|
///Spotlight suggestions are detected and turned into links.
|
||||||
static const SPOTLIGHT_SUGGESTION =
|
static const SPOTLIGHT_SUGGESTION =
|
||||||
const IOSWKDataDetectorTypes_._internal("SPOTLIGHT_SUGGESTION");
|
const IOSWKDataDetectorTypes_._internal("SPOTLIGHT_SUGGESTION");
|
||||||
|
|
||||||
///All of the above data types are turned into links when detected. Choosing this value will automatically include any new detection type that is added.
|
///All of the above data types are turned into links when detected. Choosing this value will automatically include any new detection type that is added.
|
||||||
static const ALL = const IOSWKDataDetectorTypes_._internal("ALL");
|
static const ALL = const IOSWKDataDetectorTypes_._internal("ALL");
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,4 +39,4 @@ class IOSSafariDismissButtonStyle_ {
|
||||||
|
|
||||||
///Makes the button title the localized string "Cancel".
|
///Makes the button title the localized string "Cancel".
|
||||||
static const CANCEL = const IOSSafariDismissButtonStyle_._internal(2);
|
static const CANCEL = const IOSSafariDismissButtonStyle_._internal(2);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
abstract class Disposable {
|
abstract class Disposable {
|
||||||
void dispose();
|
void dispose();
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,10 +30,10 @@ class DownloadStartRequest_ {
|
||||||
|
|
||||||
DownloadStartRequest_(
|
DownloadStartRequest_(
|
||||||
{required this.url,
|
{required this.url,
|
||||||
this.userAgent,
|
this.userAgent,
|
||||||
this.contentDisposition,
|
this.contentDisposition,
|
||||||
this.mimeType,
|
this.mimeType,
|
||||||
required this.contentLength,
|
required this.contentLength,
|
||||||
this.suggestedFilename,
|
this.suggestedFilename,
|
||||||
this.textEncodingName});
|
this.textEncodingName});
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,4 +20,4 @@ class Favicon_ {
|
||||||
int? height;
|
int? height;
|
||||||
|
|
||||||
Favicon_({required this.url, this.rel, this.width, this.height});
|
Favicon_({required this.url, this.rel, this.width, this.height});
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,9 +43,7 @@ class FetchRequest_ {
|
||||||
String? mode;
|
String? mode;
|
||||||
|
|
||||||
///The request credentials used by the request.
|
///The request credentials used by the request.
|
||||||
@ExchangeableObjectProperty(
|
@ExchangeableObjectProperty(deserializer: _fetchRequestCredentialDeserializer)
|
||||||
deserializer: _fetchRequestCredentialDeserializer
|
|
||||||
)
|
|
||||||
FetchRequestCredential_? credentials;
|
FetchRequestCredential_? credentials;
|
||||||
|
|
||||||
///The cache mode used by the request.
|
///The cache mode used by the request.
|
||||||
|
@ -71,16 +69,16 @@ class FetchRequest_ {
|
||||||
|
|
||||||
FetchRequest_(
|
FetchRequest_(
|
||||||
{this.url,
|
{this.url,
|
||||||
this.method,
|
this.method,
|
||||||
this.headers,
|
this.headers,
|
||||||
this.body,
|
this.body,
|
||||||
this.mode,
|
this.mode,
|
||||||
this.credentials,
|
this.credentials,
|
||||||
this.cache,
|
this.cache,
|
||||||
this.redirect,
|
this.redirect,
|
||||||
this.referrer,
|
this.referrer,
|
||||||
this.referrerPolicy,
|
this.referrerPolicy,
|
||||||
this.integrity,
|
this.integrity,
|
||||||
this.keepalive,
|
this.keepalive,
|
||||||
this.action = FetchRequestAction_.PROCEED});
|
this.action = FetchRequestAction_.PROCEED});
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,4 +16,4 @@ class FetchRequestAction_ {
|
||||||
|
|
||||||
///Proceeds with the fetch request.
|
///Proceeds with the fetch request.
|
||||||
static const PROCEED = const FetchRequestAction_._internal(1);
|
static const PROCEED = const FetchRequestAction_._internal(1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,4 +13,4 @@ class FetchRequestCredential_ {
|
||||||
String? type;
|
String? type;
|
||||||
|
|
||||||
FetchRequestCredential_({this.type});
|
FetchRequestCredential_({this.type});
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,4 +12,4 @@ class FetchRequestCredentialDefault_ extends FetchRequestCredential_ {
|
||||||
String? value;
|
String? value;
|
||||||
|
|
||||||
FetchRequestCredentialDefault_({type, this.value}) : super(type: type);
|
FetchRequestCredentialDefault_({type, this.value}) : super(type: type);
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,4 +25,4 @@ class FetchRequestFederatedCredential_ extends FetchRequestCredential_ {
|
||||||
FetchRequestFederatedCredential_(
|
FetchRequestFederatedCredential_(
|
||||||
{type, this.id, this.name, this.protocol, this.provider, this.iconURL})
|
{type, this.id, this.name, this.protocol, this.provider, this.iconURL})
|
||||||
: super(type: type);
|
: super(type: type);
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,4 +22,4 @@ class FetchRequestPasswordCredential_ extends FetchRequestCredential_ {
|
||||||
FetchRequestPasswordCredential_(
|
FetchRequestPasswordCredential_(
|
||||||
{type, this.id, this.name, this.password, this.iconURL})
|
{type, this.id, this.name, this.password, this.iconURL})
|
||||||
: super(type: type);
|
: super(type: type);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,9 +16,8 @@ class FindSession_ {
|
||||||
/// Defines how results are reported through the find panel's UI.
|
/// Defines how results are reported through the find panel's UI.
|
||||||
SearchResultDisplayStyle_ searchResultDisplayStyle;
|
SearchResultDisplayStyle_ searchResultDisplayStyle;
|
||||||
|
|
||||||
FindSession_({
|
FindSession_(
|
||||||
required this.resultCount,
|
{required this.resultCount,
|
||||||
required this.highlightedResultIndex,
|
required this.highlightedResultIndex,
|
||||||
required this.searchResultDisplayStyle
|
required this.searchResultDisplayStyle});
|
||||||
});
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -41,4 +41,4 @@ class AndroidForceDark_ {
|
||||||
|
|
||||||
///Unconditionally enable force dark. In this mode WebView content will always be rendered so as to emulate a dark theme.
|
///Unconditionally enable force dark. In this mode WebView content will always be rendered so as to emulate a dark theme.
|
||||||
static const FORCE_DARK_ON = const AndroidForceDark_._internal(2);
|
static const FORCE_DARK_ON = const AndroidForceDark_._internal(2);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,8 @@ class ForceDarkStrategy_ {
|
||||||
///To avoid mixing two different darkening strategies, the `prefers-color-scheme` media query will evaluate to light.
|
///To avoid mixing two different darkening strategies, the `prefers-color-scheme` media query will evaluate to light.
|
||||||
///
|
///
|
||||||
///See [specification](https://drafts.csswg.org/css-color-adjust-1/) for more information.
|
///See [specification](https://drafts.csswg.org/css-color-adjust-1/) for more information.
|
||||||
static const USER_AGENT_DARKENING_ONLY = const ForceDarkStrategy_._internal(0);
|
static const USER_AGENT_DARKENING_ONLY =
|
||||||
|
const ForceDarkStrategy_._internal(0);
|
||||||
|
|
||||||
///In this mode [WebView] content will always be darkened using dark theme provided by web page.
|
///In this mode [WebView] content will always be darkened using dark theme provided by web page.
|
||||||
///If web page does not provide dark theme support [WebView] content will be rendered with a default theme.
|
///If web page does not provide dark theme support [WebView] content will be rendered with a default theme.
|
||||||
|
@ -29,5 +30,6 @@ class ForceDarkStrategy_ {
|
||||||
///If the metadata is not presented [WebView] content will be darkened by a user agent and `prefers-color-scheme` media query will evaluate to light.
|
///If the metadata is not presented [WebView] content will be darkened by a user agent and `prefers-color-scheme` media query will evaluate to light.
|
||||||
///
|
///
|
||||||
///See [specification](https://drafts.csswg.org/css-color-adjust-1/) for more information.
|
///See [specification](https://drafts.csswg.org/css-color-adjust-1/) for more information.
|
||||||
static const PREFER_WEB_THEME_OVER_USER_AGENT_DARKENING = const ForceDarkStrategy_._internal(2);
|
static const PREFER_WEB_THEME_OVER_USER_AGENT_DARKENING =
|
||||||
|
const ForceDarkStrategy_._internal(2);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,4 +16,4 @@ class FormResubmissionAction_ {
|
||||||
|
|
||||||
///Don't resend data
|
///Don't resend data
|
||||||
static const DONT_RESEND = const FormResubmissionAction_._internal(1);
|
static const DONT_RESEND = const FormResubmissionAction_._internal(1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,4 +40,4 @@ class IOSWKFrameInfo_ {
|
||||||
|
|
||||||
IOSWKFrameInfo_(
|
IOSWKFrameInfo_(
|
||||||
{required this.isMainFrame, required this.request, this.securityOrigin});
|
{required this.isMainFrame, required this.request, this.securityOrigin});
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,4 +19,4 @@ class GeolocationPermissionShowPromptResponse_ {
|
||||||
|
|
||||||
GeolocationPermissionShowPromptResponse_(
|
GeolocationPermissionShowPromptResponse_(
|
||||||
{required this.origin, required this.allow, this.retain = false});
|
{required this.origin, required this.allow, this.retain = false});
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ class HttpAuthResponse_ {
|
||||||
|
|
||||||
HttpAuthResponse_(
|
HttpAuthResponse_(
|
||||||
{this.username = "",
|
{this.username = "",
|
||||||
this.password = "",
|
this.password = "",
|
||||||
this.permanentPersistence = false,
|
this.permanentPersistence = false,
|
||||||
this.action = HttpAuthResponseAction_.CANCEL});
|
this.action = HttpAuthResponseAction_.CANCEL});
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ class HttpAuthResponseAction_ {
|
||||||
// ignore: unused_field
|
// ignore: unused_field
|
||||||
final int _value;
|
final int _value;
|
||||||
const HttpAuthResponseAction_._internal(this._value);
|
const HttpAuthResponseAction_._internal(this._value);
|
||||||
|
|
||||||
///Instructs the WebView to cancel the authentication request.
|
///Instructs the WebView to cancel the authentication request.
|
||||||
static const CANCEL = const HttpAuthResponseAction_._internal(0);
|
static const CANCEL = const HttpAuthResponseAction_._internal(0);
|
||||||
|
|
||||||
|
@ -18,5 +19,5 @@ class HttpAuthResponseAction_ {
|
||||||
|
|
||||||
///Uses the credentials stored for the current host.
|
///Uses the credentials stored for the current host.
|
||||||
static const USE_SAVED_HTTP_AUTH_CREDENTIALS =
|
static const USE_SAVED_HTTP_AUTH_CREDENTIALS =
|
||||||
const HttpAuthResponseAction_._internal(2);
|
const HttpAuthResponseAction_._internal(2);
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,11 +45,11 @@ class HttpAuthenticationChallenge_ extends URLAuthenticationChallenge_ {
|
||||||
|
|
||||||
HttpAuthenticationChallenge_(
|
HttpAuthenticationChallenge_(
|
||||||
{required this.previousFailureCount,
|
{required this.previousFailureCount,
|
||||||
required URLProtectionSpace_ protectionSpace,
|
required URLProtectionSpace_ protectionSpace,
|
||||||
@Deprecated("Use failureResponse instead") this.iosFailureResponse,
|
@Deprecated("Use failureResponse instead") this.iosFailureResponse,
|
||||||
this.failureResponse,
|
this.failureResponse,
|
||||||
this.proposedCredential,
|
this.proposedCredential,
|
||||||
@Deprecated("Use error instead") this.iosError,
|
@Deprecated("Use error instead") this.iosError,
|
||||||
this.error})
|
this.error})
|
||||||
: super(protectionSpace: protectionSpace);
|
: super(protectionSpace: protectionSpace);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,4 +27,4 @@ class HTTPCookieSameSitePolicy_ {
|
||||||
///Cookies will be sent in all contexts, i.e sending cross-origin is allowed.
|
///Cookies will be sent in all contexts, i.e sending cross-origin is allowed.
|
||||||
///`None` requires the `Secure` attribute in latest browser versions.
|
///`None` requires the `Secure` attribute in latest browser versions.
|
||||||
static const NONE = const HTTPCookieSameSitePolicy_._internal("None");
|
static const NONE = const HTTPCookieSameSitePolicy_._internal("None");
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,4 +14,4 @@ class InAppWebViewHitTestResult_ {
|
||||||
String? extra;
|
String? extra;
|
||||||
|
|
||||||
InAppWebViewHitTestResult_({this.type, this.extra});
|
InAppWebViewHitTestResult_({this.type, this.extra});
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,13 +26,13 @@ class InAppWebViewHitTestResultType_ {
|
||||||
|
|
||||||
///[InAppWebViewHitTestResult] for hitting a HTML::a tag with src=http.
|
///[InAppWebViewHitTestResult] for hitting a HTML::a tag with src=http.
|
||||||
static const SRC_ANCHOR_TYPE =
|
static const SRC_ANCHOR_TYPE =
|
||||||
const InAppWebViewHitTestResultType_._internal(7);
|
const InAppWebViewHitTestResultType_._internal(7);
|
||||||
|
|
||||||
///[InAppWebViewHitTestResult] for hitting a HTML::a tag with src=http + HTML::img.
|
///[InAppWebViewHitTestResult] for hitting a HTML::a tag with src=http + HTML::img.
|
||||||
static const SRC_IMAGE_ANCHOR_TYPE =
|
static const SRC_IMAGE_ANCHOR_TYPE =
|
||||||
const InAppWebViewHitTestResultType_._internal(8);
|
const InAppWebViewHitTestResultType_._internal(8);
|
||||||
|
|
||||||
///[InAppWebViewHitTestResult] for hitting an edit text area.
|
///[InAppWebViewHitTestResult] for hitting an edit text area.
|
||||||
static const EDIT_TEXT_TYPE =
|
static const EDIT_TEXT_TYPE =
|
||||||
const InAppWebViewHitTestResultType_._internal(9);
|
const InAppWebViewHitTestResultType_._internal(9);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,16 +24,14 @@ class InAppWebViewInitialData_ {
|
||||||
Uri? androidHistoryUrl;
|
Uri? androidHistoryUrl;
|
||||||
|
|
||||||
///The URL to use as the history entry. If `null` defaults to `about:blank`. If non-null, this must be a valid URL.
|
///The URL to use as the history entry. If `null` defaults to `about:blank`. If non-null, this must be a valid URL.
|
||||||
@SupportedPlatforms(platforms: [
|
@SupportedPlatforms(platforms: [AndroidPlatform()])
|
||||||
AndroidPlatform()
|
|
||||||
])
|
|
||||||
Uri? historyUrl;
|
Uri? historyUrl;
|
||||||
|
|
||||||
InAppWebViewInitialData_(
|
InAppWebViewInitialData_(
|
||||||
{required this.data,
|
{required this.data,
|
||||||
this.mimeType = "text/html",
|
this.mimeType = "text/html",
|
||||||
this.encoding = "utf8",
|
this.encoding = "utf8",
|
||||||
this.baseUrl,
|
this.baseUrl,
|
||||||
@Deprecated('Use historyUrl instead') this.androidHistoryUrl,
|
@Deprecated('Use historyUrl instead') this.androidHistoryUrl,
|
||||||
this.historyUrl});
|
this.historyUrl});
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,9 +20,9 @@ class InAppWebViewRect_ {
|
||||||
@ExchangeableObjectConstructor()
|
@ExchangeableObjectConstructor()
|
||||||
InAppWebViewRect_(
|
InAppWebViewRect_(
|
||||||
{required this.x,
|
{required this.x,
|
||||||
required this.y,
|
required this.y,
|
||||||
required this.width,
|
required this.width,
|
||||||
required this.height}) {
|
required this.height}) {
|
||||||
assert(this.x >= 0 && this.y >= 0 && this.width >= 0 && this.height >= 0);
|
assert(this.x >= 0 && this.y >= 0 && this.width >= 0 && this.height >= 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,4 +12,4 @@ import '../in_app_webview/in_app_webview_controller.dart';
|
||||||
///
|
///
|
||||||
///Also, a [JavaScriptHandlerCallback] can return json data to the JavaScript side.
|
///Also, a [JavaScriptHandlerCallback] can return json data to the JavaScript side.
|
||||||
///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.
|
///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.
|
||||||
typedef dynamic JavaScriptHandlerCallback(List<dynamic> arguments);
|
typedef dynamic JavaScriptHandlerCallback(List<dynamic> arguments);
|
||||||
|
|
|
@ -23,7 +23,7 @@ class JsAlertRequest_ {
|
||||||
|
|
||||||
JsAlertRequest_(
|
JsAlertRequest_(
|
||||||
{this.url,
|
{this.url,
|
||||||
this.message,
|
this.message,
|
||||||
@Deprecated("Use isMainFrame instead") this.iosIsMainFrame,
|
@Deprecated("Use isMainFrame instead") this.iosIsMainFrame,
|
||||||
this.isMainFrame});
|
this.isMainFrame});
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ class JsAlertResponse_ {
|
||||||
|
|
||||||
JsAlertResponse_(
|
JsAlertResponse_(
|
||||||
{this.message = "",
|
{this.message = "",
|
||||||
this.handledByClient = false,
|
this.handledByClient = false,
|
||||||
this.confirmButtonTitle = "",
|
this.confirmButtonTitle = "",
|
||||||
this.action = JsAlertResponseAction_.CONFIRM});
|
this.action = JsAlertResponseAction_.CONFIRM});
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,4 +13,4 @@ class JsAlertResponseAction_ {
|
||||||
|
|
||||||
///Confirm that the user hit confirm button.
|
///Confirm that the user hit confirm button.
|
||||||
static const CONFIRM = const JsAlertResponseAction_._internal(0);
|
static const CONFIRM = const JsAlertResponseAction_._internal(0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,4 +14,4 @@ class JsBeforeUnloadRequest_ {
|
||||||
String? message;
|
String? message;
|
||||||
|
|
||||||
JsBeforeUnloadRequest_({this.url, this.message});
|
JsBeforeUnloadRequest_({this.url, this.message});
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,8 +26,8 @@ class JsBeforeUnloadResponse_ {
|
||||||
|
|
||||||
JsBeforeUnloadResponse_(
|
JsBeforeUnloadResponse_(
|
||||||
{this.message = "",
|
{this.message = "",
|
||||||
this.handledByClient = false,
|
this.handledByClient = false,
|
||||||
this.confirmButtonTitle = "",
|
this.confirmButtonTitle = "",
|
||||||
this.cancelButtonTitle = "",
|
this.cancelButtonTitle = "",
|
||||||
this.action = JsBeforeUnloadResponseAction_.CONFIRM});
|
this.action = JsBeforeUnloadResponseAction_.CONFIRM});
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,4 +16,4 @@ class JsBeforeUnloadResponseAction_ {
|
||||||
|
|
||||||
///Confirm that the user hit cancel button.
|
///Confirm that the user hit cancel button.
|
||||||
static const CANCEL = const JsBeforeUnloadResponseAction_._internal(1);
|
static const CANCEL = const JsBeforeUnloadResponseAction_._internal(1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ class JsConfirmRequest_ {
|
||||||
|
|
||||||
JsConfirmRequest_(
|
JsConfirmRequest_(
|
||||||
{this.url,
|
{this.url,
|
||||||
this.message,
|
this.message,
|
||||||
@Deprecated("Use isMainFrame instead") this.iosIsMainFrame,
|
@Deprecated("Use isMainFrame instead") this.iosIsMainFrame,
|
||||||
this.isMainFrame});
|
this.isMainFrame});
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,8 +26,8 @@ class JsConfirmResponse_ {
|
||||||
|
|
||||||
JsConfirmResponse_(
|
JsConfirmResponse_(
|
||||||
{this.message = "",
|
{this.message = "",
|
||||||
this.handledByClient = false,
|
this.handledByClient = false,
|
||||||
this.confirmButtonTitle = "",
|
this.confirmButtonTitle = "",
|
||||||
this.cancelButtonTitle = "",
|
this.cancelButtonTitle = "",
|
||||||
this.action = JsConfirmResponseAction_.CANCEL});
|
this.action = JsConfirmResponseAction_.CANCEL});
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue