updated in_app_browser_example.screen.dart example
This commit is contained in:
parent
62431838d9
commit
7d49baa8e0
|
@ -108,24 +108,13 @@ class _InAppBrowserExampleScreenState extends State<InAppBrowserExampleScreen> {
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
onPressed: () async {
|
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(
|
await widget.browser.openUrlRequest(
|
||||||
urlRequest:
|
urlRequest:
|
||||||
URLRequest(url: WebUri("https://flutter.dev")),
|
URLRequest(url: WebUri("https://flutter.dev")),
|
||||||
settings: InAppBrowserClassSettings(
|
settings: InAppBrowserClassSettings(
|
||||||
browserSettings: InAppBrowserSettings(
|
browserSettings: InAppBrowserSettings(
|
||||||
toolbarTopBackgroundColor: Colors.blue,
|
toolbarTopBackgroundColor: Colors.blue,
|
||||||
presentationStyle: ModalPresentationStyle.POPOVER,
|
presentationStyle: ModalPresentationStyle.POPOVER),
|
||||||
hideCloseButton: true,
|
|
||||||
hideDefaultMenuItems: true),
|
|
||||||
webViewSettings: InAppWebViewSettings(
|
webViewSettings: InAppWebViewSettings(
|
||||||
isInspectable: kDebugMode,
|
isInspectable: kDebugMode,
|
||||||
useShouldOverrideUrlLoading: true,
|
useShouldOverrideUrlLoading: true,
|
||||||
|
|
Loading…
Reference in New Issue