Posted By

markt22 on 07/17/18


Tagged

flutter dart


Versions (?)

Flutter: Launch Webview


 / Published in: JavaScript
 

Uses the webiew plugin to create a webview and add it to the current Navigator stack.

  1. import 'package:flutter_webview_plugin/flutter_webview_plugin.dart';
  2.  
  3. void launchWebView(String title, String url) {
  4. Navigator.of(context).push(
  5. MaterialPageRoute(
  6. builder: (context) {
  7. return new WebviewScaffold(
  8. url: url,
  9. appBar: new AppBar(
  10. title: new Text(title)
  11. ));
  12. }));
  13. }

Report this snippet  

You need to login to post a comment.