UserIdentityFeatureConfig constructor

UserIdentityFeatureConfig(
  1. String appName,
  2. int? authTimeout,
  3. bool? showLogoutOnTitleBar,
  4. String? allowedEmailDomains,
  5. String? allowedEmailExample,
  6. bool? mobileNumberRequired,
  7. bool? mobileDialCodeReadOnly,
  8. String? mobileNumberCountryCode,
  9. UserCustomProfileInputConfig? customProfileInput,
)

Implementation

UserIdentityFeatureConfig(
  this.appName,
  int? authTimeout,
  bool? showLogoutOnTitleBar,
  this.allowedEmailDomains,
  this.allowedEmailExample,
  bool? mobileNumberRequired,
  bool? mobileDialCodeReadOnly,
  String? mobileNumberCountryCode,
  this.customProfileInput,
)   : showLogoutOnTitleBar = showLogoutOnTitleBar ?? false,
      mobileNumberRequired = mobileNumberRequired ?? true,
      mobileDialCodeReadOnly = mobileDialCodeReadOnly ?? false {
  // Determine country code for mobile number
  // from locale if not explicitly provided
  if (mobileNumberCountryCode == null) {
    final locale = Intl.getCurrentLocale();
    this.mobileNumberCountryCode = locale.substring(locale.length - 2);
  } else {
    this.mobileNumberCountryCode = mobileNumberCountryCode;
  }
  // Default auth timeout to 15 minutes
  this.authTimeout = authTimeout ?? 15;
}