Flutter : News App Workshop #part6 show html data on WebView plugin

https://pub.dev/packages/webview_flutter

dependencies:
  webview_flutter: ^2.0.9
Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

WebViewPage.dart

import 'package:webview_flutter/webview_flutter.dart';
import 'dart:io';
@override
  void initState() {
    // TODO: implement initState
    super.initState();
    if (Platform.isAndroid) WebView.platform = SurfaceAndroidWebView();
  }
 WebView(
          initialUrl: '${news['url']}',
          javascriptMode: JavascriptMode.unrestricted,
      ),
(Visited 41 times, 1 visits today)
Spread the love
Published
Categorized as Flutter