universal_html 2.2.4 copy "universal_html: ^2.2.4" to clipboard
universal_html: ^2.2.4 copied to clipboard

A 'dart:html' that works in all platforms, including Flutter and server-side. Eases cross-platform development and HTML / XML processing.

example/example.dart

import 'package:universal_html/html.dart';

void main() {
  // Create a DOM tree
  final divElement = DivElement();
  divElement.append(Element.tag('h1')
    ..classes.add('greeting')
    ..appendText('Hello world!'));

  // Print outer HTML
  print(divElement.outerHtml);
  // --> <div><h1>Hello world</h1></div>

  // Do a CSS query
  print(divElement.querySelector('div > .greeting')!.text);
  // --> Hello world
}
432
likes
110
pub points
99%
popularity

Publisher

verified publisherdint.dev

A 'dart:html' that works in all platforms, including Flutter and server-side. Eases cross-platform development and HTML / XML processing.

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (LICENSE)

Dependencies

async, charcode, collection, csslib, html, meta, source_span, typed_data, universal_io

More

Packages that depend on universal_html