updater_queue_bloc 0.1.1 copy "updater_queue_bloc: ^0.1.1" to clipboard
updater_queue_bloc: ^0.1.1 copied to clipboard

outdated

An async state queue implementation, to be used a the basis for a bloc.

updater_queue_bloc #

import 'package:updater_queue_bloc/updater_queue_bloc.dart';

class CounterBloc extends UpdaterQueue<int> {
  CounterBloc() : super(0);

  Future<void> increment() async {
    await map((count) => count + 1);
  }

  Future<void> addNTimes(int n) async {
    await expand(
      (count) async* {
        for (var i = 0; i < n; i++) {
          yield count + n;
        }
      },
    );
  }
}
0
likes
30
pub points
0%
popularity

Publisher

unverified uploader

An async state queue implementation, to be used a the basis for a bloc.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on updater_queue_bloc