Options class

Options for configuring the Flipt client.

Annotations
  • @JsonSerializable.new()

Constructors

Options({String? url = 'http://localhost:8080', String? environment = 'default', String? namespace = 'default', String? reference, Duration? requestTimeout, Duration? updateInterval = const Duration(seconds: 120), Map<String, dynamic>? authentication, FetchMode? fetchMode = FetchMode.polling, ErrorStrategy? errorStrategy = ErrorStrategy.fail, String? snapshot})
Options.fromJson(Map<String, dynamic> json)
factory

Properties

authentication Map<String, dynamic>?
Authentication options (client_token or jwt_token).
final
environment String?
The environment to use (default: 'default').
final
errorStrategy ErrorStrategy?
The error strategy to use (fail or fallback).
final
fetchMode FetchMode?
The fetch mode to use (polling or streaming). Note: Streaming is only supported when using the SDK with Flipt Cloud (https://flipt.io/cloud) or Flipt v2 (https://docs.flipt.io/v2)
final
hashCode int
The hash code for this object.
no setterinherited
namespace String?
The namespace to use (default: 'default').
final
reference String?
The reference to use for fetching flag state.
final
requestTimeout Duration?
The request timeout duration.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
snapshot String?
The initial snapshot to use for the client.
final
updateInterval Duration?
The update interval duration (default: 120 seconds).
final
url String?
The Flipt server URL (default: 'http://localhost:8080').
final

Methods

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

Operators

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

Static Methods

withClientToken(String token, {String? environment, String? namespace, String? url, String? reference, Duration? requestTimeout, Duration? updateInterval, FetchMode? fetchMode, ErrorStrategy? errorStrategy}) Options
withJwtToken(String token, {String? url, String? environment, String? namespace, String? reference, Duration? requestTimeout, Duration? updateInterval, FetchMode? fetchMode, ErrorStrategy? errorStrategy}) Options