native_webview 0.9.0 copy "native_webview: ^0.9.0" to clipboard
native_webview: ^0.9.0 copied to clipboard

outdated

A Flutter plugin that provides a WebView widget on Android and iOS.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_driver/driver_extension.dart';
import 'package:native_webview_example/screens/initial_data_screen.dart';
import 'package:native_webview_example/screens/initial_data_with_base_url_screen.dart';
import 'package:native_webview_example/screens/initial_url_screen.dart';
import 'package:native_webview_example/screens/on_js_prompt_screen.dart';
import 'package:native_webview_example/screens/open_dropdown_screen.dart';
import 'package:native_webview_example/screens/target_blank_screen.dart';

void main() {
  // Enable integration testing with the Flutter Driver extension.
  // See https://flutter.dev/testing/ for more info.
  enableFlutterDriverExtension();
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  final items = [
    InitialUrlScreen(),
    InitialDataScreen(),
    InitialDataWithBaseUrlScreen(),
    OnJsPromptScreen(),
    OpenDropdownScreen(),
    TargetBlankScreen(),
  ];

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('native_webview example app'),
        ),
        body: ListView.builder(
          itemBuilder: (context, index) {
            final item = items[index];
            return ListTile(
              title: Text(item.toString()),
              onTap: () {
                Navigator.of(context).push(
                  MaterialPageRoute(
                    builder: (context) => item,
                  ),
                );
              },
            );
          },
          itemCount: items.length,
        ),
      ),
    );
  }
}
28
likes
0
pub points
72%
popularity

Publisher

unverified uploader

A Flutter plugin that provides a WebView widget on Android and iOS.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on native_webview