CardInfo class
Represents card information obtained from NFC scanning or manual input.
This class contains all the necessary card details required for payment processing, including card number, expiry date, and cardholder information.
Constructors
- CardInfo.new({required bool success, required String? cardData, required String? cardNumber, required String? cardExpiry, required String? holderFirstname, required String? holderLastname})
- Creates a new CardInfo instance.
-
CardInfo.fromJson(Map<
String, dynamic> json) -
Creates a CardInfo instance from a JSON object.
factory
Properties
- cardData → String?
-
Raw card data obtained from NFC scanning (optional).
final
- cardExpiry → String?
-
Card expiry date in MM/YY format.
final
- cardNumber → String?
-
The card number, typically 16 digits for most card types.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- holderFirstname → String?
-
Cardholder's first name as it appears on the card.
final
- holderLastname → String?
-
Cardholder's last name as it appears on the card.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- success → bool
-
Indicates whether the card information was successfully obtained.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts this CardInfo instance to a JSON object.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited