PhysicalKeyboardKey constructor Null safety

const PhysicalKeyboardKey(
  1. int usbHidUsage,
  2. {String? debugName}
)

Creates a PhysicalKeyboardKey object with an optional debug name.

The usbHidUsage must not be null.

To save executable size, it is recommended that the debugName be null in release mode. You can do this using the kReleaseMode constant.
const PhysicalKeyboardKey(0x0000ffff, debugName: kReleaseMode ? null : 'Special Key')

Implementation

const PhysicalKeyboardKey(this.usbHidUsage, {this.debugName})
    : assert(usbHidUsage != null);