KoolbaseConfig class
Configuration for the Koolbase SDK.
Constructors
-
KoolbaseConfig({required String publicKey, required String baseUrl, Duration refreshInterval = const Duration(seconds: 60), String codePushChannel = 'stable', MandatoryUpdateCallback? onMandatoryUpdate, List<
KoolbaseRfwWidget> rfwWidgets = const [], bool analyticsEnabled = true, bool messagingEnabled = true, Duration authTimeout = const Duration(seconds: 10), Client? httpClient}) -
const
Properties
- analyticsEnabled → bool
-
Whether to enable analytics (default: true)
final
- authTimeout → Duration
-
Timeout applied to every authentication HTTP request. Default 10s.
Tune up for high-latency networks; tune down for fast-fail UX.
final
- baseUrl → String
-
final
- codePushChannel → String
-
The code push channel to subscribe to (default: stable)
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- httpClient → Client?
-
Optional HTTP client used for authentication requests. If provided,
the SDK will use it instead of constructing its own — letting you add
logging, retry middleware, proxy configuration, or share a single
client across your app. The SDK will NOT close a caller-supplied
client; the caller owns its lifecycle.
final
- messagingEnabled → bool
-
Whether to enable cloud messaging (default: true)
final
- onMandatoryUpdate → MandatoryUpdateCallback?
-
Optional callback fired when a mandatory code-push bundle has been
staged and is awaiting application on the next cold launch. Use it to
prompt the user to restart so the required update takes effect. The
SDK also exposes
Koolbase.codePush.hasMandatoryUpdatefor polling.final - publicKey → String
-
Your environment public key (e.g. pk_live_xxxx or pk_test_xxxx)
final
- refreshInterval → Duration
-
How often the SDK refreshes the bootstrap payload in the background.
final
-
rfwWidgets
→ List<
KoolbaseRfwWidget> -
Custom rfw widgets to register beyond the defaults
final
- 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