CurrencyList.fromMap constructor

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

Implementation

factory CurrencyList.fromMap(
  Map<String, dynamic> map,
) {
  map = {
    'total': 0,
    'currencies': [],
    ...map,
  };

  return CurrencyList(
    total: map['total'],
    currencies: List<Currency>.from(
      map['currencies'].map((p) => Currency.fromMap(p)),
    ),
  );
}