CardData class

Represents the details of a payment card.

This class stores essential card information such as brand, last four digits, expiration date, and the cardholder’s name.

Constructors

CardData({required String id, required String brand, required String last4, required String expYear, required String expMonth, required String name, String? addressZip})
Creates a new instance of CardData.
CardData.fromJson(Map<String, dynamic> json)
Parses a CardData object from a JSON map.
factory

Properties

addressZip String?
The ZIP code associated with the card's billing address (optional).
final
brand String
The brand of the card (e.g., Visa, MasterCard).
final
expMonth String
The expiration month of the card.
final
expYear String
The expiration year of the card.
final
hashCode int
The hash code for this object.
no setterinherited
id String
The unique identifier for the card.
final
last4 String
The last four digits of the card number.
final
name String
The name of the cardholder.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts the CardData object to a JSON map.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited