fromMap static method

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

Construct from Map.

Implementation

static SetCustomLanguagePack? 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 info = LanguagePackInfo.fromMap(_map['info'])!;
  var strings = List<LanguagePackString>.from(
    (_map["strings"] ?? []).map(
      (e) => LanguagePackString.fromMap(e),
    ),
  );
  return SetCustomLanguagePack(
    extra: extra,
    clientId: clientId,
    info: info,
    strings: strings,
  );
}