replay_bloc
0.3.0, released 2 years ago by bloclibrary.dev
Adds automatic undo and redo support to bloc and cubit states.
What it does
Extends the bloc state management library to provide automatic undo and redo capabilities for blocs and cubits. It offers classes like ReplayCubit and ReplayBloc, along with mixins for integration with other classes like HydratedBloc.
AI-written summary of version 0.3.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are using the bloc state management library and need undo/redo functionality.
- You want to allow users to revert or reapply state changes in your application.
Skip it when
- You are not using the bloc or cubit state management library.
- Your application does not require undo or redo capabilities.
Strengths
- Seamless integration with package:bloc
- Provides both dedicated classes and mixins for use with other bloc variants like HydratedBloc
Weaknesses
- Limited strictly to the bloc ecosystem
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
class CounterCubit extends ReplayCubit<int> {
CounterCubit() : super(0);
void increment() => emit(state + 1);
}Alternatives
Packages that do the same job and could replace replay_bloc.
- yx_state
A state management library for Dart and Flutter applications.
82Compare - undo
A clean and robust undo/redo library for Dart and Flutter using the Command Pattern.
72Compare - bloc_tools
Command-line tools for generating and linting bloc and cubit components.
88Compare - bloc_signals_flutter
Flutter UI extensions, providers, and bindings for the bloc_signals state management library.
75Compare
Works with
Packages commonly used together with replay_bloc: ones it builds on, ones built on it, and its own family.
- blocreplay_bloc depends on itA Dart library for implementing the BLoC pattern with Cubits and Blocs.
- flutter_blocSame familyFlutter widgets to easily integrate blocs and cubits for state management.
- bloc_testSame familyA testing library that makes it easy to test blocs and cubits.
- bloc_concurrencySame familyCustom event transformers for the bloc state management package.
- hydrated_blocSame familyAutomatically persists and restores bloc and cubit states.
- angular_blocSame familyAngularDart components that bind Bloc/Cubit state to the UI via a pipe.