TsdtechUiConfig class

Global configuration for the TSDTech SDK UI package.

Call TsdtechUiConfig.initialize once at app startup before using any widgets or screens from this package.

void main() {
  TsdtechUiConfig.initialize(
    baseUrl: 'https://api.yourapp.com',
    apiKey: 'your-api-key',
  );
  runApp(const MyApp());
}

Properties

apiKey ↔ String?
Optional API key used to authenticate requests.
latefinal
baseUrl ↔ String?
Base URL of the TSDTech backend (SPA endpoint).
latefinal
gatewayBaseUrl ↔ String?
Optional base URL of the payment gateway. Defaults to baseUrl when null.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
locale ↔ TsdtechLocale
Locale used for all TSDTech UI copy. Defaults to TsdtechLocale.pt.
latefinal
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stage ↔ Environment?
latefinal
theme ↔ TsdtechThemeData
Theme applied to all TSDTech UI widgets.
latefinal

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

Static Properties

instance → TsdtechUiConfig
The singleton instance. Throws if initialize has not been called yet.
no setter
isInitialized → bool
Whether initialize has been called.
no setter

Static Methods

initialize({String? baseUrl, String? gatewayBaseUrl, String? apiKey, TsdtechThemeData? theme, TsdtechLocale locale = TsdtechLocale.pt, Environment? stage}) → void
Initializes the global TSDTech UI configuration.
reset() → void
Resets the configuration. Intended for use in tests only.