onSetState method
Implementation
Future<SilentActionResult> onSetState(
NodeSpec action, ActionContext context) async {
final newState = Map<String, dynamic>.from(action.props["newState"] ?? {});
try {
BlocProvider.of<LocalBloc>(context.buildContext)
.add(EmitState(SetStateState(newState)));
} catch (e, stack) {
log.severe("LocalBloc not found while emitting SetState.", e, stack);
}
return SilentActionResult(true, returnData: newState);
}