InternalCard.fromJson constructor

InternalCard.fromJson(
  1. Object? json
)

Implementation

factory InternalCard.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return InternalCard(
    brand: map['brand'] == null ? null : (map['brand'] as String),
    country: map['country'] == null ? null : (map['country'] as String),
    expMonth:
        map['exp_month'] == null ? null : (map['exp_month'] as num).toInt(),
    expYear:
        map['exp_year'] == null ? null : (map['exp_year'] as num).toInt(),
    last4: map['last4'] == null ? null : (map['last4'] as String),
  );
}