flutter format
This commit is contained in:
parent
065da37d0d
commit
786a544963
|
@ -8,10 +8,8 @@ import '../util.dart';
|
||||||
void customMenuItem() {
|
void customMenuItem() {
|
||||||
final shouldSkip = kIsWeb
|
final shouldSkip = kIsWeb
|
||||||
? true
|
? true
|
||||||
: ![
|
: ![TargetPlatform.android, TargetPlatform.iOS]
|
||||||
TargetPlatform.android,
|
.contains(defaultTargetPlatform);
|
||||||
TargetPlatform.iOS
|
|
||||||
].contains(defaultTargetPlatform);
|
|
||||||
|
|
||||||
test('add custom menu item', () async {
|
test('add custom menu item', () async {
|
||||||
var chromeSafariBrowser = MyChromeSafariBrowser();
|
var chromeSafariBrowser = MyChromeSafariBrowser();
|
||||||
|
|
|
@ -8,10 +8,8 @@ import '../util.dart';
|
||||||
void openAndClose() {
|
void openAndClose() {
|
||||||
final shouldSkip = kIsWeb
|
final shouldSkip = kIsWeb
|
||||||
? true
|
? true
|
||||||
: ![
|
: ![TargetPlatform.android, TargetPlatform.iOS]
|
||||||
TargetPlatform.android,
|
.contains(defaultTargetPlatform);
|
||||||
TargetPlatform.iOS
|
|
||||||
].contains(defaultTargetPlatform);
|
|
||||||
|
|
||||||
test('open and close', () async {
|
test('open and close', () async {
|
||||||
var chromeSafariBrowser = MyChromeSafariBrowser();
|
var chromeSafariBrowser = MyChromeSafariBrowser();
|
||||||
|
|
|
@ -22,4 +22,4 @@
|
||||||
library flutter_inappwebview;
|
library flutter_inappwebview;
|
||||||
|
|
||||||
export 'src/main.dart';
|
export 'src/main.dart';
|
||||||
export 'src/web/main_stub.dart' if (dart.library.html) 'src/web/main.dart';
|
export 'src/web/main_stub.dart' if (dart.library.html) 'src/web/main.dart';
|
||||||
|
|
|
@ -59,8 +59,10 @@ class InAppBrowserClassSettings {
|
||||||
if (instance == null) {
|
if (instance == null) {
|
||||||
instance = InAppBrowserClassSettings();
|
instance = InAppBrowserClassSettings();
|
||||||
}
|
}
|
||||||
instance.browserSettings = InAppBrowserSettings.fromMap(options) ?? InAppBrowserSettings();
|
instance.browserSettings =
|
||||||
instance.webViewSettings = InAppWebViewSettings.fromMap(options) ?? InAppWebViewSettings();
|
InAppBrowserSettings.fromMap(options) ?? InAppBrowserSettings();
|
||||||
|
instance.webViewSettings =
|
||||||
|
InAppWebViewSettings.fromMap(options) ?? InAppWebViewSettings();
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -688,7 +688,9 @@ class _InAppWebViewState extends State<InAppWebView> {
|
||||||
creationParamsCodec: const StandardMessageCodec(),
|
creationParamsCodec: const StandardMessageCodec(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else if (defaultTargetPlatform == TargetPlatform.iOS/* || defaultTargetPlatform == TargetPlatform.macOS*/) {
|
} else if (defaultTargetPlatform ==
|
||||||
|
TargetPlatform
|
||||||
|
.iOS /* || defaultTargetPlatform == TargetPlatform.macOS*/) {
|
||||||
return UiKitView(
|
return UiKitView(
|
||||||
viewType: 'com.pichillilorenzo/flutter_inappwebview',
|
viewType: 'com.pichillilorenzo/flutter_inappwebview',
|
||||||
onPlatformViewCreated: _onPlatformViewCreated,
|
onPlatformViewCreated: _onPlatformViewCreated,
|
||||||
|
|
|
@ -113,7 +113,7 @@ class InAppWebViewController {
|
||||||
_debugLog(String method, dynamic args) {
|
_debugLog(String method, dynamic args) {
|
||||||
debugLog(
|
debugLog(
|
||||||
className: this.runtimeType.toString(),
|
className: this.runtimeType.toString(),
|
||||||
name: _inAppBrowser == null ? "WebView" : "InAppBrowser",
|
name: _inAppBrowser == null ? "WebView" : "InAppBrowser",
|
||||||
id: (getViewId() ?? _inAppBrowser?.id).toString(),
|
id: (getViewId() ?? _inAppBrowser?.id).toString(),
|
||||||
debugLoggingSettings: WebView.debugLoggingSettings,
|
debugLoggingSettings: WebView.debugLoggingSettings,
|
||||||
method: method,
|
method: method,
|
||||||
|
|
|
@ -33,7 +33,8 @@ import '../context_menu.dart';
|
||||||
|
|
||||||
part 'in_app_webview_settings.g.dart';
|
part 'in_app_webview_settings.g.dart';
|
||||||
|
|
||||||
List<ContentBlocker> _deserializeContentBlockers(List<dynamic>? contentBlockersMapList) {
|
List<ContentBlocker> _deserializeContentBlockers(
|
||||||
|
List<dynamic>? contentBlockersMapList) {
|
||||||
List<ContentBlocker> contentBlockers = [];
|
List<ContentBlocker> contentBlockers = [];
|
||||||
if (contentBlockersMapList != null) {
|
if (contentBlockersMapList != null) {
|
||||||
contentBlockersMapList.forEach((contentBlocker) {
|
contentBlockersMapList.forEach((contentBlocker) {
|
||||||
|
|
|
@ -214,4 +214,4 @@ export 'print_job_disposition.dart' show PrintJobDisposition;
|
||||||
export 'printer.dart' show Printer;
|
export 'printer.dart' show Printer;
|
||||||
export 'window_type.dart' show WindowType;
|
export 'window_type.dart' show WindowType;
|
||||||
export 'window_style_mask.dart' show WindowStyleMask;
|
export 'window_style_mask.dart' show WindowStyleMask;
|
||||||
export 'window_titlebar_separator_style.dart' show WindowTitlebarSeparatorStyle;
|
export 'window_titlebar_separator_style.dart' show WindowTitlebarSeparatorStyle;
|
||||||
|
|
|
@ -29,7 +29,7 @@ class PermissionResourceType_ {
|
||||||
available: "12.0",
|
available: "12.0",
|
||||||
apiName: 'WKMediaCaptureType.microphone',
|
apiName: 'WKMediaCaptureType.microphone',
|
||||||
apiUrl:
|
apiUrl:
|
||||||
'https://developer.apple.com/documentation/webkit/wkmediacapturetype/microphone',
|
'https://developer.apple.com/documentation/webkit/wkmediacapturetype/microphone',
|
||||||
value: 1)
|
value: 1)
|
||||||
])
|
])
|
||||||
static const MICROPHONE = PermissionResourceType_._internal('MICROPHONE');
|
static const MICROPHONE = PermissionResourceType_._internal('MICROPHONE');
|
||||||
|
@ -74,7 +74,7 @@ class PermissionResourceType_ {
|
||||||
available: "12.0",
|
available: "12.0",
|
||||||
apiName: 'WKMediaCaptureType.camera',
|
apiName: 'WKMediaCaptureType.camera',
|
||||||
apiUrl:
|
apiUrl:
|
||||||
'https://developer.apple.com/documentation/webkit/wkmediacapturetype/camera',
|
'https://developer.apple.com/documentation/webkit/wkmediacapturetype/camera',
|
||||||
value: 0)
|
value: 0)
|
||||||
])
|
])
|
||||||
static const CAMERA = PermissionResourceType_._internal('CAMERA');
|
static const CAMERA = PermissionResourceType_._internal('CAMERA');
|
||||||
|
@ -91,7 +91,7 @@ class PermissionResourceType_ {
|
||||||
available: "12.0",
|
available: "12.0",
|
||||||
apiName: 'WKMediaCaptureType.cameraAndMicrophone',
|
apiName: 'WKMediaCaptureType.cameraAndMicrophone',
|
||||||
apiUrl:
|
apiUrl:
|
||||||
'https://developer.apple.com/documentation/webkit/wkmediacapturetype/cameraandmicrophone',
|
'https://developer.apple.com/documentation/webkit/wkmediacapturetype/cameraandmicrophone',
|
||||||
value: 2)
|
value: 2)
|
||||||
])
|
])
|
||||||
static const CAMERA_AND_MICROPHONE =
|
static const CAMERA_AND_MICROPHONE =
|
||||||
|
|
|
@ -23,8 +23,11 @@ class PrintJobAttributes_ {
|
||||||
PrintJobColorMode_? colorMode;
|
PrintJobColorMode_? colorMode;
|
||||||
|
|
||||||
///The duplex mode to use for the print job.
|
///The duplex mode to use for the print job.
|
||||||
@SupportedPlatforms(
|
@SupportedPlatforms(platforms: [
|
||||||
platforms: [AndroidPlatform(available: "23"), IOSPlatform(), MacOSPlatform()])
|
AndroidPlatform(available: "23"),
|
||||||
|
IOSPlatform(),
|
||||||
|
MacOSPlatform()
|
||||||
|
])
|
||||||
PrintJobDuplexMode_? duplex;
|
PrintJobDuplexMode_? duplex;
|
||||||
|
|
||||||
///The orientation of the printed content, portrait or landscape.
|
///The orientation of the printed content, portrait or landscape.
|
||||||
|
|
|
@ -15,12 +15,16 @@ class PrintJobColorMode_ {
|
||||||
const PrintJobColorMode_._internal(this._value);
|
const PrintJobColorMode_._internal(this._value);
|
||||||
|
|
||||||
///Monochrome color scheme, for example one color is used.
|
///Monochrome color scheme, for example one color is used.
|
||||||
@EnumSupportedPlatforms(
|
@EnumSupportedPlatforms(platforms: [
|
||||||
platforms: [EnumAndroidPlatform(value: 1), EnumMacOSPlatform(value: "Gray")])
|
EnumAndroidPlatform(value: 1),
|
||||||
|
EnumMacOSPlatform(value: "Gray")
|
||||||
|
])
|
||||||
static const MONOCHROME = const PrintJobColorMode_._internal(1);
|
static const MONOCHROME = const PrintJobColorMode_._internal(1);
|
||||||
|
|
||||||
///Color color scheme, for example many colors are used.
|
///Color color scheme, for example many colors are used.
|
||||||
@EnumSupportedPlatforms(
|
@EnumSupportedPlatforms(platforms: [
|
||||||
platforms: [EnumAndroidPlatform(value: 1), EnumMacOSPlatform(value: "RGB")])
|
EnumAndroidPlatform(value: 1),
|
||||||
|
EnumMacOSPlatform(value: "RGB")
|
||||||
|
])
|
||||||
static const COLOR = const PrintJobColorMode_._internal(2);
|
static const COLOR = const PrintJobColorMode_._internal(2);
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,26 +13,18 @@ class PrintJobDisposition_ {
|
||||||
const PrintJobDisposition_._internal(this._value);
|
const PrintJobDisposition_._internal(this._value);
|
||||||
|
|
||||||
///Normal print job.
|
///Normal print job.
|
||||||
@EnumSupportedPlatforms(platforms: [
|
@EnumSupportedPlatforms(platforms: [EnumMacOSPlatform(value: 'spool')])
|
||||||
EnumMacOSPlatform(value: 'spool')
|
|
||||||
])
|
|
||||||
static const SPOOL = const PrintJobDisposition_._internal('SPOOL');
|
static const SPOOL = const PrintJobDisposition_._internal('SPOOL');
|
||||||
|
|
||||||
///Send to Preview application.
|
///Send to Preview application.
|
||||||
@EnumSupportedPlatforms(platforms: [
|
@EnumSupportedPlatforms(platforms: [EnumMacOSPlatform(value: 'preview')])
|
||||||
EnumMacOSPlatform(value: 'preview')
|
|
||||||
])
|
|
||||||
static const PREVIEW = const PrintJobDisposition_._internal("PREVIEW");
|
static const PREVIEW = const PrintJobDisposition_._internal("PREVIEW");
|
||||||
|
|
||||||
///Save to a file.
|
///Save to a file.
|
||||||
@EnumSupportedPlatforms(platforms: [
|
@EnumSupportedPlatforms(platforms: [EnumMacOSPlatform(value: 'save')])
|
||||||
EnumMacOSPlatform(value: 'save')
|
|
||||||
])
|
|
||||||
static const SAVE = const PrintJobDisposition_._internal("SAVE");
|
static const SAVE = const PrintJobDisposition_._internal("SAVE");
|
||||||
|
|
||||||
///Cancel print job.
|
///Cancel print job.
|
||||||
@EnumSupportedPlatforms(platforms: [
|
@EnumSupportedPlatforms(platforms: [EnumMacOSPlatform(value: 'cancel')])
|
||||||
EnumMacOSPlatform(value: 'cancel')
|
|
||||||
])
|
|
||||||
static const CANCEL = const PrintJobDisposition_._internal("CANCEL");
|
static const CANCEL = const PrintJobDisposition_._internal("CANCEL");
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,19 +16,28 @@ class PrintJobDuplexMode_ {
|
||||||
const PrintJobDuplexMode_._internal(this._value);
|
const PrintJobDuplexMode_._internal(this._value);
|
||||||
|
|
||||||
///No double-sided (duplex) printing; single-sided printing only.
|
///No double-sided (duplex) printing; single-sided printing only.
|
||||||
@EnumSupportedPlatforms(
|
@EnumSupportedPlatforms(platforms: [
|
||||||
platforms: [EnumAndroidPlatform(value: 1), EnumIOSPlatform(value: 0), EnumMacOSPlatform(value: 1)])
|
EnumAndroidPlatform(value: 1),
|
||||||
|
EnumIOSPlatform(value: 0),
|
||||||
|
EnumMacOSPlatform(value: 1)
|
||||||
|
])
|
||||||
static const NONE = PrintJobDuplexMode_._internal('NONE');
|
static const NONE = PrintJobDuplexMode_._internal('NONE');
|
||||||
|
|
||||||
///Duplex printing that flips the back page along the long edge of the paper.
|
///Duplex printing that flips the back page along the long edge of the paper.
|
||||||
///Pages are turned sideways along the long edge - like a book.
|
///Pages are turned sideways along the long edge - like a book.
|
||||||
@EnumSupportedPlatforms(
|
@EnumSupportedPlatforms(platforms: [
|
||||||
platforms: [EnumAndroidPlatform(value: 2), EnumIOSPlatform(value: 1), EnumMacOSPlatform(value: 2)])
|
EnumAndroidPlatform(value: 2),
|
||||||
|
EnumIOSPlatform(value: 1),
|
||||||
|
EnumMacOSPlatform(value: 2)
|
||||||
|
])
|
||||||
static const LONG_EDGE = PrintJobDuplexMode_._internal('LONG_EDGE');
|
static const LONG_EDGE = PrintJobDuplexMode_._internal('LONG_EDGE');
|
||||||
|
|
||||||
///Duplex print that flips the back page along the short edge of the paper.
|
///Duplex print that flips the back page along the short edge of the paper.
|
||||||
///Pages are turned upwards along the short edge - like a notepad.
|
///Pages are turned upwards along the short edge - like a notepad.
|
||||||
@EnumSupportedPlatforms(
|
@EnumSupportedPlatforms(platforms: [
|
||||||
platforms: [EnumAndroidPlatform(value: 4), EnumIOSPlatform(value: 2), EnumMacOSPlatform(value: 3)])
|
EnumAndroidPlatform(value: 4),
|
||||||
|
EnumIOSPlatform(value: 2),
|
||||||
|
EnumMacOSPlatform(value: 3)
|
||||||
|
])
|
||||||
static const SHORT_EDGE = PrintJobDuplexMode_._internal('SHORT_EDGE');
|
static const SHORT_EDGE = PrintJobDuplexMode_._internal('SHORT_EDGE');
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,7 +139,7 @@ class PrintJobInfo_ {
|
||||||
this.canSpawnSeparateThread,
|
this.canSpawnSeparateThread,
|
||||||
this.isCopyingOperation,
|
this.isCopyingOperation,
|
||||||
this.currentPage,
|
this.currentPage,
|
||||||
this.firstPage,
|
this.firstPage,
|
||||||
this.lastPage,
|
this.lastPage,
|
||||||
this.attributes});
|
this.attributes});
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,16 +13,12 @@ class PrintJobOrientation_ {
|
||||||
const PrintJobOrientation_._internal(this._value);
|
const PrintJobOrientation_._internal(this._value);
|
||||||
|
|
||||||
///Pages are printed in portrait orientation.
|
///Pages are printed in portrait orientation.
|
||||||
@EnumSupportedPlatforms(platforms: [
|
@EnumSupportedPlatforms(
|
||||||
EnumIOSPlatform(value: 0),
|
platforms: [EnumIOSPlatform(value: 0), EnumMacOSPlatform(value: 0)])
|
||||||
EnumMacOSPlatform(value: 0)
|
|
||||||
])
|
|
||||||
static const PORTRAIT = const PrintJobOrientation_._internal(0);
|
static const PORTRAIT = const PrintJobOrientation_._internal(0);
|
||||||
|
|
||||||
///Pages are printed in landscape orientation.
|
///Pages are printed in landscape orientation.
|
||||||
@EnumSupportedPlatforms(platforms: [
|
@EnumSupportedPlatforms(
|
||||||
EnumIOSPlatform(value: 1),
|
platforms: [EnumIOSPlatform(value: 1), EnumMacOSPlatform(value: 1)])
|
||||||
EnumMacOSPlatform(value: 1)
|
|
||||||
])
|
|
||||||
static const LANDSCAPE = const PrintJobOrientation_._internal(1);
|
static const LANDSCAPE = const PrintJobOrientation_._internal(1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,26 +13,18 @@ class PrintJobPageOrder_ {
|
||||||
const PrintJobPageOrder_._internal(this._value);
|
const PrintJobPageOrder_._internal(this._value);
|
||||||
|
|
||||||
///Descending (front to back) page order.
|
///Descending (front to back) page order.
|
||||||
@EnumSupportedPlatforms(platforms: [
|
@EnumSupportedPlatforms(platforms: [EnumMacOSPlatform(value: -1)])
|
||||||
EnumMacOSPlatform(value: -1)
|
|
||||||
])
|
|
||||||
static const DESCENDING = const PrintJobPageOrder_._internal(-1);
|
static const DESCENDING = const PrintJobPageOrder_._internal(-1);
|
||||||
|
|
||||||
///The spooler does not rearrange pages—they are printed in the order received by the spooler.
|
///The spooler does not rearrange pages—they are printed in the order received by the spooler.
|
||||||
@EnumSupportedPlatforms(platforms: [
|
@EnumSupportedPlatforms(platforms: [EnumMacOSPlatform(value: 0)])
|
||||||
EnumMacOSPlatform(value: 0)
|
|
||||||
])
|
|
||||||
static const SPECIAL = const PrintJobPageOrder_._internal(0);
|
static const SPECIAL = const PrintJobPageOrder_._internal(0);
|
||||||
|
|
||||||
///Ascending (back to front) page order.
|
///Ascending (back to front) page order.
|
||||||
@EnumSupportedPlatforms(platforms: [
|
@EnumSupportedPlatforms(platforms: [EnumMacOSPlatform(value: 1)])
|
||||||
EnumMacOSPlatform(value: 1)
|
|
||||||
])
|
|
||||||
static const ASCENDING = const PrintJobPageOrder_._internal(1);
|
static const ASCENDING = const PrintJobPageOrder_._internal(1);
|
||||||
|
|
||||||
///No page order specified.
|
///No page order specified.
|
||||||
@EnumSupportedPlatforms(platforms: [
|
@EnumSupportedPlatforms(platforms: [EnumMacOSPlatform(value: 2)])
|
||||||
EnumMacOSPlatform(value: 2)
|
|
||||||
])
|
|
||||||
static const UNKNOWN = const PrintJobPageOrder_._internal(2);
|
static const UNKNOWN = const PrintJobPageOrder_._internal(2);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,20 +15,14 @@ class PrintJobPaginationMode_ {
|
||||||
const PrintJobPaginationMode_._internal(this._value);
|
const PrintJobPaginationMode_._internal(this._value);
|
||||||
|
|
||||||
///
|
///
|
||||||
@EnumSupportedPlatforms(platforms: [
|
@EnumSupportedPlatforms(platforms: [EnumMacOSPlatform(value: 0)])
|
||||||
EnumMacOSPlatform(value: 0)
|
|
||||||
])
|
|
||||||
static const AUTOMATIC = const PrintJobPaginationMode_._internal('AUTOMATIC');
|
static const AUTOMATIC = const PrintJobPaginationMode_._internal('AUTOMATIC');
|
||||||
|
|
||||||
///
|
///
|
||||||
@EnumSupportedPlatforms(platforms: [
|
@EnumSupportedPlatforms(platforms: [EnumMacOSPlatform(value: 1)])
|
||||||
EnumMacOSPlatform(value: 1)
|
|
||||||
])
|
|
||||||
static const FIT = const PrintJobPaginationMode_._internal("FIT");
|
static const FIT = const PrintJobPaginationMode_._internal("FIT");
|
||||||
|
|
||||||
///
|
///
|
||||||
@EnumSupportedPlatforms(platforms: [
|
@EnumSupportedPlatforms(platforms: [EnumMacOSPlatform(value: 2)])
|
||||||
EnumMacOSPlatform(value: 2)
|
|
||||||
])
|
|
||||||
static const CLIP = const PrintJobPaginationMode_._internal("CLIP");
|
static const CLIP = const PrintJobPaginationMode_._internal("CLIP");
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,17 +13,13 @@ class PrintJobRenderingQuality_ {
|
||||||
const PrintJobRenderingQuality_._internal(this._value);
|
const PrintJobRenderingQuality_._internal(this._value);
|
||||||
|
|
||||||
///Renders the printing at the best possible quality, regardless of speed.
|
///Renders the printing at the best possible quality, regardless of speed.
|
||||||
@EnumSupportedPlatforms(platforms: [
|
@EnumSupportedPlatforms(
|
||||||
EnumIOSPlatform(value: 0),
|
platforms: [EnumIOSPlatform(value: 0), EnumMacOSPlatform(value: 0)])
|
||||||
EnumMacOSPlatform(value: 0)
|
|
||||||
])
|
|
||||||
static const BEST = const PrintJobRenderingQuality_._internal(0);
|
static const BEST = const PrintJobRenderingQuality_._internal(0);
|
||||||
|
|
||||||
///Sacrifices the least possible amount of rendering quality for speed to maintain a responsive user interface.
|
///Sacrifices the least possible amount of rendering quality for speed to maintain a responsive user interface.
|
||||||
///This option should be used only after establishing that best quality rendering does indeed make the user interface unresponsive.
|
///This option should be used only after establishing that best quality rendering does indeed make the user interface unresponsive.
|
||||||
@EnumSupportedPlatforms(platforms: [
|
@EnumSupportedPlatforms(
|
||||||
EnumIOSPlatform(value: 1),
|
platforms: [EnumIOSPlatform(value: 1), EnumMacOSPlatform(value: 1)])
|
||||||
EnumMacOSPlatform(value: 1)
|
|
||||||
])
|
|
||||||
static const RESPONSIVE = const PrintJobRenderingQuality_._internal(1);
|
static const RESPONSIVE = const PrintJobRenderingQuality_._internal(1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,10 +15,10 @@ class WindowStyleMask_ {
|
||||||
///The window displays none of the usual peripheral elements. Useful only for display or caching purposes.
|
///The window displays none of the usual peripheral elements. Useful only for display or caching purposes.
|
||||||
@EnumSupportedPlatforms(platforms: [
|
@EnumSupportedPlatforms(platforms: [
|
||||||
EnumMacOSPlatform(
|
EnumMacOSPlatform(
|
||||||
value: 0,
|
value: 0,
|
||||||
apiName: "NSWindow.StyleMask.borderless",
|
apiName: "NSWindow.StyleMask.borderless",
|
||||||
apiUrl: "https://developer.apple.com/documentation/appkit/nswindow/stylemask/1644698-borderless"
|
apiUrl:
|
||||||
)
|
"https://developer.apple.com/documentation/appkit/nswindow/stylemask/1644698-borderless")
|
||||||
])
|
])
|
||||||
static const BORDERLESS = const WindowStyleMask_._internal(0);
|
static const BORDERLESS = const WindowStyleMask_._internal(0);
|
||||||
|
|
||||||
|
@ -27,8 +27,8 @@ class WindowStyleMask_ {
|
||||||
EnumMacOSPlatform(
|
EnumMacOSPlatform(
|
||||||
value: 1,
|
value: 1,
|
||||||
apiName: "NSWindow.StyleMask.titled",
|
apiName: "NSWindow.StyleMask.titled",
|
||||||
apiUrl: "https://developer.apple.com/documentation/appkit/nswindow/stylemask/1644724-titled"
|
apiUrl:
|
||||||
)
|
"https://developer.apple.com/documentation/appkit/nswindow/stylemask/1644724-titled")
|
||||||
])
|
])
|
||||||
static const TITLED = const WindowStyleMask_._internal(1);
|
static const TITLED = const WindowStyleMask_._internal(1);
|
||||||
|
|
||||||
|
@ -37,8 +37,8 @@ class WindowStyleMask_ {
|
||||||
EnumMacOSPlatform(
|
EnumMacOSPlatform(
|
||||||
value: 2,
|
value: 2,
|
||||||
apiName: "NSWindow.StyleMask.closable",
|
apiName: "NSWindow.StyleMask.closable",
|
||||||
apiUrl: "https://developer.apple.com/documentation/appkit/nswindow/stylemask/1644610-closable"
|
apiUrl:
|
||||||
)
|
"https://developer.apple.com/documentation/appkit/nswindow/stylemask/1644610-closable")
|
||||||
])
|
])
|
||||||
static const CLOSABLE = const WindowStyleMask_._internal(2);
|
static const CLOSABLE = const WindowStyleMask_._internal(2);
|
||||||
|
|
||||||
|
@ -47,8 +47,8 @@ class WindowStyleMask_ {
|
||||||
EnumMacOSPlatform(
|
EnumMacOSPlatform(
|
||||||
value: 4,
|
value: 4,
|
||||||
apiName: "NSWindow.StyleMask.miniaturizable",
|
apiName: "NSWindow.StyleMask.miniaturizable",
|
||||||
apiUrl: "https://developer.apple.com/documentation/appkit/nswindow/stylemask/1644650-miniaturizable"
|
apiUrl:
|
||||||
)
|
"https://developer.apple.com/documentation/appkit/nswindow/stylemask/1644650-miniaturizable")
|
||||||
])
|
])
|
||||||
static const MINIATURIZABLE = const WindowStyleMask_._internal(4);
|
static const MINIATURIZABLE = const WindowStyleMask_._internal(4);
|
||||||
|
|
||||||
|
@ -57,8 +57,8 @@ class WindowStyleMask_ {
|
||||||
EnumMacOSPlatform(
|
EnumMacOSPlatform(
|
||||||
value: 8,
|
value: 8,
|
||||||
apiName: "NSWindow.StyleMask.miniaturizable",
|
apiName: "NSWindow.StyleMask.miniaturizable",
|
||||||
apiUrl: "https://developer.apple.com/documentation/appkit/nswindow/stylemask/1644717-resizable"
|
apiUrl:
|
||||||
)
|
"https://developer.apple.com/documentation/appkit/nswindow/stylemask/1644717-resizable")
|
||||||
])
|
])
|
||||||
static const RESIZABLE = const WindowStyleMask_._internal(8);
|
static const RESIZABLE = const WindowStyleMask_._internal(8);
|
||||||
|
|
||||||
|
@ -67,8 +67,8 @@ class WindowStyleMask_ {
|
||||||
EnumMacOSPlatform(
|
EnumMacOSPlatform(
|
||||||
value: 16384,
|
value: 16384,
|
||||||
apiName: "NSWindow.StyleMask.fullScreen",
|
apiName: "NSWindow.StyleMask.fullScreen",
|
||||||
apiUrl: "https://developer.apple.com/documentation/appkit/nswindow/stylemask/1644530-fullscreen"
|
apiUrl:
|
||||||
)
|
"https://developer.apple.com/documentation/appkit/nswindow/stylemask/1644530-fullscreen")
|
||||||
])
|
])
|
||||||
static const FULLSCREEN = const WindowStyleMask_._internal(16384);
|
static const FULLSCREEN = const WindowStyleMask_._internal(16384);
|
||||||
|
|
||||||
|
@ -79,8 +79,8 @@ class WindowStyleMask_ {
|
||||||
EnumMacOSPlatform(
|
EnumMacOSPlatform(
|
||||||
value: 32768,
|
value: 32768,
|
||||||
apiName: "NSWindow.StyleMask.fullSizeContentView",
|
apiName: "NSWindow.StyleMask.fullSizeContentView",
|
||||||
apiUrl: "https://developer.apple.com/documentation/appkit/nswindow/stylemask/1644646-fullsizecontentview"
|
apiUrl:
|
||||||
)
|
"https://developer.apple.com/documentation/appkit/nswindow/stylemask/1644646-fullsizecontentview")
|
||||||
])
|
])
|
||||||
static const FULL_SIZE_CONTENT_VIEW = const WindowStyleMask_._internal(32768);
|
static const FULL_SIZE_CONTENT_VIEW = const WindowStyleMask_._internal(32768);
|
||||||
|
|
||||||
|
@ -89,8 +89,8 @@ class WindowStyleMask_ {
|
||||||
EnumMacOSPlatform(
|
EnumMacOSPlatform(
|
||||||
value: 16,
|
value: 16,
|
||||||
apiName: "NSWindow.StyleMask.utilityWindow",
|
apiName: "NSWindow.StyleMask.utilityWindow",
|
||||||
apiUrl: "https://developer.apple.com/documentation/appkit/nswindow/stylemask/1644672-utilitywindow"
|
apiUrl:
|
||||||
)
|
"https://developer.apple.com/documentation/appkit/nswindow/stylemask/1644672-utilitywindow")
|
||||||
])
|
])
|
||||||
static const UTILITY_WINDOW = const WindowStyleMask_._internal(16);
|
static const UTILITY_WINDOW = const WindowStyleMask_._internal(16);
|
||||||
|
|
||||||
|
@ -99,8 +99,8 @@ class WindowStyleMask_ {
|
||||||
EnumMacOSPlatform(
|
EnumMacOSPlatform(
|
||||||
value: 64,
|
value: 64,
|
||||||
apiName: "NSWindow.StyleMask.docModalWindow",
|
apiName: "NSWindow.StyleMask.docModalWindow",
|
||||||
apiUrl: "https://developer.apple.com/documentation/appkit/nswindow/stylemask/1644253-docmodalwindow"
|
apiUrl:
|
||||||
)
|
"https://developer.apple.com/documentation/appkit/nswindow/stylemask/1644253-docmodalwindow")
|
||||||
])
|
])
|
||||||
static const DOC_MODAL_WINDOW = const WindowStyleMask_._internal(64);
|
static const DOC_MODAL_WINDOW = const WindowStyleMask_._internal(64);
|
||||||
|
|
||||||
|
@ -109,8 +109,8 @@ class WindowStyleMask_ {
|
||||||
EnumMacOSPlatform(
|
EnumMacOSPlatform(
|
||||||
value: 128,
|
value: 128,
|
||||||
apiName: "NSWindow.StyleMask.nonactivatingPanel",
|
apiName: "NSWindow.StyleMask.nonactivatingPanel",
|
||||||
apiUrl: "https://developer.apple.com/documentation/appkit/nswindow/stylemask/1644696-nonactivatingpanel"
|
apiUrl:
|
||||||
)
|
"https://developer.apple.com/documentation/appkit/nswindow/stylemask/1644696-nonactivatingpanel")
|
||||||
])
|
])
|
||||||
static const NONACTIVATING_PANEL = const WindowStyleMask_._internal(128);
|
static const NONACTIVATING_PANEL = const WindowStyleMask_._internal(128);
|
||||||
|
|
||||||
|
@ -119,8 +119,8 @@ class WindowStyleMask_ {
|
||||||
EnumMacOSPlatform(
|
EnumMacOSPlatform(
|
||||||
value: 8192,
|
value: 8192,
|
||||||
apiName: "NSWindow.StyleMask.hudWindow",
|
apiName: "NSWindow.StyleMask.hudWindow",
|
||||||
apiUrl: "https://developer.apple.com/documentation/appkit/nswindow/stylemask/1644653-hudwindow"
|
apiUrl:
|
||||||
)
|
"https://developer.apple.com/documentation/appkit/nswindow/stylemask/1644653-hudwindow")
|
||||||
])
|
])
|
||||||
static const HUD_WINDOW = const WindowStyleMask_._internal(8192);
|
static const HUD_WINDOW = const WindowStyleMask_._internal(8192);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,4 +27,4 @@ class WindowTitlebarSeparatorStyle_ {
|
||||||
///A style indicating that the title bar separator is a shadow.
|
///A style indicating that the title bar separator is a shadow.
|
||||||
@EnumSupportedPlatforms(platforms: [EnumMacOSPlatform(value: 3)])
|
@EnumSupportedPlatforms(platforms: [EnumMacOSPlatform(value: 3)])
|
||||||
static const SHADOW = const WindowTitlebarSeparatorStyle_._internal(3);
|
static const SHADOW = const WindowTitlebarSeparatorStyle_._internal(3);
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,7 +97,8 @@ class InAppWebViewWebElement implements Disposable {
|
||||||
return await getSettings();
|
return await getSettings();
|
||||||
case "setSettings":
|
case "setSettings":
|
||||||
InAppWebViewSettings newSettings = InAppWebViewSettings.fromMap(
|
InAppWebViewSettings newSettings = InAppWebViewSettings.fromMap(
|
||||||
call.arguments["settings"].cast<String, dynamic>()) ?? InAppWebViewSettings();
|
call.arguments["settings"].cast<String, dynamic>()) ??
|
||||||
|
InAppWebViewSettings();
|
||||||
await setSettings(newSettings);
|
await setSettings(newSettings);
|
||||||
break;
|
break;
|
||||||
case "getUrl":
|
case "getUrl":
|
||||||
|
@ -403,7 +404,8 @@ class InAppWebViewWebElement implements Disposable {
|
||||||
Future<void> setSettings(InAppWebViewSettings newSettings) async {
|
Future<void> setSettings(InAppWebViewSettings newSettings) async {
|
||||||
Set<Sandbox> sandbox = getSandbox();
|
Set<Sandbox> sandbox = getSandbox();
|
||||||
|
|
||||||
if (newSettings.javaScriptEnabled != null && settings.javaScriptEnabled != newSettings.javaScriptEnabled) {
|
if (newSettings.javaScriptEnabled != null &&
|
||||||
|
settings.javaScriptEnabled != newSettings.javaScriptEnabled) {
|
||||||
if (!newSettings.javaScriptEnabled!) {
|
if (!newSettings.javaScriptEnabled!) {
|
||||||
sandbox.remove(Sandbox.ALLOW_SCRIPTS);
|
sandbox.remove(Sandbox.ALLOW_SCRIPTS);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue