DataSourceState enum

Inheritance

Constructors

DataSourceState()
const

Values

initializing → const DataSourceState

The initial state of the data source when the SDK is being initialized.

If it encounters an error that requires it to retry initialization, the state will remain at kInitializing until it either succeeds and becomes valid, or permanently fails and becomes shutdown.

valid → const DataSourceState

Indicates that the data source is currently operational and has not had any problems since the last time it received data.

In streaming mode, this means that there is currently an open stream connection and that at least one initial message has been received on the stream. In polling mode, it means that the last poll request succeeded.

interrupted → const DataSourceState

Indicates that the data source encountered an error that it will attempt to recover from.

In streaming mode, this means that the stream connection failed, or had to be dropped due to some other error, and will be retried after a backoff delay. In polling mode, it means that the last poll request failed, and a new poll request will be made after the configured polling interval.

setOffline → const DataSourceState

Indicates that the application has told the SDK to stay offline.

shutdown → const DataSourceState

Indicates that the data source has been permanently shut down.

This could be because it encountered an unrecoverable error (for instance, the LaunchDarkly service rejected the SDK key; an invalid SDK key will never become valid), or because the SDK client was explicitly shut down.

networkUnavailable → const DataSourceState

Indicates that the SDK is aware of a lack of network connectivity.

On mobile devices, if wi-fi is turned off or there is no wi-fi connection and cellular data is unavailable, the device OS will tell the SDK that the network is unavailable. The SDK then enters this state, where it will not try to make any network connections since they would be guaranteed to fail, until the OS informs it that the network is available again.

This functionality is not provided by the base Dart SDK, but instead is a feature enabled by the flutter SDK. The base Dart SDK cannot detect network status and therefore the interrupted state will be entered when network requests fail from a lack of network availability.

backgroundDisabled → const DataSourceState

Indicates that the SDK is in background mode and background updating has been disabled.

On mobile devices, if the application containing the SDK is put into the background, by default the SDK will still check for feature flag updates occasionally. However, if this has been disabled, the SDK will instead stop the data source and wait until it is in the foreground again. During that time, the state is backgroundDisabled.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
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
toString() String
A string representation of this object.
inherited

Operators

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

Constants

values → const List<DataSourceState>
A constant List of the values in this enum, in order of their declaration.