dom 0.2.0

  • Installing
  • Versions
  • 49


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

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 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


This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Feb 3, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1


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


Detected platforms: Flutter, web, other

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


  • 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.5
meta ^1.0.0 1.1.2
quiver ^0.24.0 0.24.0 0.28.0
Transitive dependencies
matcher 0.12.1+4
path 1.5.1
stack_trace 1.9.1
Dev dependencies
test ^0.12.18+1