narimetisaigopi

myweb_view.dart

Nov 27th, 2020
626
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import 'package:flutter/material.dart';
  2. import 'package:webview_flutter/webview_flutter.dart';
  3.  
  4. class MyWebView extends StatefulWidget {
  5.   String url;
  6.   MyWebView(this.url);
  7.  
  8.   @override
  9.   _MyWebViewState createState() => _MyWebViewState();
  10. }
  11.  
  12. class _MyWebViewState extends State<MyWebView> {
  13.   bool isLoading = true;
  14.  
  15.   @override
  16.   Widget build(BuildContext context) {
  17.     return Scaffold(
  18.       appBar: AppBar(),
  19.       body: WebView(
  20.         initialUrl: widget.url,
  21.       ),
  22.     );
  23.   }
  24. }
  25.  
RAW Paste Data