static_dom 2.0.1 copy "static_dom: ^2.0.1" to clipboard
static_dom: ^2.0.1 copied to clipboard

A simple static HTML DOM builder library for Dart

example/static_dom_example.dart

// Copyright (c) 2017, teja. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.

import 'package:static_dom/static_dom.dart';

main() {
  final data = <String>['messi.jpg', 'neymar.jpg'];
  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(divEl.render());
}
0
likes
30
pub points
0%
popularity

Publisher

unverified uploader

A simple static HTML DOM builder library for Dart

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

Dependencies

ulid

More

Packages that depend on static_dom