updatePageState method

void updatePageState(
  1. String action,
  2. dynamic data
)

Updates the page state Provide an action and data to call a method in the NyState.

Implementation

void updatePageState(String action, dynamic data) {
  assert(state != null, "State cannot be null");
  if (state == null) return;
  updateState(state!, data: {"action": action, "data": data});
}