SimpleListResponse<T>.fromJson constructor

SimpleListResponse<T>.fromJson(
  1. Map<String, dynamic> json,
  2. T objectMapper(
    1. Map<String, dynamic>
    )
)

Implementation

factory SimpleListResponse.fromJson(
  Map<String, dynamic> json,
  T Function(Map<String, dynamic>) objectMapper,
) =>
    SimpleListResponse(
      totalCount: json["TotalCount"] as int,
      items: List<T>.from((json["Items"] as List<Map<String, dynamic>>)
          .map<T>((model) => objectMapper(model))),
    );