CurrencyList.fromMap constructor

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

Implementation

factory CurrencyList.fromMap(Map<String, dynamic> map) {
    return CurrencyList(
        total: (map['total'] is String) ?
                    int.tryParse(map['total']) ?? 0:map['total'] ?? 0,
        currencies: List<Currency>.from(map['currencies'].map((p) => Currency.fromMap(p))),
    );
}