fromJson static method
Implementation
static PageViewControllerAction fromJson(Map<String, dynamic> json) {
if (json['type'] == 'page_controller_next') {
return PageViewControllerNextPage(
id: json['id'],
controllerID: json['controller_id'],
);
}
if (json['type'] == 'page_controller_previous') {
return PageViewControllerPreviousPage(
id: json['id'],
controllerID: json['controller_id'],
);
}
throw Exception('Unknown action type');
}