RawKeyEventDataLinux constructor Null safety

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

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,
  this.specifiedLogicalKey,
}) : assert(scanCode != null),
     assert(unicodeScalarValues != null),
     assert((unicodeScalarValues & ~LogicalKeyboardKey.valueMask) == 0),
     assert(keyCode != null),
     assert(modifiers != null),
     assert(keyHelper != null);