Skip to content
pubscout

dom_tools

3.1.1, released 2 weeks ago by an unverified publisher

DOM rich elements and tools for CSS, JavaScript, Element Tracking, DOM Manipulation, and Storage.

WASM-ready
$ flutter pub add dom_tools
Source repository

What it does

Provides rich DOM elements and utility tools for web applications using Dart. It handles CSS, JavaScript execution, element tracking (such as in-viewport detection), DOM manipulation, storage, and dialogs.

AI-written summary of version 3.1.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are building web applications in Dart and need tools for DOM manipulation and element tracking.
  • You want to manage CSS, JavaScript sources, and local storage programmatically on the web.

Skip it when

  • You are building native mobile or desktop apps using Flutter widgets instead of web DOM manipulation.

Strengths

  • Supports modern web package bindings replacing deprecated dart:html.
  • Provides helpful utilities like element viewport tracking and asynchronous asset loading.

Weaknesses

  • Restricted to Dart web development environments.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
9
import 'package:dom_tools/dom_tools_kit.dart';

void main() {
  var imgSrc = 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png';
  var tracker = TrackElementInViewport();
  var imageElement = ImageElement();
  tracker.track(imageElement, onEnterViewport: (elem) {
    imageElement.src = imgSrc;
  });
  document.body.children.add(imageElement);
}

Alternatives

Packages that do the same job and could replace dom_tools.

Works with

Packages commonly used together with dom_tools: ones it builds on, ones built on it, and its own family.