nthStylusButton function Null safety

int nthStylusButton(
  1. int number
)

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

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

See kPrimaryStylusButton and kSecondaryStylusButton for semantic names for some stylus buttons.

Implementation

int nthStylusButton(int number) => (kPrimaryStylusButton << (number - 1)) & kMaxUnsignedSMI;