handleMessage method
void
handleMessage(
- A2uiMessage message
Records message and hands it to the controller.
Implementation
void handleMessage(core.A2uiMessage message) {
final JsonMap json = message.toJson();
_steps.add(GenUiMessageStep(_clock.elapsed, json));
controller.handleMessage(message);
// A surface can only be watched once it exists, which is after the
// controller has handled the message that creates it.
if ((json['createSurface'] as Map?)?['surfaceId'] case final String id) {
_watchData(id);
}
}