Skip to content

Jaguar-dart/static_dom

Repository files navigation

static_dom

A simple static HTML DOM builder library for Dart

Usage

A simple usage example:

Future updatePics() async {
  final JsonResponse resp = await client.getJson('/api/pics');
  print(resp.body);
  List<String> body = resp.body;
  Div divEl = div().forEach<String>(
      data,
      (String text) => div(classes: ['item'])
        ..add(img('/data/img/$text', classes: ["item-img"]))
        ..add(t(text, classes: ["item-txt"])));
  print(div.render());
  picHolder.setInnerHtml(div.render());
}

About

Static HTML DOM for server and client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages