fletch 0.1.0 copy "fletch: ^0.1.0" to clipboard
fletch: ^0.1.0 copied to clipboard

outdatedDart 1 only

A jQuery-like library implemented using common Dart patterns.

example/example.dart

import 'dart:html';
import 'package:fletch/fletch.dart';

void main() {
    $("body").style["font-family"] = "sans-serif";

    $("<h1>")..text = "Fletch Example"
             ..appendTo("body");

    var list = $("<ul>")..appendTo("body");

    for (var i = 1; i <= 10; i++) {
        $("<li>List Item $i</li>")..style["width"] = "6rem"
                                  ..appendTo(list)
                                  ..click.listen((evt, self) => $(self).classes.toggle("loud"));
    }

    $("<a>")..text = "×"
            ..attr["href"] = "#"
            ..style({
                "color": "red",
                "text-decoration": "none",
                "float": "right"
            })
            ..appendTo("li")
            ..click.listen((evt, self) => $(self).parent.remove());
}
4
likes
0
points
147
downloads

Publisher

verified publishermahawarkartikey.in

Weekly Downloads

A jQuery-like library implemented using common Dart patterns.

Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (license)

Dependencies

browser

More

Packages that depend on fletch