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.yaml
file
1.0.1 #
- Dart 3 ready: new
analysis_options.yaml
file + bumped Dart SDK constraints
1.0.2 #
- Update
analysis_options.yaml
file.
1.0.3 #
shouldFetch
callback 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
StreamController
to manage the stream ofResource
objects emitted by theNetworkBoundResource
. The stream can be accessed via astream
getter. - Added a
dispose
method to close theStreamController
when theNetworkBoundResource
is no longer needed.
- Implemented use of a
- Changed
- Modified the
fetch
method to use theStreamController
to emitResource
objects representing the current state of the resource. - Updated exception handling in the
fetch
method to emit aResource.failed
object with the caught exception.
- Modified the
- Added
Resource
- Added
- Added a
ResourceStatus
enum to represent the different states a resource can be in. - Added
status
field toResource
to indicate the current state of the resource. - Added
exception
field toResource
to hold an exception if the resource is in thefailed
state.
- Added a
- Changed
- Made
Resource
an immutable class. - Replaced separate subclasses for each resource state (empty, loading, success, failed) with named constructors in the
Resource
class itself. - Renamed
baseData
todata
andbaseException
toexception
for clarity.
- Made
- Added
2.0.1 #
- Bump Dart SDK constraint and update
test
dependency 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
collection
andmeta
package 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
meta
andcollection
in favor ofequatable
. - Bump SDK version constraint.
- Bump dependencies to latest.
- Regenerate
analysis_options.yaml
file.
2.1.3 #
- Bump SDK version constraint.
- Bump dependencies to latest.
- Regenerate
analysis_options.yaml
file.
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.yaml
file.