dom 0.2.0

  • Installing
  • Versions
  • 38


A virtual DOM library for Dart.

Yet another library?

The goal of package:dom is to be absolutely framework or implementation agnostic and instead provide a rich but simple set of classes to represent a virtual DOM tree and utilities for working with them.

By default, nodes are:

  • Deeply immutable (equality and hash-able)
  • Serializable (with a proof-of-concept JSON codec)
  • Have nothing specific to any rendering implementation

This should be enough to build on or extend for most implementations.


  • Remove Attribute and add a Map of attributes for Element

Use this package as a library

1. Depend on it

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

  dom: "^0.2.0"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:

      import 'package:dom/dom.dart';
Version Uploaded Documentation Archive
0.2.0 Jan 29, 2017 Go to the documentation of dom 0.2.0 Download dom 0.2.0 archive
0.1.0 Jan 27, 2017 Go to the documentation of dom 0.1.0 Download dom 0.1.0 archive
0.0.0-dev-1 Mar 10, 2015 Go to the documentation of dom 0.0.0-dev-1 Download dom 0.0.0-dev-1 archive
0.0.0-dev+1 Mar 11, 2015 Go to the documentation of dom 0.0.0-dev+1 Download dom 0.0.0-dev+1 archive


We analyzed this package on Jun 19, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3


Describes how popular the package is relative to other packages. [more]
0 / 100
Code health derived from static analysis. [more]
87 / 100
Reflects how tidy and up-to-date the package is. [more]
60 / 100
Overall score:
Weighted score of the above. [more]
Learn more about scoring.


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:dom/dom.dart.


  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 2 errors 3 hints.

    Strong-mode analysis of lib/src/codecs/json.dart failed with the following error:

    line: 103 col: 11
    The argument type 'List' can't be assigned to the parameter type 'Iterable<Node>'.

    Run dartfmt to format lib/src/utils.dart.

  • Package is getting outdated.

    The package was released 72 weeks ago.

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use dom.dart.

  • Use analysis_options.yaml.

    Rename old .analysis_options file to analysis_options.yaml.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.0 <2.0.0
collection ^1.0.0 1.14.10
meta ^1.0.0 1.1.5
quiver ^0.24.0 0.24.0 0.29.0+1
Transitive dependencies
matcher 0.12.3
path 1.6.1
stack_trace 1.9.2
Dev dependencies
test ^0.12.18+1