easy_web_view 1.2.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 92

Buy Me A Coffee Donate flutter_whatsnew

easy_web_view #

Easy Web Views in Flutter on Web and Mobile!

  • Supports HTML Content or a Single Element
  • Supports Markdown Source
  • Supports convert to Flutter widgets
  • Supports remote download of url
  • Markdown -> Html
  • Html -> Markdown
  • Supports change in url
  • Selectable Text
  • Supports multiple views on the same screen if you provide a unique key

Online Demo: https://rodydavis.github.io/easy_web_view

Getting Started #

Setup iOS Info.plist

<key>io.flutter.embedded_views_preview</key>
<true/>

For Loading a new url or changing width/height just call setState!

 EasyWebView(
  src: src,
  isHtml: false, // Use Html syntax
  isMarkdown: false, // Use markdown syntax
  convertToWidets: false, // Try to convert to flutter widgets
  // width: 100,
  // height: 100,
)

Screenshots #

1.2.0 #

  • Support for multiple WebViews on the same screen thanks to @MypaceEngine
  • To have multiple views you need to add a unique key

1.1.2 #

  • Adding RepaintBoundary

1.1.1 #

  • Adding Selectable Text

1.1.0 #

  • Adding Markdown Source
  • Adding Html Source
  • Adding Html Element Source
  • Updating Controller
  • Adding Remote Download
  • Adding Convert to Widgets

1.0.1 #

  • Added Allow Fullscreen on Web

1.0.0 #

  • Initial Plugin

example/lib/main.dart

import 'package:flutter/material.dart';

import 'ui/home/screen.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Easy Web View',
      theme: ThemeData.light(),
      home: HomeScreen(),
      debugShowCheckedModeBanner: false,
    );
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  easy_web_view: ^1.2.0

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:easy_web_view/easy_web_view.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
88
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
89
Overall:
Weighted score of the above. [more]
92
Learn more about scoring.

We analyzed this package on Apr 7, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8

Maintenance suggestions

The package description is too short. (-11 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
cupertino_icons ^0.1.2 0.1.3
flutter 0.0.0
flutter_markdown ^0.3.4 0.3.4
html2md ^0.5.1 0.5.1
http ^0.12.0+4 0.12.0+4
markdown ^2.1.3 2.1.3
url_launcher ^5.4.2 5.4.2
webview_flutter ^0.3.15+1 0.3.19+9
Transitive dependencies
args 1.6.0
async 2.4.1
charcode 1.1.3
collection 1.14.11 1.14.12
csslib 0.16.1
flutter_web_plugins 0.0.0
html 0.14.0+3
http_parser 3.1.4
meta 1.1.8
path 1.6.4
pedantic 1.9.0
plugin_platform_interface 1.0.2
sky_engine 0.0.99
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
url_launcher_macos 0.0.1+4
url_launcher_platform_interface 1.0.6
url_launcher_web 0.1.1+1
vector_math 2.0.8
Dev dependencies
flutter_test