RawKeyEventDataLinux constructor Null safety

const RawKeyEventDataLinux(
  1. {required KeyHelper keyHelper,
  2. int unicodeScalarValues,
  3. int scanCode,
  4. int keyCode,
  5. int modifiers,
  6. required bool isDown}
)

Creates a key event data structure specific for Linux.

The keyHelper, scanCode, unicodeScalarValues, keyCode, and modifiers, arguments must not be null.

Implementation

const RawKeyEventDataLinux({
  required this.keyHelper,
  this.unicodeScalarValues = 0,
  this.scanCode = 0,
  this.keyCode = 0,
  this.modifiers = 0,
  required this.isDown,
}) : assert(scanCode != null),
     assert(unicodeScalarValues != null),
     assert((unicodeScalarValues & ~LogicalKeyboardKey.valueMask) == 0),
     assert(keyCode != null),
     assert(modifiers != null),
     assert(keyHelper != null);