CardData.fromJson constructor
Implementation
factory CardData.fromJson(Map<String, dynamic> json) {
return CardData(
id: json['id'],
brand: json['brand'],
last4: json['last_4'],
expYear: json['exp_year'].toString(),
expMonth: json['exp_month'].toString(),
name: json['name'],
addressZip: json['address_zip'], // Can be null
);
}