fromMap static method

PhoneNumberAuthenticationSettings? fromMap(
  1. Map<String, dynamic>? _map
)
override

Construct from Map.

Implementation

static PhoneNumberAuthenticationSettings? fromMap(
    Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  if (_ != CONSTRUCTOR) return null;
  var extra = _map['@extra'];
  var clientId = _map['@clientId'];
  var allow_flash_call = _map['allow_flash_call']! as bool;
  var allow_missed_call = _map['allow_missed_call']! as bool;
  var is_current_phone_number = _map['is_current_phone_number']! as bool;
  var allow_sms_retriever_api = _map['allow_sms_retriever_api']! as bool;
  var firebase_authentication_settings =
      FirebaseAuthenticationSettings.fromMap(
          _map['firebase_authentication_settings']);
  var authentication_tokens = List<String>.from(
    (_map["authentication_tokens"] ?? []).map(
      (e) => e as String,
    ),
  );
  return PhoneNumberAuthenticationSettings(
    extra: extra,
    clientId: clientId,
    allow_flash_call: allow_flash_call,
    allow_missed_call: allow_missed_call,
    is_current_phone_number: is_current_phone_number,
    allow_sms_retriever_api: allow_sms_retriever_api,
    firebase_authentication_settings: firebase_authentication_settings,
    authentication_tokens: authentication_tokens,
  );
}