PurchaseModel.fromMap constructor

PurchaseModel.fromMap(
  1. Map<String, dynamic> data
)

Implementation

factory PurchaseModel.fromMap(Map<String, dynamic> data) => PurchaseModel(
      totalcount: data['totalcount'] as int?,
      data: (data['data'] as List<dynamic>?)
          ?.map((e) => Datum.fromMap(e as Map<String, dynamic>))
          .toList(),
    );