angel_flutter 1.0.0-alpha copy "angel_flutter: ^1.0.0-alpha" to clipboard
angel_flutter: ^1.0.0-alpha copied to clipboard

Widgets and helpers for developing Flutter clients for Angel applications.

angel_flutter #

Pub

Widgets and helpers for developing Flutter clients for Angel applications.

AngelAnimatedList #

Found in package:angel_flutter/ui/angel_animated_list.dart.

AngelAnimatedList screenshot

Similar to the FirebaseAnimatedList widget in package:firebase_database, this widget is a ListView that updates itself in real-time, based on a Service or ServiceList instance. This plays nicely with WebSockets, REST, polling, and every transport provided by package:angel_client.

Example usage:

@override
Widget build(BuildContext context) {
    return new Scaffold(
    body: new RefreshIndicator(
        onRefresh: () => service.index().then((_) => null),
        child: new AngelAnimatedList(
            serviceList: todos,
            primary: true,
            defaultChild: (_) {
                return const Center(
                  child: const CircularProgressIndicator(),
                );
            },
            emptyState: (_) {
                return const Center(
                  child: const Text('No todos found.'),
                );
            },
            builder: (ctx, data, animation, index) {
                var todo = new Todo.fromJson(data);
                return new TodoItem(todo, service);
            },
          ),
        ),
    );
}
0
likes
50
pub points
0%
popularity

Publisher

unverified uploader

Widgets and helpers for developing Flutter clients for Angel applications.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

angel_client, flutter, meta

More

Packages that depend on angel_flutter