nbr 2.1.6
nbr: ^2.1.6 copied to clipboard
Generic implementation of the network-bound-resource algorithm in Dart
0.0.1 #
- Initial version.
0.0.2 #
- Bump Dart SDK version constraint and update dependencies.
0.0.3 #
- Bump Dart SDK version constraint and update dependencies.
0.0.4 #
- Bump Dart SDK version constraint and update dependencies.
1.0.0 #
- GitHub repository cleanup
- Regenerate
analysis_options.yamlfile
1.0.1 #
- Dart 3 ready: new
analysis_options.yamlfile + bumped Dart SDK constraints
1.0.2 #
- Update
analysis_options.yamlfile.
1.0.3 #
shouldFetchcallback has a different signature, it's now defined astypedef ShouldFetchCallback<Entity> = FutureOr<bool> Function(Entity? entity)instead oftypedef ShouldFetchCallback<Entity> = bool Function(Entity? entity)
2.0.0 #
- This version contains breaking changes.
NetworkBoundResource- Added
- Implemented use of a
StreamControllerto manage the stream ofResourceobjects emitted by theNetworkBoundResource. The stream can be accessed via astreamgetter. - Added a
disposemethod to close theStreamControllerwhen theNetworkBoundResourceis no longer needed.
- Implemented use of a
- Changed
- Modified the
fetchmethod to use theStreamControllerto emitResourceobjects representing the current state of the resource. - Updated exception handling in the
fetchmethod to emit aResource.failedobject with the caught exception.
- Modified the
- Added
Resource- Added
- Added a
ResourceStatusenum to represent the different states a resource can be in. - Added
statusfield toResourceto indicate the current state of the resource. - Added
exceptionfield toResourceto hold an exception if the resource is in thefailedstate.
- Added a
- Changed
- Made
Resourcean immutable class. - Replaced separate subclasses for each resource state (empty, loading, success, failed) with named constructors in the
Resourceclass itself. - Renamed
baseDatatodataandbaseExceptiontoexceptionfor clarity.
- Made
- Added
2.0.1 #
- Bump Dart SDK constraint and update
testdependency version. - Updates to the documentation.
2.0.2 #
- Minor fixes related to the stream getter potentially causing
Bad state: Stream has already been listened to. - Bump minimum Dart SDK version
2.0.3 #
- Bump Dart SDK version constraint.
2.0.4 #
- Bump SDK version constraint
- Bump dependencies to latest
- Add topics to
pubspec.yaml
2.1.0 #
- Regress
collectionandmetapackage versions to support use in current stable Flutter versions. - Minor cleanups in the library itself.
2.1.1 #
- Bump SDK version constraint.
- Bump dependencies to latest.
2.1.2 #
- Remove
metaandcollectionin favor ofequatable. - Bump SDK version constraint.
- Bump dependencies to latest.
- Regenerate
analysis_options.yamlfile.
2.1.3 #
- Bump SDK version constraint.
- Bump dependencies to latest.
- Regenerate
analysis_options.yamlfile.
2.1.4 #
- Bump SDK version constraint.
- Bump dependencies to latest.
- Update documentation.
2.1.5 #
- Bump SDK version constraint.
2.1.6 #
- Bump SDK version constraint.
- Bump dependencies to latest.
- Regenerate
analysis_options.yamlfile.