onNotify method

void onNotify(
  1. String message, {
  2. int? what,
  3. Object? data,
})

通知事件 用于 view model 主动调用。 message 消息说明,相当于注释吧。 what 可自定义消息标记 data 携带的数据

Implementation

void onNotify(String message, {int? what, Object? data}) {
  if (message == "_finish_current_page") {
    context.navigator.pop(data);
  }
}