getModifierSide method Null safety
- ModifierKey key
override
Returns a KeyboardSide enum value that describes which side or sides of the given keyboard modifier key were pressed at the time of this event.
If the modifier key wasn't pressed at the time of this event, returns null. If the given key only appears in one place on the keyboard, returns KeyboardSide.all if pressed. If the given platform does not specify the side, return KeyboardSide.any.
Implementation
@override
KeyboardSide getModifierSide(ModifierKey key) {
// On Web, we don't distinguish the sides of modifier keys. Both left shift
// and right shift, for example, are reported as the "Shift" modifier.
//
// See <https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState>
// for more information.
return KeyboardSide.any;
}