SdkProfile class

Controls the SDK's built-in offline cache and request queue behavior.

The current implementation uses offlineEnabled and queueWritesWhenOffline during request execution. Auto-flush settings are currently limited to a single queue flush during SDK initialization.

Constructors

SdkProfile.new({required bool offlineEnabled, required bool queueWritesWhenOffline, bool autoFlushQueue = false, Duration? flushInterval, @Deprecated('Use autoFlushQueue + flushInterval instead.') bool autoFlushOnInit = false})
Creates a runtime profile for offline and queueing behavior.
const
SdkProfile.defaultSecure()
Creates a profile with offline features disabled.
factory
SdkProfile.offlineFirstSecure()
Creates a profile that enables offline caching and offline write queueing.
factory

Properties

autoFlushOnInit bool
Whether the queue should be flushed once during initialization.
final
autoFlushQueue bool
Requests automatic queue flushing behavior.
final
flushInterval Duration?
Optional interval for future auto-flush scheduling.
final
hashCode int
The hash code for this object.
no setterinherited
offlineEnabled bool
Enables offline cache lookup for failed GET requests.
final
queueWritesWhenOffline bool
Queues non-GET requests when a network failure occurs.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shouldFlushOnceOnInit bool
Whether startup should trigger a one-time queue flush.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited