updater_queue_bloc 0.1.1
updater_queue_bloc: ^0.1.1 copied to clipboard

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
90
pub points
0%
popularity

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

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

timm.preetz@gmail.com

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on updater_queue_bloc