haste_loon 0.0.1 copy "haste_loon: ^0.0.1" to clipboard
haste_loon: ^0.0.1 copied to clipboard

Haste extensions for the Loon library.

Haste ⚡️ - Loon #

An extension to Haste with added actions for Loon.

Install #

flutter pub add haste_loon

Actions #

  • doc ➡️ Subscribe to a Loon document.
import 'package:haste/haste.dart';
import 'package:haste_loon/haste_loon.dart';

class UserModel {
  final String name;

  UserModel({ required this.name });
}

final users = Loon.collection<UserModel>('users');

class MyWidget extends StatelessWidget with Haste {
  @override
  build(context) {
    final userSnap = doc(users.doc('1'));

    return Text(userSnap.data.name);
  }
}
  • query ➡️ Subscribe to a Loon query.
import 'package:haste/haste.dart';
import 'package:haste_loon/haste_loon.dart';

class UserModel {
  final String name;

  UserModel({ required this.name });
}

final users = Loon.collection<UserModel>('users');

class MyWidget extends StatelessWidget with Haste {
  @override
  build(context) {
    final userSnaps = doc(users.where((snap) => snap.data.name == "User 1"));

    return Text("Matching users: ${userSnaps.length}");
  }
}
0
likes
130
points
14
downloads

Publisher

unverified uploader

Weekly Downloads

Haste extensions for the Loon library.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, haste, loon

More

Packages that depend on haste_loon