nthMouseButton function Null safety

int nthMouseButton (
  1. int number

The bit of PointerEvent.buttons that corresponds to the nth mouse button.

The number argument can be at most 62 in Flutter for mobile and desktop, and at most 32 on Flutter for web.

See kPrimaryMouseButton, kSecondaryMouseButton, kMiddleMouseButton, kBackMouseButton, and kForwardMouseButton for semantic names for some mouse buttons.


int nthMouseButton(int number) => (kPrimaryMouseButton << (number - 1)) & kMaxUnsignedSMI;