History.fromJson constructor

History.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory History.fromJson(Map<String, dynamic> json) {
  return History(
    events: (json['events'] as List)
        .whereNotNull()
        .map((e) => HistoryEvent.fromJson(e as Map<String, dynamic>))
        .toList(),
    nextPageToken: json['nextPageToken'] as String?,
  );
}