DataHandlerInterceptor class abstract
Interceptor interface for cross-cutting concerns across all DataHandler instances.
Implement this to inject app-wide behavior such as:
- Analytics / performance tracking
- Automatic authentication handling (e.g. redirect on 401 Unauthorized)
- Centralized debug logging and diagnostics
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onError(
DataHandler handler, dynamic error) → void - Called when an error occurs during data handling
-
onRequest(
DataHandler handler) → void - Called when a data operation starts loading
-
onStateChanged(
DataHandler handler, DataState oldState, DataState newState) → void -
Called whenever a DataHandler transitions from
oldStatetonewState -
onSuccess(
DataHandler handler, dynamic data) → void -
Called when a data operation succeeds with
data -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited