Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: html_shim: ^0.0.2
2. Install it
You can install packages from the command line:
$ pub get
$ flutter pub get
Alternatively, your editor might support
pub get or
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:html_shim/html.dart'; import 'package:html_shim/js.dart'; import 'package:html_shim/js_util.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Feb 10, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.7.1
- pana: 0.13.5
lib/src/_html_io.dart. (-25 points)
lib/src/_html_io.dart reported 3640 hints, including:
line 14 col 8: Unused import: 'dart:convert'.
line 18 col 8: Unused import: '_svg_io.dart'.
line 21 col 8: Unused import: '_web_gl_io.dart'.
line 21 col 31: The library 'package:html_shim/src/_web_gl_io.dart' doesn't export a member with the shown name 'RenderingContext'.
line 21 col 49: The library 'package:html_shim/src/_web_gl_io.dart' doesn't export a member with the shown name 'RenderingContext2'.
lib/src/_html_common_io.dart. (-13.53 points)
lib/src/_html_common_io.dart reported 29 hints, including:
line 25 col 1: Prefer using /// for doc comments.
line 35 col 10: This function has a return type of 'DateTime', but doesn't end with a return statement.
line 45 col 60: Use
= to separate a named parameter from its default value.
line 52 col 7: The value of the local variable 'proto' isn't used.
line 59 col 8: This function has a return type of 'Future', but doesn't end with a return statement.
lib/src/_js_io.dart. (-12.22 points)
lib/src/_js_io.dart reported 26 hints, including:
line 5 col 1: Prefer using /// for doc comments.
line 86 col 31: The name HashMap is shown, but not used.
line 87 col 8: Unused import: 'dart:typed_data'.
line 92 col 1: Prefer using /// for doc comments.
line 107 col 3: Prefer using /// for doc comments.
lib/src/_svg_io.dart. (-0.50 points)
lib/src/_svg_io.dart reported 1 hint:
line 16 col 11: Unnecessary new keyword.
lib/src/_web_gl_io.dart. (-0.50 points)
lib/src/_web_gl_io.dart reported 1 hint:
line 21 col 11: Unnecessary new keyword.
Maintenance issues and suggestions
Provide a file named
README.md. (-30 points)
README.md file should inform others about your project, what it does, and how they can use it. See the example generated by
Provide a file named
CHANGELOG.md. (-20 points)
Changelog entries help developers follow the progress of your package. See the example generated by
Maintain an example. (-10 points)
Create a short demo in the
example/ directory to show how to use this package.
Common filename patterns include
html_shim.dart. Packages with multiple examples should provide
For more information see the pub package layout conventions.
Package is pre-v0.1 release. (-10 points)
While nothing is inherently wrong with versions of
0.0.*, it might mean that the author is still experimenting with the general direction of the API.
The description is too long. (-10 points)
Search engines display only the first part of the description. Try to keep the value of the
description field in your package's
pubspec.yaml file between 60 and 180 characters.
|Dart SDK||>=2.0.0 <3.0.0|