IntelliToggleOptions class

Configuration options for the IntelliToggle provider

Defines connection settings, timeouts, polling behavior, and other provider-specific configuration options.

Example usage:

final options = IntelliToggleOptions(
  baseUri: Uri.parse('https://custom.intellitoggle.com'),
  timeout: Duration(seconds: 5),
  enablePolling: true,
);

Constructors

IntelliToggleOptions({Uri? baseUri, Duration? timeout, Map<String, String>? headers, bool? enablePolling, Duration? pollingInterval, bool? enableStreaming, int? maxRetries, Duration? retryDelay, bool? enableLogging, Duration? initializationTimeout, Duration? cacheTtl, String? userAgent, bool? useOfrep, Uri? ofrepBaseUri, String? ofrepAuthToken})
Creates a new IntelliToggleOptions instance
IntelliToggleOptions.development({Uri? baseUri, Duration? timeout})
Create options optimized for development/testing
factory
IntelliToggleOptions.fromEnvironment()
Build options from environment variables. Intended for ops-driven config.
factory
IntelliToggleOptions.production({Uri? baseUri, Duration? timeout, Duration? pollingInterval})
Create options optimized for production
factory

Properties

baseUri Uri
Base URI for the IntelliToggle API
final
cacheTtl Duration
Cache TTL for flag evaluations (client-side caching)
final
enableLogging bool
Enable request/response logging for debugging
final
enablePolling bool
Enable automatic polling for configuration changes
final
enableStreaming bool
Enable streaming updates via Server-Sent Events (SSE)
final
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
Additional HTTP headers to include with requests
final
initializationTimeout Duration
Maximum time to wait for provider initialization
final
maxRetries int
Maximum number of retry attempts for failed HTTP requests
final
ofrepAuthToken String?
Optional OFREP-specific auth token; falls back to provider credentials
final
ofrepBaseUri Uri?
Base URI for OFREP endpoint when useOfrep is true
final
pollingInterval Duration
Interval between polling requests for configuration changes
final
retryDelay Duration
Delay between retry attempts
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timeout Duration
Timeout duration for HTTP requests
final
useOfrep bool
Enable OFREP remote evaluation protocol
final
userAgent String
User agent string for HTTP requests
final

Methods

clearFlagCache() → void
copyWith({Uri? baseUri, Duration? timeout, Map<String, String>? headers, bool? enablePolling, Duration? pollingInterval, bool? enableStreaming, int? maxRetries, Duration? retryDelay, bool? enableLogging, Duration? initializationTimeout, Duration? cacheTtl, String? userAgent, bool? useOfrep, Uri? ofrepBaseUri, String? ofrepAuthToken}) IntelliToggleOptions
Create a copy of this options object with modified values
getCachedFlag(String cacheKey) → dynamic
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setCachedFlag(String cacheKey, dynamic value, Duration ttl) → void
toString() String
A string representation of this object.
inherited

Operators

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