How to add a Webview in Flutter?
![Multi tool use Multi tool use](http://sgv.ssvwv.com/sg/ssvwvcomimagb.png)
Multi tool use
I know its possible to add a WebView as a full page but couldn't find any sample code to do it. I assume you could use a PageView as it's base but not sure how to call the native android WebView and add it to the PageView.
Can anyone point me in the right direction?
![](http://i.stack.imgur.com/bk9VA.png)
![](http://i.stack.imgur.com/EQnZM.png)
add a comment |
I know its possible to add a WebView as a full page but couldn't find any sample code to do it. I assume you could use a PageView as it's base but not sure how to call the native android WebView and add it to the PageView.
Can anyone point me in the right direction?
![](http://i.stack.imgur.com/bk9VA.png)
![](http://i.stack.imgur.com/EQnZM.png)
add a comment |
I know its possible to add a WebView as a full page but couldn't find any sample code to do it. I assume you could use a PageView as it's base but not sure how to call the native android WebView and add it to the PageView.
Can anyone point me in the right direction?
![](http://i.stack.imgur.com/bk9VA.png)
![](http://i.stack.imgur.com/EQnZM.png)
I know its possible to add a WebView as a full page but couldn't find any sample code to do it. I assume you could use a PageView as it's base but not sure how to call the native android WebView and add it to the PageView.
Can anyone point me in the right direction?
![](http://i.stack.imgur.com/bk9VA.png)
![](http://i.stack.imgur.com/EQnZM.png)
![](http://i.stack.imgur.com/bk9VA.png)
![](http://i.stack.imgur.com/EQnZM.png)
asked Apr 27 '17 at 13:11
Donny V.Donny V.
9,67295269
9,67295269
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
Flutter doesn't have built-in support for embedded WebViews. Follow issue 730 for updates.
You can still show web content in your app, but you'll have to leave Flutter-land using the plugin system.
If you just want to open a browser, you can use the url_launcher Flutter plugin.
If you want to do something fancier (perhaps you don't want a visible address bar), you could implement a custom UIViewController (iOS example) and Activity (Android example) and use the plugin API to launch into these.
1
Haven't used this, but it might be doing just that: pub.dartlang.org/packages/flutter_webview_plugin
– Randal Schwartz
Jun 22 '17 at 15:10
Yes, that's a good option.
– Collin Jackson
Jun 22 '17 at 15:11
add a comment |
You can use https://pub.dartlang.org/packages/webview_flutter
example
import 'package:webview_flutter/webview_flutter.dart';
return Scaffold(
appBar: AppBar(
title: const Text('Flutter WebView example'),
),
body: const WebView(
initialUrl: 'https://flutter.io',
javascriptMode: JavascriptMode.unrestricted,
),
);
This is probably the one to go for, sadly it´s still in developer preview.
– 最白目
Dec 12 '18 at 19:58
Important: The keyboard will not display on Android (see issue #19718). This is a showstopper if you're trying to use this for OAuth. If you need this functionality, please vote on the issue and perhaps it will be re-prioritized to be fixed sooner than its current milestone of October 2019.
– Matt
Mar 17 at 7:56
add a comment |
webview plugin
works well, however it will be created over the top of every single bit of your app so you will have to add additional logic to show and hide the plugin. You can show it full screen or as a sized rectangle.
https://pub.dartlang.org/packages/flutter_webview_plugin
add a comment |
You can use the below dart plugin to display the Webview.Also, you can find dart plugin from this url: https://pub.dartlang.org/packages/flutter_webview_plugin
new MaterialApp(
routes: {
"/": (_) => new WebviewScaffold(
url: "https://www.google.com",
appBar: new AppBar(
title: new Text("Widget webview"),
),
),
},
);
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f43658910%2fhow-to-add-a-webview-in-flutter%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
Flutter doesn't have built-in support for embedded WebViews. Follow issue 730 for updates.
You can still show web content in your app, but you'll have to leave Flutter-land using the plugin system.
If you just want to open a browser, you can use the url_launcher Flutter plugin.
If you want to do something fancier (perhaps you don't want a visible address bar), you could implement a custom UIViewController (iOS example) and Activity (Android example) and use the plugin API to launch into these.
1
Haven't used this, but it might be doing just that: pub.dartlang.org/packages/flutter_webview_plugin
– Randal Schwartz
Jun 22 '17 at 15:10
Yes, that's a good option.
– Collin Jackson
Jun 22 '17 at 15:11
add a comment |
Flutter doesn't have built-in support for embedded WebViews. Follow issue 730 for updates.
You can still show web content in your app, but you'll have to leave Flutter-land using the plugin system.
If you just want to open a browser, you can use the url_launcher Flutter plugin.
If you want to do something fancier (perhaps you don't want a visible address bar), you could implement a custom UIViewController (iOS example) and Activity (Android example) and use the plugin API to launch into these.
1
Haven't used this, but it might be doing just that: pub.dartlang.org/packages/flutter_webview_plugin
– Randal Schwartz
Jun 22 '17 at 15:10
Yes, that's a good option.
– Collin Jackson
Jun 22 '17 at 15:11
add a comment |
Flutter doesn't have built-in support for embedded WebViews. Follow issue 730 for updates.
You can still show web content in your app, but you'll have to leave Flutter-land using the plugin system.
If you just want to open a browser, you can use the url_launcher Flutter plugin.
If you want to do something fancier (perhaps you don't want a visible address bar), you could implement a custom UIViewController (iOS example) and Activity (Android example) and use the plugin API to launch into these.
Flutter doesn't have built-in support for embedded WebViews. Follow issue 730 for updates.
You can still show web content in your app, but you'll have to leave Flutter-land using the plugin system.
If you just want to open a browser, you can use the url_launcher Flutter plugin.
If you want to do something fancier (perhaps you don't want a visible address bar), you could implement a custom UIViewController (iOS example) and Activity (Android example) and use the plugin API to launch into these.
edited Jul 29 '18 at 13:31
![](https://i.stack.imgur.com/ZVWXt.jpg?s=32&g=1)
![](https://i.stack.imgur.com/ZVWXt.jpg?s=32&g=1)
Duncan Jones
45.2k16116174
45.2k16116174
answered Apr 27 '17 at 22:28
![](https://i.stack.imgur.com/TYQU8.jpg?s=32&g=1)
![](https://i.stack.imgur.com/TYQU8.jpg?s=32&g=1)
Collin JacksonCollin Jackson
27.2k48996
27.2k48996
1
Haven't used this, but it might be doing just that: pub.dartlang.org/packages/flutter_webview_plugin
– Randal Schwartz
Jun 22 '17 at 15:10
Yes, that's a good option.
– Collin Jackson
Jun 22 '17 at 15:11
add a comment |
1
Haven't used this, but it might be doing just that: pub.dartlang.org/packages/flutter_webview_plugin
– Randal Schwartz
Jun 22 '17 at 15:10
Yes, that's a good option.
– Collin Jackson
Jun 22 '17 at 15:11
1
1
Haven't used this, but it might be doing just that: pub.dartlang.org/packages/flutter_webview_plugin
– Randal Schwartz
Jun 22 '17 at 15:10
Haven't used this, but it might be doing just that: pub.dartlang.org/packages/flutter_webview_plugin
– Randal Schwartz
Jun 22 '17 at 15:10
Yes, that's a good option.
– Collin Jackson
Jun 22 '17 at 15:11
Yes, that's a good option.
– Collin Jackson
Jun 22 '17 at 15:11
add a comment |
You can use https://pub.dartlang.org/packages/webview_flutter
example
import 'package:webview_flutter/webview_flutter.dart';
return Scaffold(
appBar: AppBar(
title: const Text('Flutter WebView example'),
),
body: const WebView(
initialUrl: 'https://flutter.io',
javascriptMode: JavascriptMode.unrestricted,
),
);
This is probably the one to go for, sadly it´s still in developer preview.
– 最白目
Dec 12 '18 at 19:58
Important: The keyboard will not display on Android (see issue #19718). This is a showstopper if you're trying to use this for OAuth. If you need this functionality, please vote on the issue and perhaps it will be re-prioritized to be fixed sooner than its current milestone of October 2019.
– Matt
Mar 17 at 7:56
add a comment |
You can use https://pub.dartlang.org/packages/webview_flutter
example
import 'package:webview_flutter/webview_flutter.dart';
return Scaffold(
appBar: AppBar(
title: const Text('Flutter WebView example'),
),
body: const WebView(
initialUrl: 'https://flutter.io',
javascriptMode: JavascriptMode.unrestricted,
),
);
This is probably the one to go for, sadly it´s still in developer preview.
– 最白目
Dec 12 '18 at 19:58
Important: The keyboard will not display on Android (see issue #19718). This is a showstopper if you're trying to use this for OAuth. If you need this functionality, please vote on the issue and perhaps it will be re-prioritized to be fixed sooner than its current milestone of October 2019.
– Matt
Mar 17 at 7:56
add a comment |
You can use https://pub.dartlang.org/packages/webview_flutter
example
import 'package:webview_flutter/webview_flutter.dart';
return Scaffold(
appBar: AppBar(
title: const Text('Flutter WebView example'),
),
body: const WebView(
initialUrl: 'https://flutter.io',
javascriptMode: JavascriptMode.unrestricted,
),
);
You can use https://pub.dartlang.org/packages/webview_flutter
example
import 'package:webview_flutter/webview_flutter.dart';
return Scaffold(
appBar: AppBar(
title: const Text('Flutter WebView example'),
),
body: const WebView(
initialUrl: 'https://flutter.io',
javascriptMode: JavascriptMode.unrestricted,
),
);
edited Jan 31 at 4:26
Nicodemuz
1,38711424
1,38711424
answered Dec 5 '18 at 7:38
Shyju MadathilShyju Madathil
1,3201120
1,3201120
This is probably the one to go for, sadly it´s still in developer preview.
– 最白目
Dec 12 '18 at 19:58
Important: The keyboard will not display on Android (see issue #19718). This is a showstopper if you're trying to use this for OAuth. If you need this functionality, please vote on the issue and perhaps it will be re-prioritized to be fixed sooner than its current milestone of October 2019.
– Matt
Mar 17 at 7:56
add a comment |
This is probably the one to go for, sadly it´s still in developer preview.
– 最白目
Dec 12 '18 at 19:58
Important: The keyboard will not display on Android (see issue #19718). This is a showstopper if you're trying to use this for OAuth. If you need this functionality, please vote on the issue and perhaps it will be re-prioritized to be fixed sooner than its current milestone of October 2019.
– Matt
Mar 17 at 7:56
This is probably the one to go for, sadly it´s still in developer preview.
– 最白目
Dec 12 '18 at 19:58
This is probably the one to go for, sadly it´s still in developer preview.
– 最白目
Dec 12 '18 at 19:58
Important: The keyboard will not display on Android (see issue #19718). This is a showstopper if you're trying to use this for OAuth. If you need this functionality, please vote on the issue and perhaps it will be re-prioritized to be fixed sooner than its current milestone of October 2019.
– Matt
Mar 17 at 7:56
Important: The keyboard will not display on Android (see issue #19718). This is a showstopper if you're trying to use this for OAuth. If you need this functionality, please vote on the issue and perhaps it will be re-prioritized to be fixed sooner than its current milestone of October 2019.
– Matt
Mar 17 at 7:56
add a comment |
webview plugin
works well, however it will be created over the top of every single bit of your app so you will have to add additional logic to show and hide the plugin. You can show it full screen or as a sized rectangle.
https://pub.dartlang.org/packages/flutter_webview_plugin
add a comment |
webview plugin
works well, however it will be created over the top of every single bit of your app so you will have to add additional logic to show and hide the plugin. You can show it full screen or as a sized rectangle.
https://pub.dartlang.org/packages/flutter_webview_plugin
add a comment |
webview plugin
works well, however it will be created over the top of every single bit of your app so you will have to add additional logic to show and hide the plugin. You can show it full screen or as a sized rectangle.
https://pub.dartlang.org/packages/flutter_webview_plugin
webview plugin
works well, however it will be created over the top of every single bit of your app so you will have to add additional logic to show and hide the plugin. You can show it full screen or as a sized rectangle.
https://pub.dartlang.org/packages/flutter_webview_plugin
edited Aug 28 '18 at 12:58
answered May 24 '18 at 18:38
![](https://i.stack.imgur.com/M7vPd.jpg?s=32&g=1)
![](https://i.stack.imgur.com/M7vPd.jpg?s=32&g=1)
orangesherbertorangesherbert
3,79932853
3,79932853
add a comment |
add a comment |
You can use the below dart plugin to display the Webview.Also, you can find dart plugin from this url: https://pub.dartlang.org/packages/flutter_webview_plugin
new MaterialApp(
routes: {
"/": (_) => new WebviewScaffold(
url: "https://www.google.com",
appBar: new AppBar(
title: new Text("Widget webview"),
),
),
},
);
add a comment |
You can use the below dart plugin to display the Webview.Also, you can find dart plugin from this url: https://pub.dartlang.org/packages/flutter_webview_plugin
new MaterialApp(
routes: {
"/": (_) => new WebviewScaffold(
url: "https://www.google.com",
appBar: new AppBar(
title: new Text("Widget webview"),
),
),
},
);
add a comment |
You can use the below dart plugin to display the Webview.Also, you can find dart plugin from this url: https://pub.dartlang.org/packages/flutter_webview_plugin
new MaterialApp(
routes: {
"/": (_) => new WebviewScaffold(
url: "https://www.google.com",
appBar: new AppBar(
title: new Text("Widget webview"),
),
),
},
);
You can use the below dart plugin to display the Webview.Also, you can find dart plugin from this url: https://pub.dartlang.org/packages/flutter_webview_plugin
new MaterialApp(
routes: {
"/": (_) => new WebviewScaffold(
url: "https://www.google.com",
appBar: new AppBar(
title: new Text("Widget webview"),
),
),
},
);
answered Jan 3 at 4:36
![](https://i.stack.imgur.com/SiOgv.jpg?s=32&g=1)
![](https://i.stack.imgur.com/SiOgv.jpg?s=32&g=1)
GoogleGoogle
1,2851639
1,2851639
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f43658910%2fhow-to-add-a-webview-in-flutter%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
R0jHki vz374xg2SmtKWI8M3MhSsdOtZvr,R dvxpuq,IAmWoKgcZglmDhTYPt7n U,d f