locale property

Locale locale
getter/setter pair

The current locale setting for the SDK.

This setting determines the language and regional preferences used throughout the SDK for text, formatting, and localization.

Default Value

English locale (en) is used as the default

Supported Locales

  • English: en - Default language
  • Arabic: ar - Right-to-left language support

Example

// Set to Arabic
AmwalSdkSettingContainer.locale = const Locale('ar');

// Set to English
AmwalSdkSettingContainer.locale = const Locale('en');

// Check current locale
if (AmwalSdkSettingContainer.locale.languageCode == 'ar') {
  // Handle Arabic-specific logic
}

Implementation

///
  /// This setting determines the language and regional preferences
  /// used throughout the SDK for text, formatting, and localization.
  ///
  /// ## Default Value
  /// English locale (`en`) is used as the default
  ///
  /// ## Supported Locales
  /// - **English**: `en` - Default language
  /// - **Arabic**: `ar` - Right-to-left language support
  ///
  /// ## Example
  /// ```dart
  /// // Set to Arabic
  /// AmwalSdkSettingContainer.locale = const Locale('ar');
  ///
  /// // Set to English
  /// AmwalSdkSettingContainer.locale = const Locale('en');
  ///
  /// // Check current locale
  /// if (AmwalSdkSettingContainer.locale.languageCode == 'ar') {
  ///   // Handle Arabic-specific logic
  /// }
  /// ```
  static Locale locale = const Locale('en');