updated in_app_browser_example.screen.dart example

This commit is contained in:
Lorenzo Pichilli 2023-06-11 01:59:43 +02:00
parent 62431838d9
commit 7d49baa8e0
1 changed files with 1 additions and 12 deletions

View File

@ -108,24 +108,13 @@ class _InAppBrowserExampleScreenState extends State<InAppBrowserExampleScreen> {
children: <Widget>[
ElevatedButton(
onPressed: () async {
widget.browser.addMenuItem(InAppBrowserMenuItem(
id: 2,
title: "Test 2",
icon: AndroidResource(name: "ic_menu_edit", defType: "drawable", defPackage: "android"),
iconColor: Colors.red,
onClick: () {
widget.browser.webViewController?.reload();
},
));
await widget.browser.openUrlRequest(
urlRequest:
URLRequest(url: WebUri("https://flutter.dev")),
settings: InAppBrowserClassSettings(
browserSettings: InAppBrowserSettings(
toolbarTopBackgroundColor: Colors.blue,
presentationStyle: ModalPresentationStyle.POPOVER,
hideCloseButton: true,
hideDefaultMenuItems: true),
presentationStyle: ModalPresentationStyle.POPOVER),
webViewSettings: InAppWebViewSettings(
isInspectable: kDebugMode,
useShouldOverrideUrlLoading: true,