cancel method

  1. @override
Future<void> cancel()
override

the SimpleFrameApp subclass implements application-specific code

Implementation

@override
Future<void> cancel() async {
  // remove the displayed image
  await frame!.sendMessage(TxCode(msgCode: 0x10, value: 1));
  _image = null;

  currentState = ApplicationState.ready;
  if (mounted) setState(() {});
}