Search packages, repositories and app categories

Package detailsv1.4.0

native_webview

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

AndroidiOS
30-day downloads
89
Likes
29
Pub points
130

Install package

flutter pub add native_webview

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A Flutter plugin that enables embedding web content within mobile apps on Android and iOS using a native WebView. It provides a straightforward widget interface for displaying web pages, supporting basic navigation, JavaScript interaction, and URL loading. Designed for developers who need to integrate web-based content directly into their Flutter applications without relying on third-party solutions. The plugin leverages platform-specific WebView implementations for optimal performance and compatibility.

Use cases

  • Embedding web content in mobile apps
  • Displaying dynamic web pages
  • Integrating web-based forms or dashboards
  • Creating hybrid app components
  • Loading external websites within the app

Key features

  • Native WebView integration on Android and iOS
  • Simple widget API for web content display
  • Supports JavaScript execution and communication
  • Handles URL loading and navigation
  • Platform-optimized rendering and performance

Suitable for

  • Developers building hybrid apps
  • Apps requiring embedded web content
  • Projects with web-based UI components
  • Teams needing lightweight WebView solution
  • Mobile apps with external web integrations

Considerations

  • Limited to Android and iOS platforms
  • No support for web or desktop
  • Requires proper handling of web security and permissions
  • May need additional configuration for advanced features like cookies or authentication
  • Depends on native WebView implementation stability

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

native_webview Pub Version

A Flutter plugin that allows you to add an inline WebView.

Motivation

There is already a useful library for working with WebViews in Flutter.

These libraries come with trade-offs such as simple implementation but lack features, or very advanced features and complex implementation.

native_webview is designed to provide users with a standard set of WebView features provided by iOS and Android while keeping the implementation simple.

Requirements

  • Dart: >=2.10.0 <3.0.0
  • Flutter: >=1.22.0 <2.0.0
  • Android: minSdkVersion 24, AndroidX, Kotlin, Chrome version >= 74.0.3729.185
  • iOS: iOS version >= 11.0, Xcode version >= 11, Swift

Getting Started

Usage
class InitialUrlScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Initial URL"),
      ),
      body: WebView(
        initialUrl: "https://flutter.dev",
      ),
    );
  }
}

If you want to see other examples, see example or see DartDoc.

Known issues

Run tests

  • There are tests in `example/integration_test/tests
  • You will need to launch the iOS simulator or Android emulator
make test

Categories

Source repository

Projects using this package

No data available yet.