PagingResult<T>.fromJSON constructor

PagingResult<T>.fromJSON(
  1. Map<String, dynamic> json,
  2. T mapper(
    1. Map<String, dynamic>
    )
)

Implementation

PagingResult.fromJSON(
    Map<String, dynamic> json, T Function(Map<String, dynamic>) mapper) {
  if (json['entries'] != null) {
    var rawList = (json['entries'] as List<dynamic>);
    if (rawList.isNotEmpty) {
      entries = rawList.map((e) => mapper(e)).toList();
    }
  }
  next = json['next'];
}