initialize static method
void
initialize({
- String? baseUrl,
- String? gatewayBaseUrl,
- String? apiKey,
- TsdtechThemeData? theme,
- TsdtechLocale locale = TsdtechLocale.pt,
- Environment? stage,
Initializes the global TSDTech UI configuration.
Parameters:
baseUrl: Required. Backend SPA base URL.gatewayBaseUrl: Optional. Payment gateway URL.apiKey: Optional. API key for authenticated requests.theme: Optional. Custom TsdtechThemeData. Defaults to TsdtechThemeData.light.locale: Optional. UI locale. Defaults to TsdtechLocale.pt.
Implementation
static void initialize({
String? baseUrl,
String? gatewayBaseUrl,
String? apiKey,
TsdtechThemeData? theme,
TsdtechLocale locale = TsdtechLocale.pt,
Environment? stage,
}) {
// assert(baseUrl.isNotEmpty, 'baseUrl must not be empty.');
_instance = TsdtechUiConfig._()
..baseUrl = baseUrl
..gatewayBaseUrl = gatewayBaseUrl
..apiKey = apiKey
..theme = theme ?? TsdtechThemeData.light()
..locale = locale
..stage = stage;
}