Wallet.fromMap constructor

Wallet.fromMap(
  1. Map<String, dynamic> map
)

Constructs a Wallet object from a map.

Implementation

factory Wallet.fromMap(Map<String, dynamic> map) {
  return Wallet(
    isDefaultPaymentMethod: map['isDefaultPaymentMethod'] ?? false,
    paymentToken: map['paymentToken'] ?? '',
    walletType: getWalletType(map['walletType']),
  );
}