dart_bloc_concurrency 1.1.0 copy "dart_bloc_concurrency: ^1.1.0" to clipboard
dart_bloc_concurrency: ^1.1.0 copied to clipboard

Custom event transformers. Built to be used with the bloc state management package.

dart-bloc-concurrency #

This is a copy of bloc_concurrency with an added debounce function.

Getting started #

Add this to your pubspec.yaml under dependencies

dart_bloc_concurrency: ^1.1.0

Usage #

import 'package:bloc/bloc.dart';
import 'package:dart_bloc_concurrency/dart_bloc_concurrency.dart';

class MyBloc extends Bloc<MyBlocEvent, MyBlocState> {
  MyBloc() : super(MyBlocState()) {
    on<MyBlocEvent>(_onEvent, transformer: debounce());
  }

  void _onEvent(
    MyBlocEvent event,
    Emitter<MyBlocState> emit,
  ) {
    emit(MyBlocState());
  }
}

class MyBlocState {}

abstract class MyBlocEvent {}
0
likes
160
pub points
48%
popularity

Publisher

verified publishermj12358.dev

Custom event transformers. Built to be used with the bloc state management package.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

bloc, stream_transform

More

Packages that depend on dart_bloc_concurrency