stateAction function
Send a state action to a NyState or NyPage in your application.
Provide the state
and the action
you want to send.
Implementation
stateAction(String action, {required dynamic state, dynamic data}) {
updateState(state, data: {"action": action, "data": data});
}