LikeOfflineSyncInterceptor class
Queues explicitly eligible mutation requests after ambiguous network errors.
Durable work is application-owned and is never used for GET/UI refreshes.
Constructors
-
LikeOfflineSyncInterceptor({required Dio dio, required Box queueBox, LikeAuthConfig? authConfig, LikeReplayCodec codec = const DefaultLikeReplayCodec(), bool autoSchedule = false, LikeSessionScope currentSession()?, FutureOr<
void> notifyRefresh(String path)?})
Properties
- authConfig → LikeAuthConfig?
-
final
- autoSchedule → bool
-
final
- codec → LikeReplayCodec
-
final
- currentSession → LikeSessionScope Function()
-
final
- dio → Dio
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- queueKeys → List
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
taskChanges
→ Stream<
List< LikeOfflineTask> > -
no setter
-
tasks
→ List<
LikeOfflineTask> -
no setter
Methods
-
cancelSync(
{String? origin, String reason = 'Offline sync cancelled'}) → void - Cancels active drains without deleting pending durable entries.
-
cancelTask(
dynamic key) → Future< void> -
dispose(
) → Future< void> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onError(
DioException err, ErrorInterceptorHandler handler) → Future< void> - Called when an exception was occurred during the request.
-
onRequest(
RequestOptions options, RequestInterceptorHandler handler) → void - Called when the request is about to be sent.
-
onResponse(
Response response, ResponseInterceptorHandler handler) → void -
Called when the response is about to be resolved.
inherited
-
resume(
) → void -
retryTask(
dynamic key) → Future< void> -
syncQueue(
{String? origin}) → Future< void> -
Joins or starts a drain, optionally restricted to one canonical
origin. -
syncSingle(
dynamic key, {CancelToken? cancelToken}) → Future< void> - Replays one queued entry. Failures remain observable to the drain caller.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- queueSchemaVersion → const int