fromMap static method

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

Construct from Map.

Implementation

static PremiumLimit? 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 type = PremiumLimitType.fromMap(_map['type'])!;
  var default_value = _map['default_value']! as int;
  var premium_value = _map['premium_value']! as int;
  return PremiumLimit(
    extra: extra,
    clientId: clientId,
    type: type,
    default_value: default_value,
    premium_value: premium_value,
  );
}