bloc_plus 0.2.2
bloc_plus: ^0.2.2 copied to clipboard
Extensions for flutter_bloc focused on ergonomics and safety.
0.2.2 #
- Fixes:
CancellationToken.run,RestartableTask.run,runLatestandguardeddrop the failure of superseded or cancelled work like its result; only the latest run can throw.guardedno longer starts on a closed bloc.HasEffects.close()no longer waits for a paused effect subscriber before closing the bloc.BlocSelectorWithBlocbehaves likeBlocSelector: no stale value after the selector changes, one selector call per state change, andselectorShouldRebuildgets the last built value asprevious.readOrNull,watchOrNullandselectOrNullreturnnullonly when no provider exists.runLatestdrops the keys of failed tasks; a repeatedclose()waits for the first one.bloclower bound raised to9.2.1, sosafeEmitandguardedalso stop on a closingBloc.
- Tooling: Flutter 3.50 support (
flutter_lints^6.0.0, contributors need Dart 3.8; example app onmaterial_ui, Flutter >=3.47), one gated CI workflow that also checks the lowest dependency versions and Flutter 3.10.6, contract tests and clearer API docs. Package minimums stay at Dart 3.0 and Flutter 3.10.
Migration impact:
- No API changes; if you pin
blocbelow9.2.1, upgrade within9.x. - Superseded or cancelled runs, and
guardedcalls that fail after close, returnnullinstead of throwing. - Effects emitted right before
close()reach subscribers after the bloc is closed, like its last states; a subscriber that emits into the bloc in response should usesafeEmit. selectorShouldRebuildgets the last built value asprevious;BlocSelectorWithBlocis now aStatefulWidget.- A missing provider read inside a bloc's
createnow throws fromreadOrNull/watchOrNull/selectOrNullinstead of returningnull.
Release type rationale:
patch: bug fixes without API changes.
0.2.1 #
- Compatibility metadata update:
- lowered the developer tooling floor from
Dart 3.8toDart 3.0by constrainingflutter_lintsto the latest line that still supports Dart 3.0 - kept the package minimum SDKs unchanged at
Dart >=3.0.0andFlutter >=3.10.0
- lowered the developer tooling floor from
Migration impact:
- No API changes. No migration required.
Release type rationale:
patchchange for compatibility metadata and tooling support only.
0.2.0 #
- Added policy composition and custom equality helpers:
whenRebuildwhenListenRebuildPolicy.and,RebuildPolicy.or,RebuildPolicy.notListenPolicy.and,ListenPolicy.or,ListenPolicy.notonChangeByonChangeListenBy
- Expanded effect ergonomics:
- added
effectWhentoEffectListener - added
MultiEffectListener
- added
- Added higher-level async helpers:
RestartableTasksMixin- keyed
runLatest,cancelLatest,cancelAllLatest,isTaskRunning
- Added
BlocConsumerWithEffectsfor combined state and effect composition. - Updated README, PRD, task specs, and example app to document the new APIs.
Migration impact:
- No breaking API changes. Existing code continues to work.
- Consumers can adopt the new APIs incrementally.
Release type rationale:
minorbump for new public API surface additions.
0.1.3 #
- Documentation improvements:
- Added dartdoc comments for the public API to improve generated package docs and pub.dev documentation coverage.
Migration impact:
- No API changes. No migration required.
Release type rationale:
patchbump for user-visible documentation improvements with no behavior changes.
0.1.2 #
- Documentation cleanup:
- Removed the two trailing README sections:
StatusandRelease process (without verified publisher).
- Removed the two trailing README sections:
- Change category:
chore
Migration impact:
- No API changes. No migration required.
Release type rationale:
patchbump for documentation-only cleanup.
0.1.1 #
- CI improvements:
- Added dedicated coverage workflow with Codecov upload.
- Coverage upload now supports
CODECOV_TOKENvia GitHub Actions secret.
- Release process improvements:
- Added PR quality and release automation workflows.
- Added manual publish workflow for non-verified publisher setup.
- Documentation improvements:
- Added status badges to README.
- Clarified release flow and publish steps.
Migration impact:
- No API changes. No migration required.
Release type rationale:
patchbump for CI, release automation, and documentation improvements.
0.1.0 #
- Added
ui_with_blocmodule:BlocBuilderWithBlocBlocListenerWithBlocBlocConsumerWithBlocBlocSelectorWithBloc
- Added
context_extensionsmodule:readOrNullwatchOrNullselectOrNullwithBloc
- Added
policiesmodule:- Rebuild policies:
distinct,onChange,always,never - Listen policies:
distinctListen,onChangeListen,alwaysListen,neverListen
- Rebuild policies:
- Added
async_safetymodule:SafeEmitMixinCancellationTokenRestartableTask
- Added
effectsmodule:HasEffectsEffectListener
Migration impact:
- First feature release, no migration required.
Release type rationale:
minorbump due to new public API surface additions.