dimanche 25 avril 2021

Why WebView loading not working in flutter?

I am new in flutter development. so i need to use webpage. and access google play store apps update link in my flutter apps. I want to go my play store apps page in flutter. I have used below source code like

import 'dart:io';

import 'package:webview_flutter/webview_flutter.dart';

class WebViewExample extends StatefulWidget {
  @override
  WebViewExampleState createState() => WebViewExampleState();
}

class WebViewExampleState extends State<WebViewExample> {
  @override
  void initState() {
    super.initState();
    // Enable hybrid composition.
    if (Platform.isAndroid) WebView.platform = SurfaceAndroidWebView();
  }

  @override
  Widget build(BuildContext context) {
    return WebView(
      initialUrl: 'https://play.google.com/store/apps/details?id=xx.xxx.xxxxxxx.xxxx',
    );
  }
}

what is problem in above code?




Aucun commentaire:

Enregistrer un commentaire