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
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.
- snowplow_tracker
Flutter package for sending Snowplow analytics events on Android, iOS, and Web.
78Compare - wasm_interop
Dart wrapper for the WebAssembly JavaScript API.
41Compare
Works with
Packages commonly used together with dom_tools: ones it builds on, ones built on it, and its own family.
- webdom_tools depends on itLightweight bindings for browser APIs via JS interop
- intldom_tools depends on itA Dart library for internationalization and localization, providing message translation, plural/gender handling, and date/number formatting.
- markdowndom_tools depends on itA portable Markdown library written in Dart that can parse Markdown into HTML.
- async_extensiondom_tools depends on itDart async extensions for Future, FutureOr, and performance improvements.
- swiss_knifedom_tools depends on itCollection of Dart utility tools for collections, math, date, URI, JSON, events, and resources.
- web_utilsdom_tools depends on itDart extensions for web development, improving JavaScript interop and the web package.
- bones_uiBuilt on dom_toolsAn intuitive and user-friendly Web User Interface framework for Dart.
- bones_ui_bootstrapBuilt on dom_toolsAdds Bootstrap 5 components and CSS integration to the Bones_UI Dart package.