flutter_webview_plugin_android_v2 1.0.0 copy "flutter_webview_plugin_android_v2: ^1.0.0" to clipboard
flutter_webview_plugin_android_v2: ^1.0.0 copied to clipboard

A Flutter plugin that allows you to use native webview in your app.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_webview_plugin/flutter_webview_plugin_android_v2.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  final _flutterWebviewPlugin = FlutterWebviewPlugin();

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter WebView Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      routes: {
        '/': (_) => FutureBuilder<void>(
            future: _flutterWebviewPlugin.hide(),
            builder: (context, snapshot) {
              if (snapshot.connectionState == ConnectionState.done) {
                WidgetsBinding.instance.addPostFrameCallback((_) {
                  _flutterWebviewPlugin.show();
                });
              }
              return WebviewScaffold(
                url: 'https://www.google.com',
                appBar: AppBar(
                  title: const Text('Plugin Example App'),
                ),
                withZoom: true,
                withLocalStorage: true,
                hidden: true,
                initialChild: Container(
                  color: Colors.lightBlueAccent,
                  child: const Center(
                    child: CircularProgressIndicator(color: Colors.white),
                  ),
                ),
              );
            }),
      },
    );
  }
}
1
likes
135
pub points
0%
popularity

Publisher

verified publishermoodytech.co.za

A Flutter plugin that allows you to use native webview in your app.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on flutter_webview_plugin_android_v2