code formatting
This commit is contained in:
parent
5cc257895c
commit
0744743c97
|
@ -111,7 +111,11 @@ class InAppBrowser {
|
|||
args.putIfAbsent('windowId', () => windowId);
|
||||
args.putIfAbsent('initialUserScripts',
|
||||
() => initialUserScripts?.map((e) => e.toMap()).toList() ?? []);
|
||||
args.putIfAbsent('pullToRefreshOptions', () => pullToRefreshController?.options.toMap() ?? PullToRefreshOptions(enabled: false).toMap());
|
||||
args.putIfAbsent(
|
||||
'pullToRefreshOptions',
|
||||
() =>
|
||||
pullToRefreshController?.options.toMap() ??
|
||||
PullToRefreshOptions(enabled: false).toMap());
|
||||
await _sharedChannel.invokeMethod('open', args);
|
||||
}
|
||||
|
||||
|
@ -165,7 +169,11 @@ class InAppBrowser {
|
|||
args.putIfAbsent('windowId', () => windowId);
|
||||
args.putIfAbsent('initialUserScripts',
|
||||
() => initialUserScripts?.map((e) => e.toMap()).toList() ?? []);
|
||||
args.putIfAbsent('pullToRefreshOptions', () => pullToRefreshController?.options.toMap() ?? PullToRefreshOptions(enabled: false).toMap());
|
||||
args.putIfAbsent(
|
||||
'pullToRefreshOptions',
|
||||
() =>
|
||||
pullToRefreshController?.options.toMap() ??
|
||||
PullToRefreshOptions(enabled: false).toMap());
|
||||
await _sharedChannel.invokeMethod('open', args);
|
||||
}
|
||||
|
||||
|
@ -201,7 +209,11 @@ class InAppBrowser {
|
|||
args.putIfAbsent('windowId', () => windowId);
|
||||
args.putIfAbsent('initialUserScripts',
|
||||
() => initialUserScripts?.map((e) => e.toMap()).toList() ?? []);
|
||||
args.putIfAbsent('pullToRefreshOptions', () => pullToRefreshController?.options.toMap() ?? PullToRefreshOptions(enabled: false).toMap());
|
||||
args.putIfAbsent(
|
||||
'pullToRefreshOptions',
|
||||
() =>
|
||||
pullToRefreshController?.options.toMap() ??
|
||||
PullToRefreshOptions(enabled: false).toMap());
|
||||
await _sharedChannel.invokeMethod('open', args);
|
||||
}
|
||||
|
||||
|
|
|
@ -129,7 +129,9 @@ class HeadlessInAppWebView implements WebView {
|
|||
'windowId': this.windowId,
|
||||
'initialUserScripts':
|
||||
this.initialUserScripts?.map((e) => e.toMap()).toList() ?? [],
|
||||
'pullToRefreshOptions': this.pullToRefreshController?.options.toMap() ?? PullToRefreshOptions(enabled: false).toMap()
|
||||
'pullToRefreshOptions':
|
||||
this.pullToRefreshController?.options.toMap() ??
|
||||
PullToRefreshOptions(enabled: false).toMap()
|
||||
});
|
||||
await _sharedChannel.invokeMethod('createHeadlessWebView', args);
|
||||
}
|
||||
|
|
|
@ -385,7 +385,9 @@ class _InAppWebViewState extends State<InAppWebView> {
|
|||
'initialUserScripts':
|
||||
widget.initialUserScripts?.map((e) => e.toMap()).toList() ??
|
||||
[],
|
||||
'pullToRefreshOptions': widget.pullToRefreshController?.options.toMap() ?? PullToRefreshOptions(enabled: false).toMap()
|
||||
'pullToRefreshOptions':
|
||||
widget.pullToRefreshController?.options.toMap() ??
|
||||
PullToRefreshOptions(enabled: false).toMap()
|
||||
},
|
||||
creationParamsCodec: const StandardMessageCodec(),
|
||||
)
|
||||
|
@ -412,7 +414,9 @@ class _InAppWebViewState extends State<InAppWebView> {
|
|||
'windowId': widget.windowId,
|
||||
'initialUserScripts':
|
||||
widget.initialUserScripts?.map((e) => e.toMap()).toList() ?? [],
|
||||
'pullToRefreshOptions': widget.pullToRefreshController?.options.toMap() ?? PullToRefreshOptions(enabled: false).toMap()
|
||||
'pullToRefreshOptions':
|
||||
widget.pullToRefreshController?.options.toMap() ??
|
||||
PullToRefreshOptions(enabled: false).toMap()
|
||||
},
|
||||
creationParamsCodec: const StandardMessageCodec(),
|
||||
);
|
||||
|
@ -433,7 +437,9 @@ class _InAppWebViewState extends State<InAppWebView> {
|
|||
'windowId': widget.windowId,
|
||||
'initialUserScripts':
|
||||
widget.initialUserScripts?.map((e) => e.toMap()).toList() ?? [],
|
||||
'pullToRefreshOptions': widget.pullToRefreshController?.options.toMap() ?? PullToRefreshOptions(enabled: false).toMap()
|
||||
'pullToRefreshOptions':
|
||||
widget.pullToRefreshController?.options.toMap() ??
|
||||
PullToRefreshOptions(enabled: false).toMap()
|
||||
},
|
||||
creationParamsCodec: const StandardMessageCodec(),
|
||||
);
|
||||
|
|
|
@ -14,4 +14,4 @@ export 'in_app_localhost_server.dart';
|
|||
export 'content_blocker.dart';
|
||||
export 'http_auth_credentials_database.dart';
|
||||
export 'context_menu.dart';
|
||||
export 'pull_to_refresh/main.dart';
|
||||
export 'pull_to_refresh/main.dart';
|
||||
|
|
|
@ -26,8 +26,7 @@ class PullToRefreshController {
|
|||
Future<dynamic> handleMethod(MethodCall call) async {
|
||||
switch (call.method) {
|
||||
case "onRefresh":
|
||||
if (onRefresh != null)
|
||||
onRefresh!();
|
||||
if (onRefresh != null) onRefresh!();
|
||||
break;
|
||||
default:
|
||||
throw UnimplementedError("Unimplemented ${call.method} method");
|
||||
|
@ -123,8 +122,8 @@ class PullToRefreshController {
|
|||
}
|
||||
|
||||
void initMethodChannel(dynamic id) {
|
||||
this._channel =
|
||||
MethodChannel('com.pichillilorenzo/flutter_inappwebview_pull_to_refresh_$id');
|
||||
this._channel = MethodChannel(
|
||||
'com.pichillilorenzo/flutter_inappwebview_pull_to_refresh_$id');
|
||||
this._channel?.setMethodCallHandler(handleMethod);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,14 +27,13 @@ class PullToRefreshOptions {
|
|||
///**NOTE**: Available only on iOS.
|
||||
IOSNSAttributedString? attributedTitle;
|
||||
|
||||
PullToRefreshOptions({
|
||||
this.enabled = true,
|
||||
this.color,
|
||||
this.backgroundColor,
|
||||
this.distanceToTriggerSync,
|
||||
this.slingshotDistance,
|
||||
this.attributedTitle
|
||||
});
|
||||
PullToRefreshOptions(
|
||||
{this.enabled = true,
|
||||
this.color,
|
||||
this.backgroundColor,
|
||||
this.distanceToTriggerSync,
|
||||
this.slingshotDistance,
|
||||
this.attributedTitle});
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
|
@ -55,4 +54,4 @@ class PullToRefreshOptions {
|
|||
String toString() {
|
||||
return toMap().toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6707,40 +6707,31 @@ class IOSNSUnderlineStyle {
|
|||
}
|
||||
|
||||
///Do not draw a line.
|
||||
static const STYLE_NONE =
|
||||
const IOSNSUnderlineStyle._internal(0);
|
||||
static const STYLE_NONE = const IOSNSUnderlineStyle._internal(0);
|
||||
|
||||
///Draw a single line.
|
||||
static const SINGLE =
|
||||
const IOSNSUnderlineStyle._internal(1);
|
||||
static const SINGLE = const IOSNSUnderlineStyle._internal(1);
|
||||
|
||||
///Draw a thick line.
|
||||
static const THICK =
|
||||
const IOSNSUnderlineStyle._internal(2);
|
||||
static const THICK = const IOSNSUnderlineStyle._internal(2);
|
||||
|
||||
///Draw a double line.
|
||||
static const DOUBLE =
|
||||
const IOSNSUnderlineStyle._internal(9);
|
||||
static const DOUBLE = const IOSNSUnderlineStyle._internal(9);
|
||||
|
||||
///Draw a line of dots.
|
||||
static const PATTERN_DOT =
|
||||
const IOSNSUnderlineStyle._internal(256);
|
||||
static const PATTERN_DOT = const IOSNSUnderlineStyle._internal(256);
|
||||
|
||||
///Draw a line of dashes.
|
||||
static const PATTERN_DASH =
|
||||
const IOSNSUnderlineStyle._internal(512);
|
||||
static const PATTERN_DASH = const IOSNSUnderlineStyle._internal(512);
|
||||
|
||||
///Draw a line of alternating dashes and dots.
|
||||
static const PATTERN_DASH_DOT =
|
||||
const IOSNSUnderlineStyle._internal(768);
|
||||
static const PATTERN_DASH_DOT = const IOSNSUnderlineStyle._internal(768);
|
||||
|
||||
///Draw a line of alternating dashes and two dots.
|
||||
static const PATTERN_DASH_DOT_DOT =
|
||||
const IOSNSUnderlineStyle._internal(1024);
|
||||
static const PATTERN_DASH_DOT_DOT = const IOSNSUnderlineStyle._internal(1024);
|
||||
|
||||
///Draw the line only beneath or through words, not whitespace.
|
||||
static const BY_WORD =
|
||||
const IOSNSUnderlineStyle._internal(32768);
|
||||
static const BY_WORD = const IOSNSUnderlineStyle._internal(32768);
|
||||
|
||||
bool operator ==(value) => value == _value;
|
||||
|
||||
|
@ -6777,11 +6768,10 @@ class IOSNSAttributedStringTextEffectStyle {
|
|||
|
||||
///A graphical text effect that gives glyphs the appearance of letterpress printing, which involves pressing the type into the paper.
|
||||
static const LETTERPRESS_STYLE =
|
||||
const IOSNSAttributedStringTextEffectStyle._internal(
|
||||
"letterpressStyle");
|
||||
const IOSNSAttributedStringTextEffectStyle._internal("letterpressStyle");
|
||||
|
||||
bool operator ==(value) => value == _value;
|
||||
|
||||
@override
|
||||
int get hashCode => _value.hashCode;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue