ncc_data_shaft library

Classes

Abortable
An HTTP request that can be aborted before it completes.
AbortableMultipartRequest
A MultipartRequest which supports abortion using abortTrigger.
AbortableRequest
A Request which supports abortion using abortTrigger.
AbortableStreamedRequest
A StreamedRequest which supports abortion using abortTrigger.
AppService
A core contract defining the lifecycle of a long-running service or component within the application.
AsciiCodec
Encoding and decoding of ASCII characters.
AsciiDecoder
Converts ASCII bytes to string.
AsciiEncoder
Converts strings of only ASCII characters to bytes.
Base64Codec
A base64 encoder and decoder.
Base64Decoder
Decoder for base64 encoded data.
Base64Encoder
Base64 and base64url encoding converter.
BaseClient
An abstract base class that implements the ClientMethods interface, providing a foundation for custom HTTP clients.
BaseRequest
The base class for HTTP requests.
BaseResponse
The base class for HTTP responses.
BaseResponseWithUrl
A BaseResponse with a url field.
BasicDriver<T>
An abstract base class for Driver implementations designed to handle basic, key-value data operations.
BehaviorSubjectService<T>
The base class for reactive services that manage state using a BehaviorSubject.
ByteConversionSink
The ByteConversionSink provides an interface for converters to efficiently transmit byte data.
ByteStream
A stream of chunks of bytes representing a single piece of data.
Case<UsecaseParams extends Params>
The sealed base contract for all executable operations, representing a command or query in the application.
ChunkedConversionSink<T>
A ChunkedConversionSink is used to transmit data more efficiently between two converters during chunked conversions.
Client
The interface for HTTP clients that take care of maintaining persistent connections across multiple requests to the same server.
ClientMethods
An abstract interface that defines the contract for an HTTP client.
ClosableStringSink
A ClosableStringSink extends the StringSink interface by adding a close method.
Codable<T, Self extends Codable<T, Self>>
The base contract for all data models or objects that require mapping from a remote representation to a local Dart object (decoding/deserialization).
Codec<S, T>
A Codec encodes and (if supported) decodes data.
ContentType
A MIME/IANA media type used as the value of the HttpHeaders.contentTypeHeader header.
Converter<S, T>
A Converter converts data from one representation into another.
DataSource
The fundamental abstract base class for all Data Source implementations.
DataSourceCallable<ValueType>
An abstract DataSource designed to represent a single, callable operation.
DatasourceDeleteHttp<RemoteObject extends Codable<Object, RemoteObject>>
A standard remote datasource for DELETE operations using HttpDataShaftDriver.
DatasourceDeleteRemote<RemoteObject extends Codable<Object, RemoteObject>, Driver extends RemoteDriver>
A specialized DatasourceRemote for handling HTTP DELETE operations.
DatasourceDeleteSession<RemoteObject extends Codable<Object, RemoteObject>>
A session-aware remote datasource for DELETE operations.
DatasourceGetHttp<RemoteObject extends Codable<Object, RemoteObject>>
A standard remote datasource for GET operations using HttpDataShaftDriver.
DatasourceGetRemote<RemoteObject extends Codable<Object, RemoteObject>, Driver extends RemoteDriver>
A specialized DatasourceRemote for handling HTTP GET operations.
DatasourceGetSession<RemoteObject extends Codable<Object, RemoteObject>>
A session-aware remote datasource for GET operations.
DatasourceLocal<ValueType, D extends Driver>
An abstract DataSource designed to manage a single, uniquely identifiable piece of data stored locally (e.g., configurations, tokens, preferences).
DatasourceNccDelete<RemoteObject extends Codable<Object, RemoteObject>, NccDriver extends NccConnectionDriver<BaseClient>>
A specialized remote datasource for DELETE operations using an NccConnectionDriver.
DatasourceNccGet<RemoteObject extends Codable<Object, RemoteObject>, NccDriver extends NccConnectionDriver<BaseClient>>
A specialized remote datasource for GET operations using an NccConnectionDriver.
DatasourceNccPatch<RemoteObject extends Codable<Object, RemoteObject>, NccDriver extends NccConnectionDriver<BaseClient>>
A specialized remote datasource for PATCH operations using an NccConnectionDriver.
DatasourceNccPost<RemoteObject extends Codable<Object, RemoteObject>, NccDriver extends NccConnectionDriver<BaseClient>>
A specialized remote datasource for POST operations using an NccConnectionDriver.
DatasourceNccPut<RemoteObject extends Codable<Object, RemoteObject>, NccDriver extends NccConnectionDriver<BaseClient>>
A specialized remote datasource for PUT operations using an NccConnectionDriver.
DatasourceObserverInstances
Static registry for Data Source observers.
DatasourcePatchHttp<RemoteObject extends Codable<Object, RemoteObject>>
A standard remote datasource for PATCH operations using HttpDataShaftDriver.
DatasourcePatchRemote<RemoteObject extends Codable<Object, RemoteObject>, Driver extends RemoteDriver>
A specialized DatasourceRemote for handling HTTP PATCH operations.
DatasourcePatchSession<RemoteObject extends Codable<Object, RemoteObject>>
A session-aware remote datasource for PATCH operations.
DatasourcePostHttp<RemoteObject extends Codable<Object, RemoteObject>>
A standard remote datasource for POST operations using HttpDataShaftDriver.
DatasourcePostRemote<RemoteObject extends Codable<Object, RemoteObject>, Driver extends RemoteDriver>
A specialized DatasourceRemote for handling HTTP POST operations.
DatasourcePostSession<RemoteObject extends Codable<Object, RemoteObject>>
A session-aware remote datasource for POST operations.
DatasourcePutHttp<RemoteObject extends Codable<Object, RemoteObject>>
A standard remote datasource for PUT operations using HttpDataShaftDriver.
DatasourcePutRemote<RemoteObject extends Codable<Object, RemoteObject>, Driver extends RemoteDriver>
A specialized DatasourceRemote for handling HTTP PUT operations.
DatasourcePutSession<RemoteObject extends Codable<Object, RemoteObject>>
A session-aware remote datasource for PUT operations.
DatasourceRemote<RemoteObject extends Codable<Object, RemoteObject>, Driver extends RemoteDriver>
An abstract DataSourceCallable designed to manage data interactions with a remote service (e.g., REST API, WebSocket, external database).
DataSourceStreamable<T>
An abstract DataSource designed to provide a continuous stream of data of type T.
DeduplicationCacheRepository<Info, DS extends DataSourceCallable<Info>>
The most complete Repository implementation, combining safety, memory caching, and request deduplication.
DeduplicationExecution<T>
A mixin that prevents concurrent execution of the same asynchronous operation.
DeduplicationRepository<Info, DS extends DataSourceCallable<Info>>
A SafeRepositoryDatasourceCallable enhanced with request deduplication logic.
DeleteParams
Parameters for DELETE requests.
Driver
The fundamental abstraction for all Data Drivers within the Data Layer.
Either<L, R>
Represents a value of one of two possible types, Left or Right.
Encoding
Open-ended set of encodings.
Entity
The base contract for all domain entities in the application.
Eq<T>
A type class used to determine equality between 2 instances of the same type T. Any 2 instances x and y are equal if eqv(x, y) is true.
Failure
Represents an expected error result from the Domain or Usecase layer.
GetParams
Parameters for GET requests.
GlobalNetworkObservable
Manages global network observers and tracks network state per client.
Hash<T>
A type class used to represent a hashing scheme for objects of a given type.
HKT<G, A>
https://marcosh.github.io/post/2020/04/15/higher-kinded-types-php-solution.html https://medium.com/@gcanti/higher-kinded-types-in-flow-275b657992b7
HKT2<G1, G2, A>
HKT3<G1, G2, G3, A>
HtmlEscape
Converter which escapes characters with special meaning in HTML.
HtmlEscapeMode
HTML escape modes.
HttpDataShaftDriver
A specialized NccConnectionDriver that utilizes the standard NccClient.
HttpDatasourceObserver
Interface for monitoring remote interactions.
HttpHeaders
Headers for HTTP requests and responses.
InadmissibleRepositoryError
Error representing a controlled business failure that originated in the DataSource.
InMemorySessionStateManager
An in-memory implementation of SessionStateManager.
IO<A>
IO<A> represents a non-deterministic synchronous computation that can cause side effects, yields a value of type A and never fails.
IOEither<L, R>
IOEither<L, R> represents a non-deterministic synchronous computation that can cause side effects, yields a value of type R or can fail by returning a value of type L.
IOOption<R>
IOOption<R> represents an synchronous computation that may fails yielding a None or returns a Some(R) when successful.
IORef<T>
Mutable reference in the IO monad.
Issue
The sealed base class for all application errors, faults, and warnings.
JsonBytesCodable<Self extends Codable<Uint8List, Self>>
JsonCodec
A JsonCodec encodes JSON objects to strings and decodes strings to JSON objects.
JsonDecoder
This class parses JSON strings and builds the corresponding objects.
JsonEncoder
This class converts JSON objects to strings.
JsonStringCodable<Self extends Codable<String, Self>>
A specialized abstract contract for decoding data models from a raw byte array (Uint8List) that contains UTF-8 encoded JSON.
JsonUtf8Encoder
Encoder that encodes a single object as a UTF-8 encoded JSON string.
Latin1Codec
A Latin1Codec encodes strings to ISO Latin-1 (aka ISO-8859-1) bytes and decodes Latin-1 bytes to strings.
Latin1Decoder
This class converts Latin-1 bytes (lists of unsigned 8-bit integers) to a string.
Latin1Encoder
This class converts strings of only ISO Latin-1 characters to bytes.
Left<L, R>
LineSplitter
A StreamTransformer that splits a String into individual lines.
MediaType
A class representing an HTTP media type, as used in Accept and Content-Type headers.
MultipartFile
A file to be uploaded as part of a MultipartRequest.
MultipartRequest
A multipart/form-data request.
NccClient
A base HTTP client that integrates network state management and response handling.
NccConnectionDriver<CustomClient extends BaseClient>
A RemoteDriver implementation powered by the ncc BaseClient.
NetworkObserver
An abstract interface that defines the methods for observing network events and responses in the context of a BaseClient. Implementing this interface allows the observer to receive notifications about changes in network status, errors, and responses.
None
NoParams
A specific implementation of Params used as a sentinel value for Usecase that require no input parameters.
OneWayFailureUseCase<TYPE extends Failure, UsecaseParams extends Params>
A specialized Usecase designed to produce an optional Failure result, but no successful domain Entity.
OneWayUseCase<TYPE extends Entity, UsecaseParams extends Params>
A Usecase that either returns a domain Entity or nothing at all, but is not expected to fail with a specific Failure.
OnExceptionRepositoryError
Error representing a failure during the orchestration or transformation within the Repository.
OnResponse
A class that encapsulates the details of an HTTP response received from a server. It includes various properties that describe the content and status of the response, such as the body, status code, and reason phrase.
Option<T>
A type that can contain a value of type T in a Some or no value with None.
Order<T>
The Order type class is used to define a total ordering on some type A.
Params
The abstract base class for all input parameter objects passed to a Usecase.
PartialOrder<T>
The PartialOrder type class is used to define a partial ordering on some type A.
PatchParams
Parameters for PATCH requests.
PostParams
Parameters for POST requests.
PublishSubjectService<T>
The base class for reactive services that manage events using a PublishSubject.
PutParams
Parameters for PUT requests.
Reader<R, A>
Reader<R, A> allows to read values A from a dependency/context R without explicitly passing the dependency between multiple nested function calls.
ReaderHKT
Tag the HKT2 interface for the actual Reader.
ReaderTask<E, A>
ReaderTask represents an asynchronous computation that yields a value of type A from a context of type E and never fails.
ReaderTaskEither<E, L, R>
ReaderTaskEither<E, L, R> represents an asynchronous computation (Task) that either yields a value of type R or fails yielding an error of type L (Either), that allows to read values from a dependency/context E (Reader).
RemoteDriver<OriginalResponse>
An abstract interface that defines the contract for HTTP communication.
Repository
The base abstract class for all Repositories in the architecture.
RepositoryDataSource<DS extends DataSource>
A specialized Repository that holds a reference to a DataSource.
RepositoryDataSourceCallable<ValueType, DS extends DataSourceCallable<ValueType>>
A Repository implementation that wraps a specific DataSourceCallable.
RepositoryDataSourceCallableObserver
Observer for repositories that execute one-shot operations.
RepositoryDataSourceStreamable<ValueType, DS extends DataSourceStreamable<ValueType>>
A specialized Repository that manages a Stream of data from a DataSourceStreamable.
RepositoryDataSourceStreamableObserver
Interface for monitoring repositories that establish continuous data flows.
RepositoryError
Represents an error that occurred within the Repository layer.
RepositoryObserver
Interface for monitoring the base lifecycle of a Repository.
RepositoryObserverInstances
Global registry for Repository layer observers.
Request
An HTTP request where the entire request body is known in advance.
RequestParams
A base container for all data required to perform a remote request.
RequestResponse<OriginalResponse>
A standardized response object returned by RemoteDriver.
Response
An HTTP response where the entire response body is known in advance.
SafeCallableRepositoryObserver
A specialized observer that captures exceptions during "Safe" calls.
SafeMemoryCacheRepository<Info, DS extends DataSourceCallable<Info>>
A SafeRepositoryDatasourceCallable that implements an in-memory caching strategy.
SafeRepositoryDatasourceCallable<Info, DS extends DataSourceCallable<Info>>
A robust Repository implementation that bridges a DataSource with the Domain layer.
SessionClient
Abstract class representing an HTTP client that handles session management, including token renewal and invalid session handling.
SessionDataShaftDriver
A specialized NccConnectionDriver that utilizes the SessionClient from ncc.
SessionStateManager
Abstract class for managing the state of a session, such as cookies.
SimpleDatasourceObserver
Interface for monitoring the basic lifecycle of any DataSource.
SimpleObserver
A contract defining an observer for monitoring the creation and disposal lifecycle events of specific components within the application (e.g., Services, Usecase).
SingleReplaySubjectService<T>
A unique reactive service that buffers events when no listener is present.
Some<T>
State<S, A>
State<S, A> is used to store, update, and extract state in a functional way.
StateAsync<S, A>
StateAsync<S, A> is used to store, update, and extract async state in a functional way.
StreamedRequest
An HTTP request where the request body is sent asynchronously after the connection has been established and the headers have been sent.
StreamedResponse
An HTTP response where the response body is received asynchronously after the headers have been received.
StringConversionSink
A sink for converters to efficiently transmit String data.
Task<A>
Task represents an asynchronous computation that yields a value of type A and never fails.
TaskEither<L, R>
TaskEither<L, R> represents an asynchronous computation that either yields a value of type R or fails yielding an error of type L.
TaskOption<R>
TaskOption<R> represents an asynchronous computation that may fails yielding a None or returns a Some(R) when successful.
TimerAndBehaviorService<T>
The base class for a reactive service that manages state using a BehaviorSubject and periodically executes a core logic method using an internal Timer.
TimerAndPublishService<T>
The base class for a reactive service that manages event emission using a PublishSubject and periodically executes a core event generation logic using an internal Timer.
UnControlRepositoryError
Error representing an unanticipated failure captured by the Repository's safety net.
Unit
Used instead of void as a return statement for a function when no value is to be returned.
UseCase<TYPE extends Entity, UsecaseParams extends Params, LEFT extends Failure>
The primary contract for a Usecase that produces a predictable result or a typed error.
UseCaseHandler<TYPE extends Entity, UsecaseParams extends Params, LEFT extends Failure, VALUES extends Object>
A specialized Usecase designed to manage the flow of obtaining data (VALUES), handling potential errors, and transforming the result into the final TYPE.
Utf8Codec
A Utf8Codec encodes strings to utf-8 code units (bytes) and decodes UTF-8 code units to strings.
Utf8Decoder
This class converts UTF-8 code units (lists of unsigned 8-bit integers) to a string.
Utf8Encoder
This class converts strings to their UTF-8 code units (a list of unsigned 8-bit integers).

Enums

NetworkState
Enum representing the various states of the network.
RequestType

Mixins

Alt<KT, A>
Alt type class identifies an associative operation on a type constructor.
Alt2<KT, A, B>
Alt3<KT, P1, P2, P3>
Applicative<G, A>
Applicative2<G, A, B>
Applicative3<G, A, B, C>
Band<T>
Bands are semigroups whose operation (i.e. combine) is also idempotent (an operation that can be applied multiple times without changing the result beyond the initial application).
BoundedSemilattice<T>
A semilattice in which:
CommutativeGroup<T>
An commutative group (also known as an abelian group) is a group whose combine operation is commutative.
CommutativeMonoid<T>
CommutativeMonoid represents a commutative monoid.
CommutativeSemigroup<T>
CommutativeSemigroup represents a commutative semigroup.
DeduplicationManagement<Info, DS extends DataSourceCallable<Info>>
Prevents redundant, simultaneous calls to the same endpoint with the same parameters.
DeleteCall<RemoteObject extends Codable<Object, RemoteObject>, Driver extends RemoteDriver>
A mixin that implements the call method for HTTP DELETE requests.
Extend<KT, A>
Extend2<KT, A, B>
Filterable<KT, A>
Foldable<G, A>
Foldable2<G, A, B>
Functor<G, A>
Functor<G, A> extends HKT<G, A> to express the fact that the classes implementing the Functor interface will need to be higher kinded types.
Functor2<G, A, B>
Functor3<G, A, B, C>
GetCall<RemoteObject extends Codable<Object, RemoteObject>, Driver extends RemoteDriver>
A mixin that implements the call method for GET requests.
Group<T>
A group is a monoid where each element has an inverse.
MemoryCacheHelper<Info>
A mixin that provides simple in-memory caching capabilities to a Repository.
Monad<KT, A>
Monad2<KT, A, B>
Monad3<KT, P1, P2, P3>
Monoid<T>
A monoid is a semigroup with an identity (empty).
NetworkObservable
Mixin that observes network state changes and allows notifying observers when the network status or response changes.
PatchCall<RemoteObject extends Codable<Object, RemoteObject>, Driver extends RemoteDriver>
A mixin that implements the call method for HTTP PATCH requests.
PostCall<RemoteObject extends Codable<Object, RemoteObject>, Driver extends RemoteDriver>
A mixin that implements the call method for HTTP POST requests.
PutCall<RemoteObject extends Codable<Object, RemoteObject>, Driver extends RemoteDriver>
A mixin that implements the call method for HTTP PUT requests.
SafeRepositoryHelper<ValueType>
A mixin that provides a safety net for repository executions.
Semigroup<T>
A semigroup is any set A with an associative operation (combine).
Semilattice<T>
Semilattices are commutative semigroups whose operation (i.e. combine) is also idempotent.

Extensions

CompositionEitherExtension on Task<Either<L, R>>
CompositionOptionExtension on Task<Option<T>>
CurryExtension2 on Output Function(Input1, Input2)
Extract first parameter from this function to allow curring.
CurryExtension3 on Output Function(Input1, Input2, Input3)
CurryExtension4 on Output Function(Input1, Input2, Input3, Input4)
CurryExtension5 on Output Function(Input1, Input2, Input3, Input4, Input5)
FpdartOnDateTime on DateTime
fpdart extension methods on DateTime
FpdartOnIterable on Iterable<T>
Get the first element of the Iterable. If the Iterable is empty, return None. Functional programming functions on a mutable dart Iterable using fpdart.
FpdartOnIterableOfIterable on Iterable<Iterable<T>>
Functional programming functions on Iterable<Iterable<T>> using fpdart.
FpdartOnList on List<T>
Functional programming functions on a mutable dart Iterable using fpdart.
FpdartOnMap on Map<K, V>
Functional programming functions on a mutable dart Map using fpdart.
FpdartOnOption on Option<T>
FpdartOnOptionMap on Option<Map<K, dynamic>>
FpdartOnPredicate on bool Function()
FpdartOnPredicate1 on bool Function(P)
FpdartOnString on String
Functional programming functions on dart String using fpdart.
FpdartSequenceIterableEither on Iterable<Either<E, A>>
FpdartSequenceIterableIO on Iterable<IO<T>>
FpdartSequenceIterableIOEither on Iterable<IOEither<E, T>>
FpdartSequenceIterableIOOption on Iterable<IOOption<T>>
FpdartSequenceIterableOption on Iterable<Option<T>>
FpdartSequenceIterableState on Iterable<State<S, A>>
Convert a List<State<S, A>> to a single State<S, List<A>>.
FpdartSequenceIterableTask on Iterable<Task<T>>
FpdartSequenceIterableTaskEither on Iterable<TaskEither<E, T>>
FpdartSequenceIterableTaskOption on Iterable<TaskOption<T>>
FpdartTraversableIterable on Iterable<T>
HeadersWithSplitValues on BaseResponse
UncurryExtension2 on Output Function(Input2) Function(Input1)
UncurryExtension3 on Output Function(Input3) Function(Input2) Function(Input1)
UncurryExtension4 on Output Function(Input4) Function(Input3) Function(Input2) Function(Input1)
UncurryExtension5 on Output Function(Input5) Function(Input4) Function(Input3) Function(Input2) Function(Input1)

Constants

ascii → const AsciiCodec
An instance of the default implementation of the AsciiCodec.
base64 → const Base64Codec
A base64 encoder and decoder.
base64Url → const Base64Codec
A base64url encoder and decoder.
htmlEscape → const HtmlEscape
A String converter that converts characters to HTML entities.
json → const JsonCodec
An instance of the default implementation of the JsonCodec.
latin1 → const Latin1Codec
An instance of the default implementation of the Latin1Codec.
noParams → const NoParams
A constant instance of NoParams to be reused everywhere no parameters are needed.
unicodeBomCharacterRune → const int
The Unicode Byte Order Marker (BOM) character U+FEFF.
unicodeReplacementCharacterRune → const int
The Unicode Replacement character U+FFFD (�).
unit → const Unit
Used instead of void as a return statement for a function when no value is to be returned.
utf8 → const Utf8Codec
An instance of the default implementation of the Utf8Codec.

Properties

dateNow IO<DateTime>
Constructs a DateTime instance with current date and time in the local time zone.
no setter
ioRefEq Eq<IORef<Object?>>
Eq instance to compare IORefs using pointer equality
final
now IO<int>
The number of milliseconds since the "Unix epoch" 1970-01-01T00:00:00Z (UTC).
no setter
random IO<double>
Generates a non-negative random floating point value uniformly distributed in the range from 0.0, inclusive, to 1.0, exclusive.
no setter
randomBool IO<bool>
Generates a random boolean value.
no setter

Functions

base64Decode(String source) Uint8List
Decodes base64 or base64url encoded bytes.
base64Encode(List<int> bytes) String
Encodes bytes using base64 encoding.
base64UrlEncode(List<int> bytes) String
Encodes bytes using base64url encoding.
boolAndMonoid() Monoid<bool>
boolOrMonoid() Monoid<bool>
constF<A>(A a) → A Function(dynamic b)
constf a is a unary function which evaluates to a for all inputs.
delete(Uri url, {Map<String, String>? headers, Object? body, Encoding? encoding}) Future<Response>
Sends an HTTP DELETE request with the given headers to the given URL.
dualEndoMonoid<A>() Monoid<Endo<A>>
endoMonoid<A>() Monoid<Endo<A>>
get(Uri url, {Map<String, String>? headers}) Future<Response>
Sends an HTTP GET request with the given headers to the given URL.
Sends an HTTP HEAD request with the given headers to the given URL.
identity<T>(T a) → T
Returns the given a.
identityFuture<T>(T a) Future<T>
Returns the given a, wrapped in Future.value.
jsonDecode(String source, {Object? reviver(Object? key, Object? value)?}) → dynamic
Parses the string and returns the resulting Json object.
jsonEncode(Object? object, {Object? toEncodable(Object? nonEncodable)?}) String
Converts object to a JSON string.
left<L, R>(L l) Either<L, R>
Return a Left(l).
modifyIORef<T>(Endo<T> update, IORef<T> ref) IO<Unit>
Works almost identical to the write method, but instead of taking a value that needs to be written, takes an Endo function, applies the IORef's current value to it and writes the result to the IORef.
modifyIORefC<T>(Endo<T> update) IO<Unit> Function(IORef<T> ref)
A curried version of the modifyIORef
newIORef<T>(T initial) IO<IORef<T>>
Creates a new IORef inside an IO monad with a given initial value.
none<T>() Option<T>
Return a None.
option<T>(T value, bool predicate(T)) Option<T>
Return Some of value when predicate applied to value returns true, None otherwise.
optionOf<T>(T? t) Option<T>
Return None if t is null, Some otherwise.
patch(Uri url, {Map<String, String>? headers, Object? body, Encoding? encoding}) Future<Response>
Sends an HTTP PATCH request with the given headers and body to the given URL.
post(Uri url, {Map<String, String>? headers, Object? body, Encoding? encoding}) Future<Response>
Sends an HTTP POST request with the given headers and body to the given URL.
put(Uri url, {Map<String, String>? headers, Object? body, Encoding? encoding}) Future<Response>
Sends an HTTP PUT request with the given headers and body to the given URL.
randomInt(int min, int max) IO<int>
Generates a non-negative random integer uniformly distributed in the range from min, inclusive, to max, exclusive.
read(Uri url, {Map<String, String>? headers}) Future<String>
Sends an HTTP GET request with the given headers to the given URL and returns a Future that completes to the body of the response as a String.
readBytes(Uri url, {Map<String, String>? headers}) Future<Uint8List>
Sends an HTTP GET request with the given headers to the given URL and returns a Future that completes to the body of the response as a list of bytes.
readIORef<T>(IORef<T> ref) IO<T>
Extracts a current value of the IORef and returns it inside the IO monad.
Return a Right(r).
runWithClient<R>(R body(), Client clientFactory(), {ZoneSpecification? zoneSpecification}) → R
Runs body in its own Zone with the Client returned by clientFactory set as the default Client.
some<T>(T t) Option<T>
Return a Some(t).
toBoolEither<L>(String str, L onLeft()) Either<L, bool>
Convert this String to bool, returns the result of onLeft for invalid inputs.
toBoolOption(String str) Option<bool>
Convert this String to bool, returns None for invalid inputs.
toDoubleEither<L>(L onLeft()) Either<L, double> Function(String)
Convert this String to double, returns the result of onLeft for invalid inputs.
toDoubleOption(String str) Option<double>
Convert this String to double, returns None for invalid inputs.
toIntEither<L>(L onLeft()) Either<L, int> Function(String)
Convert this String to int, returns the result of onLeft for invalid inputs.
toIntOption(String str) Option<int>
Convert this String to int, returns None for invalid inputs.
toNumEither<L>(L onLeft()) Either<L, num> Function(String)
Convert this String to num, returns the result of onLeft for invalid inputs.
toNumOption(String str) Option<num>
Convert this String to num, returns None for invalid inputs.
writeIORef<T>(T value, IORef<T> ref) IO<Unit>
Writes the given value to the IORef and returns a Unit inside the IO monad.
writeIORefC<T>(T value) IO<Unit> Function(IORef<T> ref)
A curried version of the writeIORef

Typedefs

ByteConversionSinkBase = ByteConversionSink
This class provides a base-class for converters that need to accept byte inputs.
DoAdapterEither<L> = R Function<R>(Either<L, R>)
DoAdapterIO = A Function<A>(IO<A>)
DoAdapterIOEither<E> = A Function<A>(IOEither<E, A>)
DoAdapterIOOption = A Function<A>(IOOption<A>)
DoAdapterOption = A Function<A>(Option<A>)
DoAdapterReaderTask<E> = Future<A> Function<A>(ReaderTask<E, A>)
DoAdapterReaderTaskEither<E, L> = Future<A> Function<A>(ReaderTaskEither<E, L, A>)
DoAdapterTask = Future<A> Function<A>(Task<A>)
DoAdapterTaskEither<E> = Future<A> Function<A>(TaskEither<E, A>)
DoAdapterTaskOption = Future<A> Function<A>(TaskOption<A>)
DoFunctionEither<L, R> = R Function(DoAdapterEither<L> $)
DoFunctionIO<A> = A Function(DoAdapterIO $)
DoFunctionIOEither<L, A> = A Function(DoAdapterIOEither<L> $)
DoFunctionIOOption<A> = A Function(DoAdapterIOOption $)
DoFunctionOption<A> = A Function(DoAdapterOption $)
DoFunctionReaderTask<E, A> = Future<A> Function(DoAdapterReaderTask<E> $)
DoFunctionReaderTaskEither<E, L, A> = Future<A> Function(DoAdapterReaderTaskEither<E, L> $)
DoFunctionTask<A> = Future<A> Function(DoAdapterTask $)
DoFunctionTaskEither<L, A> = Future<A> Function(DoAdapterTaskEither<L> $)
DoFunctionTaskOption<A> = Future<A> Function(DoAdapterTaskOption $)
Endo<A> = A Function(A a)
RequestSender = Future<Response> Function(Map<String, String> headers)
A typedef representing a function that sends an HTTP request using the provided headers and returns a Future<Response>.
Resolver<LEFT> = Future<A> Function<A>(TaskEither<LEFT, A>)
Separated<KT, A, B> = (HKT<KT, A>, HKT<KT, B>)
StringConversionSinkBase = StringConversionSink
This class provides a base-class for converters that need to accept String inputs.
StringConversionSinkMixin = StringConversionSink
This class provides a mixin for converters that need to accept String inputs.

Exceptions / Errors

ClientException
An exception caused by an error in a pkg/http client.
DataSourceException
Represents a low-level exception thrown by the Data Source layer (e.g., HTTP client, local storage, or API wrapper).
HttpException
InadmissibleDataSourceException
Exception thrown when a DataSource returns a response that is technically successful or expected by the underlying protocol (e.g., HTTP 404, 400), but is considered inadmissible for the specific operation's business logic.
JsonCyclicError
Reports that an object could not be stringified due to cyclic references.
JsonUnsupportedObjectError
Error thrown by JSON serialization if an object cannot be serialized.
NetworkAvailabilityException
Exception thrown when there is a network availability issue, such as when the device is offline or cannot reach the server.
NetworkException
A base class for all exceptions related to network errors.
NotLoggedInException
Exception thrown when the user is not logged in or when the session has expired, leading to unauthorized access issues.
RequestAbortedException
Thrown when an HTTP request is aborted.
ServerAvailabilityException
Exception thrown when the server is unavailable, typically when the server is down or unreachable.
SocketException
Exception thrown when a socket operation fails.
UnControlDataSourceException
Exception thrown when an unexpected error occurs within the DataSource or the underlying Driver that is not explicitly handled or anticipated by the system.
UsecaseException<Promotional extends Failure>
An explicit exception type wrapper used to propagate a specific Failure instance outside of a Usecase execution.