onKeyData property Null safety

  1. @override
KeyDataCallback? onKeyData
override

A callback that is invoked when key data is available.

The framework invokes this callback in the same zone in which the callback was set.

The callback should return true if the key event has been handled by the framework and should not be propagated further.

Implementation

@override
ui.KeyDataCallback? get onKeyData => _platformDispatcher.onKeyData;
  1. @override
void onKeyData=(KeyDataCallback? onKeyData)
override

Implementation

@override
set onKeyData(ui.KeyDataCallback? onKeyData) {
  _platformDispatcher.onKeyData = onKeyData;
}