NesKeyIcon constructor

const NesKeyIcon({
  1. Key? key,
  2. required String buttonKey,
  3. bool pressed = false,
  4. Size? size,
})

A pressable icon, representing a single key.

This widget by itself doesn't handle touch/key events use it in combination with other widgets to make it interactive.

Implementation

const NesKeyIcon({
  super.key,
  required this.buttonKey,
  this.pressed = false,
  this.size,
}) : assert(buttonKey.length == 1, 'buttonKey must be a single character');