nbr 2.1.5 copy "nbr: ^2.1.5" to clipboard
nbr: ^2.1.5 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 as typedef ShouldFetchCallback<Entity> = FutureOr<bool> Function(Entity? entity) instead of typedef 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 of Resource objects emitted by the NetworkBoundResource. The stream can be accessed via a stream getter.
      • Added a dispose method to close the StreamController when the NetworkBoundResource is no longer needed.
    • Changed
      • Modified the fetch method to use the StreamController to emit Resource objects representing the current state of the resource.
      • Updated exception handling in the fetch method to emit a Resource.failed object with the caught exception.
  • Resource
    • Added
      • Added a ResourceStatus enum to represent the different states a resource can be in.
      • Added status field to Resource to indicate the current state of the resource.
      • Added exception field to Resource to hold an exception if the resource is in the failed state.
    • 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 to data and baseException to exception for clarity.

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 and meta 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 and collection in favor of equatable.
  • 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
likes
160
pub points
0%
popularity

Publisher

unverified uploader

Generic implementation of the network-bound-resource algorithm in Dart

Repository (GitHub)
View/report issues

Topics

#network-bound-resource #nbr #utility

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

equatable

More

Packages that depend on nbr