open method
Implementation
Future<bool?> open({
required String url,
bool javascriptEnabled = true,
PresentationStyle presentationStyle = PresentationStyle.sheet,
Size? size,
// Offset origin,
String? userAgent,
String modalTitle = '',
String sheetCloseButtonTitle = 'Close',
}) async {
assert(url.trim().isNotEmpty);
_channel.setMethodCallHandler(_onMethodCall);
return await _channel.invokeMethod<bool?>('openWebView', {
'url': url,
'javascriptEnabled': javascriptEnabled,
'presentationStyle': presentationStyle.index,
'customSize': size != null,
'width': size?.width,
'height': size?.height,
'userAgent': userAgent,
'modalTitle': modalTitle,
'sheetCloseButtonTitle': sheetCloseButtonTitle,
// 'customOrigin': origin != null,
// 'x': origin?.dx,
// 'y': origin?.dy,
});
}