fromJson static method

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

Implementation

static ListViewAction fromJson(Map<String, dynamic> json) {
  if (json['type'] == 'scroll_to_index') {
    return ScrollToIndexAction.fromJson(json);
  }
  if (json['type'] == 'reorder') {
    return ReorderListViewAction.fromJson(json);
  }
  throw Exception('Unknown action type');
}