nbr library

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

Classes

NetworkBoundResource<Entity>
Abstract class representing a resource that is bound to a network request. It uses a StreamController to emit a stream of Resource objects, representing the current state of the resource (loading, success, failed, or empty).
Resource<T>
Immutable class representing a resource that can be in one of four states: empty, loading, success, or failed. It is designed to help manage and represent the state of a resource in a clean and consistent way.

Enums

ResourceStatus
Enum representing different states in which a resource can be in.