Skip to content
pubscout

web_utils

1.1.0, released 7 weeks ago by an unverified publisher

Dart extensions for web development, improving JavaScript interop and the web package.

WASM-ready
$ flutter pub add web_utils
Source repository

What it does

It provides a collection of useful Dart extensions that enhance web API types such as Node, Element, and Document. It simplifies HTML element manipulation, styling, and JavaScript interop operations in web projects.

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

Use it when

  • You are developing a Flutter web or pure Dart web application.
  • You want to simplify DOM manipulation and casting using the `web` package.

Skip it when

  • You are building mobile-only or desktop-only native applications without web targets.

Strengths

  • Enhances standard web API types with convenient getters and methods.
  • Simplifies JavaScript interoperation with integrated `js_interop_utils` helpers.

Weaknesses

  • Limited to web development targets.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
2
import 'package:dom_extensions/dom_extensions.dart';

void main() {
  final div = document.select<Element>('.my-div');
  div?.text = 'Hello, world!';
}

Alternatives

Packages that do the same job and could replace web_utils.

Works with

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