The 'open' method requires an options dictionary

Otherwise, SwiftFlutterPlugin.swift throws an exception on line 285
when the InAppBrowser.openWithSystemBrowser(url) method is called:

  let options = (arguments["options"] as? [String: Any])!
This commit is contained in:
Matthew Lloyd 2019-04-27 00:04:32 -04:00
parent 11da457d51
commit 98316371d8
1 changed files with 1 additions and 0 deletions

View File

@ -294,6 +294,7 @@ class InAppBrowser {
args.putIfAbsent('isData', () => false); args.putIfAbsent('isData', () => false);
args.putIfAbsent('openWithSystemBrowser', () => true); args.putIfAbsent('openWithSystemBrowser', () => true);
args.putIfAbsent('useChromeSafariBrowser', () => false); args.putIfAbsent('useChromeSafariBrowser', () => false);
args.putIfAbsent('options', () => {});
return await _ChannelManager.channel.invokeMethod('open', args); return await _ChannelManager.channel.invokeMethod('open', args);
} }