stream_core
library
Classes
AndOperator <T extends Object >
Logical AND filter requiring all conditions to match.
AnySortComparator <T extends Object >
A type-erased wrapper for sort comparators that can work with any model type.
ApiErrorInterceptor
Interceptor that maps every failed request onto a StreamDioException
carrying the StreamException it represents.
ApiKeyInterceptor
AttachmentFile
Cross-platform file wrapper for Stream attachments.
AttachmentUploadBatch
Several attachment uploads run as one operation.
AttachmentUploadState
The live state of one attachment upload.
AttachmentUploadTask
One attachment upload, as a handle on the operation itself.
Authenticating
The WebSocket connection is established and authentication is in progress.
AuthenticationFailed
A disconnection caused by the connection failing to authenticate.
AuthInterceptor
Interceptor that signs every request with the caller's token.
AutoCompleteOperator <T extends Object >
Word prefix matching filter for autocomplete.
AutomaticReconnectionPolicy
An interface that defines a policy for determining whether the WebSocket
should attempt an automatic reconnection based on specific conditions.
BackgroundStateReconnectionPolicy
A reconnection policy that checks the application's lifecycle state before
allowing reconnection. This prevents reconnection when the app is in the
background to save battery and resources.
BackgroundTransformer
The default Transformer for Dio .
BaseOptions
A set of base settings for each Dio().
BaseOptions and Options will be merged into one RequestOptions before
sending the requests. See Options.compose .
BatchCancelling
The batch was cancelled and is waiting for its uploads to stop.
BatchFinished
Every upload in the batch has settled, and result holds one outcome per
requested attachment.
BatchInProgress
The batch is working through its uploads.
BatchQueued
The batch has not started any of its uploads yet.
BatchStopping
An upload failed under a batch that gives up on the first failure, and the batch
is calling off the uploads that have not settled.
BatchUploadCancelled
The batch was called off through batch.cancel().
BatchUploadCompleted
Every attachment reached a terminal state on its own.
BatchUploadItemResult
One attachment's place in a BatchUploadResult .
BatchUploadProgress
How far a batch upload has got, both in attachments and in bytes.
BatchUploadResult
One outcome per requested attachment, and how the batch came to stop.
BatchUploadState
The live state of a batch upload.
BatchUploadStoppedOnError
An upload failed in a batch that gives up on the first failure, and the
rest were called off.
BoundingBox
A rectangular geographic region for area-based location filtering.
ByteBuffer
A sequence of bytes underlying a typed data object.
ByteData
A fixed-length, random-access sequence of bytes that also provides random
and unaligned access to the fixed-width integers and floating point
numbers represented by those bytes.
BytesBuilder
Builds a list of bytes, allowing bytes and lists of bytes to be added at the
end.
CancelToken
Controls cancellation of Dio 's requests.
CdnClient
Content Delivery Network (CDN) client for file operations.
CircularRegion
A circular geographic region for proximity-based location filtering.
ComparableField <T extends Object >
A type-safe wrapper for ordering values.
ComparisonOperator <T extends Object >
Base class for comparison-based filter operations.
CompositeReconnectionPolicy
A composite reconnection policy that combines multiple policies using a
logical operator (AND/OR). This allows for complex reconnection
logic by combining multiple conditions.
Connected
The WebSocket is fully connected and authenticated.
Connecting
The WebSocket is attempting to establish a connection.
ConnectionIdInterceptor
Interceptor that injects the connection id into the request params.
ConnectionRecoveryHandler
A connection recovery handler with intelligent reconnection management.
ConnectTimeout
A disconnection caused by the connection not becoming usable in time.
ConnectUserDetailsRequest
ContainsOperator <T extends Object >
Containment filter for JSON and array subset matching.
CurrentPlatform
Platform detection utility for identifying the current runtime environment.
DefaultRetryStrategy
Default implementation of RetryStrategy that uses exponential backoff
with jitter.
Dio
Dio enables you to make HTTP requests easily.
DioMixin
Disconnected
The WebSocket connection is closed and not available for communication.
Disconnecting
The WebSocket connection is in the process of being closed.
DisconnectionSource
Represents the source or cause of a WebSocket disconnection.
Disposable
A convenience class to represent a disposable object.
DynamicTokenProvider
A token provider that dynamically loads fresh JWT tokens using a custom function.
Endian
Endianness of number representation.
EqualOperator <T extends Object >
Equality filter using exact value matching.
ErrorInterceptorHandler
The handler for interceptors to handle error occurred during the request.
EvaluationOperator <T extends Object >
Base class for text-based evaluation filters.
ExistsOperator <T extends Object >
Field existence/absence filter.
Failure
Represents failed result.
Filter <T extends Object >
Type-safe filter for querying data.
FilterField <T >
Type-safe field identifier for filtering and value extraction.
Float32List
A fixed-length list of IEEE 754 single-precision binary floating-point
numbers that is viewable as a TypedData .
Float32x4
Four 32-bit floating point values.
Float32x4List
A fixed-length list of Float32x4 numbers that is viewable as a
TypedData .
Float64List
A fixed-length list of IEEE 754 double-precision binary floating-point
numbers that is viewable as a TypedData .
Float64x2
Float64x2 immutable value type and operations.
Float64x2List
A fixed-length list of Float64x2 numbers that is viewable as a
TypedData .
FormData
A class to create readable "multipart/form-data" streams.
It can be used to submit forms and file uploads to http server.
FusedTransformer
A Transformer that has a fast path for decoding UTF8-encoded JSON.
If the response is utf8-encoded JSON and no custom decoder is specified in the RequestOptions , this transformer
is significantly faster than the default SyncTransformer and the BackgroundTransformer .
This improvement is achieved by using a fused Utf8Decoder and JsonDecoder to decode the response,
which is faster than decoding the utf8-encoded JSON in two separate steps, since
Dart uses a special fast decoder for this case.
See https://github.com/dart-lang/sdk/blob/5b2ea0c7a227d91c691d2ff8cbbeb5f7f86afdb9/sdk/lib/_internal/vm/lib/convert_patch.dart#L40
GreaterOperator <T extends Object >
Greater-than comparison filter.
GreaterOrEqualOperator <T extends Object >
Greater-than-or-equal comparison filter.
The headers class for requests and responses.
Interceptor that sets additional headers for all requests.
HealthCheckInfo
HealthCheckPingEvent
HttpClientAdapter
HttpAdapter is a bridge between Dio and HttpClient .
InFlightCache <K , V >
Coalesces concurrent identical async calls by sharing a single in-flight
Future keyed by K.
Initialized
The initial state before any connection attempt has been made.
InOperator <T extends Object >
Membership test filter for list containment.
Int16List
A fixed-length list of 16-bit signed integers that is viewable as a
TypedData .
Int32List
A fixed-length list of 32-bit signed integers that is viewable as a
TypedData .
Int32x4
Int32x4 and operations.
Int32x4List
A fixed-length list of Int32x4 numbers that is viewable as a
TypedData .
Int64List
A fixed-length list of 64-bit signed integers that is viewable as a
TypedData .
Int8List
A fixed-length list of 8-bit signed integers.
Interceptor
Interceptor helps to deal with RequestOptions , Response ,
and DioException during the lifecycle of a request
before it reaches users.
Interceptors
A Queue-Model list for Interceptor s.
InterceptorsWrapper
A helper class to create interceptors in ease.
InternetAvailabilityReconnectionPolicy
A reconnection policy that checks for internet connectivity before allowing
reconnection. This prevents unnecessary reconnection attempts when there's no
network available.
LessOperator <T extends Object >
Less-than comparison filter.
LessOrEqualOperator <T extends Object >
Less-than-or-equal comparison filter.
LifecycleStateProvider
A utility class for monitoring application lifecycle state changes.
ListOperator <T extends Object >
Base class for list-based filter operations.
ListParam <T >
Indicates a param being used as queries or form data,
and how does it gets formatted.
LocationCoordinate
A geographic coordinate with latitude and longitude.
LoggingInterceptor
An interceptor that reports each request and the response it gets.
LogicalOperator <T extends Object >
Base class for logical filter composition.
LogInterceptor
LogInterceptor is used to print logs during network requests.
It should be the last interceptor added,
otherwise modifications by following interceptors will not be logged.
This is because the execution of interceptors is in the order of addition.
MultipartFile
An upload content that is a part of MultipartRequest.
This doesn't need to correspond to a physical file.
MutableEventEmitter <T extends StreamEvent >
A mutable event emitter with resolver support for event transformation.
MutableSharedEmitter <T >
A mutable emitter that broadcasts events to multiple listeners.
MutableStateEmitter <T >
A mutable emitter that maintains and broadcasts the current state.
NetworkStateProvider
A utility class for monitoring network connectivity changes.
Options
The configuration for a single request.
BaseOptions and Options will be merged into one RequestOptions before
sending the requests. See Options.compose .
OrOperator <T extends Object >
Logical OR filter requiring any condition to match.
PathExistsOperator <T extends Object >
Nested JSON path existence filter.
QueryOperator <T extends Object >
Full-text search filter.
QueuedInterceptor
Interceptor in queue.
QueuedInterceptorsWrapper
A helper class to create QueuedInterceptor in ease.
RawFilter <T extends Object >
A filter carrying a pre-built query this package does not model.
RedirectRecord
A record that records the redirection happens during requests,
including status code, request method, and the location.
RequestInterceptorHandler
The handler for interceptors to handle before the request has been sent.
RequestOptions
The internal request option class that is the eventual result after
BaseOptions and Options are composed.
Response <T >
The Response class contains the payload (could be transformed)
that respond from the request, and other information of the response.
ResponseBody
The response wrapper class for adapters.
ResponseInterceptorHandler
The handler for interceptors to handle after respond.
Result <T >
A discriminated union that encapsulates a successful outcome with a value of type T
or a failure with an arbitrary Object error.
RetryStrategy
Interface that encapsulates the logic for computing delays for failed actions that need to be
retried.
ServerInitiated
A disconnection that was initiated by the server.
SharedEmitter <T >
A read-only emitter that broadcasts events to multiple listeners.
Sort <T extends Object >
A sort specification that defines how to order a collection of objects.
SortComparator <T extends Object , V extends Object >
A comparator that can sort model instances by extracting comparable values.
SortField <T extends Object >
A sortable field definition that maps remote field names to local value extractors.
StateEmitter <T >
A read-only emitter that maintains and broadcasts the current state.
StaticTokenProvider
A token provider that uses a static token for a specific user.
StreamApiError
An API error response from the Stream API.
StreamAttachment
Represents a file attachment with type information.
StreamAttachmentUploader
An uploader of StreamAttachment s, sending their bytes through a
CdnClient .
StreamDateTimeConverter
A JsonConverter for the API's DateTime fields.
StreamEvent
Base interface for events that can be emitted through an EventEmitter .
StreamLogConfig
How much a Stream SDK reports, and where those records go.
StreamLogFilter
Decides which records are worth building, independently of where they end up.
StreamLogger
Writes log records under a tag.
StreamLogHandler
Where log records go.
StreamLogRecord
A single log record, as a handler receives it.
StreamWebSocketClient
A WebSocket client with connection management and event handling.
StreamWebSocketEngine <Inc , Out >
A WebSocket engine implementation that handles low-level WebSocket operations.
Success <T >
Represents successful result.
SyncTransformer
If you want to custom the transformation of request/response data,
you can provide a Transformer by your self, and replace
the transformer by setting the Dio.transformer .
SystemEnvironment
A class that represents the environment in which the Stream SDK is
running.
SystemEnvironmentManager
A manager class to handle the current SystemEnvironment .
SystemInitiated
A disconnection that was initiated by system-level conditions.
TokenManager
Loads user authentication tokens from a TokenProvider , and caches the one in use.
TokenProvider
A provider for loading user authentication tokens.
Transformer
Transformer allows changes to the request/response data before
it is sent/received to/from the server.
TypedData
A typed view of a sequence of bytes.
TypedDataList <E >
A TypedData fixed-length List -view on the bytes of buffer .
Uint16List
A fixed-length list of 16-bit unsigned integers that is viewable as a
TypedData .
Uint32List
A fixed-length list of 32-bit unsigned integers that is viewable as a
TypedData .
Uint64List
A fixed-length list of 64-bit unsigned integers that is viewable as a
TypedData .
Uint8ClampedList
A fixed-length list of 8-bit unsigned integers.
Uint8List
A fixed-length list of 8-bit unsigned integers.
UnHealthyConnection
A disconnection caused by failed connection health checks.
UploadCancelled
The upload was called off.
UploadedAttachment
Represents a successfully uploaded attachment.
UploadedFile
Represents an uploaded file result from the CDN.
UploadFailed
The upload failed with error .
UploadInProgress
The upload is on its way, progress bytes of the file sent so far.
UploadPreparing
The upload is reading the file it is about to send.
UploadProgress
How far one upload has got, in bytes.
UploadQueued
The upload is waiting for a turn, and has not started sending.
UploadSuccess
The upload made it, attachment carrying its remote urls.
User
Model for the user's info.
UserInitiated
A disconnection that was explicitly requested by the application.
UserToken
A user authentication token for Stream Core API access.
WebSocketAutomaticReconnectionPolicy
A reconnection policy that checks if automatic reconnection is enabled
based on the current state of the WebSocket connection.
WebSocketConnectionState
Represents the current state of a WebSocket connection.
WebSocketEngine <Outgoing >
Interface for WebSocket engine implementations.
WebSocketEngineListener <Incoming >
Interface for receiving WebSocket engine events.
WebSocketHealthListener
Interface for receiving WebSocket health monitoring events.
WebSocketHealthMonitor
A health monitor for WebSocket connections with ping/pong management.
WebSocketMessageCodec <Incoming , Outgoing >
Interface for WebSocket message encoding and decoding.
WebSocketOptions
Configuration options for establishing WebSocket connections.
WsAuthMessageRequest
WsEvent
WsRequest
Enums
AuthType
Represents the types of authentication available for API access.
CollectionEquality
A comparison Filter.equal makes against a field whose value holds several
elements.
DioExceptionType
The exception enumeration indicates what type of exception
has happened during requests.
FileAccessMode
The file access mode when downloading a file, corresponds to a subset of
dart:io::FileMode .
InterceptStep
The stage of a request a record came from.
LifecycleState
Enum representing the lifecycle state of the application.
ListFormat
Specifies the array format (a single parameter with multiple parameter
or multiple parameters with the same name).
and the separator for array items.
NetworkState
Enum representing the state of network connectivity.
NullOrdering
Defines how null values should be ordered in a sort operation.
Operator
Defines logical operators for combining multiple reconnection policies.
PlatformType
Enumeration of supported platform types.
ResponseType
Indicates which transformation should be applied to the response data.
SortDirection
The direction of a sort operation.
StreamLogPriority
The severity of a log record.
UserType
The user authorization type.
Mixins
OptionsMixin
The mixin class for options that provides common attributes.
Typedefs
ConnectionIdGetter
= String ? Function()
ConnectionStateEmitter
= StateEmitter <WebSocketConnectionState >
A state emitter for WebSocket connection state changes.
DefaultTransformer
= SyncTransformer
DioError
= DioException
DioError describes the exception info when a request failed.
DioErrorType
= DioExceptionType
Deprecated in favor of DioExceptionType and will be removed in future major versions.
DioExceptionReadableStringBuilder
= String Function(DioException e )
The readable string builder's signature of
DioException.readableStringBuilder .
DioMediaType
= MediaType
The type (alias) for specifying the content-type of the MultipartFile.
EventEmitter <T extends StreamEvent >
= SharedEmitter <T >
A read-only event emitter constrained to StreamEvent subtypes.
EventResolver <T extends StreamEvent >
= T? Function(T event )
A function that inspects an event and optionally transforms it.
FilterFieldValueGetter <T , V >
= V? Function(T )
Function that extracts a field value from a model instance.
The signature that iterates header fields.
InterceptorErrorCallback
= void Function(DioException error , ErrorInterceptorHandler handler )
The signature of Interceptor.onError .
InterceptorSendCallback
= void Function(RequestOptions options , RequestInterceptorHandler handler )
The signature of Interceptor.onRequest .
InterceptorSuccessCallback
= void Function(Response response , ResponseInterceptorHandler handler )
The signature of Interceptor.onResponse .
JsonDecodeCallback
= FutureOr Function(String )
The callback definition for decoding a JSON string.
JsonEncodeCallback
= FutureOr <String > Function(Object )
The callback definition for encoding a JSON object.
LifecycleStateEmitter
= StateEmitter <LifecycleState >
A type alias for a state emitter that emits LifecycleState values.
LogPrint
= void Function(InterceptStep step , Object object )
Takes one line of the log, in place of the logger.
MutableConnectionStateEmitter
= MutableStateEmitter <WebSocketConnectionState >
A mutable state emitter for WebSocket connection state changes.
NetworkStateEmitter
= StateEmitter <NetworkState >
A type alias for a state emitter that emits NetworkState values.
OnTokenUpdated
= void Function(UserToken token )
A callback invoked whenever the manager caches a newly loaded token.
PingRequestBuilder
= WsRequest Function([HealthCheckInfo ? info ])
A function that builds ping requests for health checks.
ProgressCallback
= void Function(int count , int total )
The type of a progress listening callback when sending or receiving data.
RequestEncoder
= FutureOr <List <int > > Function(String request , RequestOptions options )
The type of a request encoding callback.
ResponseDecoder
= FutureOr <String ? > Function(List <int > responseBytes , RequestOptions options , ResponseBody responseBody )
The type of a response decoding callback.
SortFieldComparator <T >
= int Function(T? a , T? b , SortDirection direction , NullOrdering nullOrdering )
A comparator function that compares two instances of type T based on
a specified field, sort direction, and null ordering.
SortFieldValueGetter <T , V >
= V? Function(T )
Signature for a function that retrieves a sortable field value of type V from
an instance of type T.
StreamLogCallback
= void Function(StreamLogRecord record )
Receives a log record on behalf of a StreamLogHandler.from handler.
StreamLogMessage
= String Function()
Builds a log message on demand.
UserTokenLoader
= Future <UserToken > Function(String userId )
A function that loads user tokens.
ValidateStatus
= bool Function(int ? status )
The type of a response status code validate callback.
WebSocketAuthenticator
= Future <void > Function(WsRequestSender send , StreamApiException ? previousError )
A function that authenticates a newly opened connection.
WebSocketOptionsBuilder
= WebSocketOptions Function()
A function that builds the options for a connection attempt.
WebSocketOptionsProvider
= FutureOr <WebSocketOptions > Function(StreamApiException ? previousError )
A function supplying the options for a connection attempt.
WebSocketProvider
= WebSocketChannel Function(WebSocketOptions options )
Signature for a function that creates a WebSocketChannel based on WebSocketOptions .
WsRequestSender
= Result <void > Function(WsRequest request )
A function that sends a request over a connection that is not usable yet.