onEvent method
void
onEvent(
- AFScreenID screen,
- AFID widget,
- dynamic param,
- AFFlexibleStateView? stateView,
- AFPressedDelegate? onSuccess,
Implementation
void onEvent(AFScreenID screen, AFID widget, dynamic param, AFFlexibleStateView? stateView, AFPressedDelegate? onSuccess) {
final context = AFWireframeExecutionContext(
screen: screen,
widget: widget,
eventParam: param,
wireframe: this,
stateView: stateView
);
final handled = body(context);
if(!handled && !enableUINavigation) {
if(context.isWidget(AFUIWidgetID.buttonBack)) {
context.navigatePop();
}
}
if(onSuccess != null) {
onSuccess();
}
}