handleStaticData method

PageLoadedState handleStaticData(
  1. LoadPageActionEvent event
)

Implementation

PageLoadedState handleStaticData(LoadPageActionEvent event) {
  if (event.page > 1) {
    return PageLoadedState(event.page, event.fullData, false);
  }

  final List data = event.action.props["data"] ?? [];
  if (parseBool(event.action.props["shuffle"])) {
    data.shuffle();
  }
  return PageLoadedState(event.page, data, false);
}