supportedPointerKinds property

Set<PointerDeviceKind> supportedPointerKinds

Returns a set of PointerDeviceKind that represents the currently supported devices, depending on ScribbleState.allowedPointersMode.

Implementation

Set<PointerDeviceKind> get supportedPointerKinds {
  switch (allowedPointersMode) {
    case ScribblePointerMode.all:
      return Set.from(PointerDeviceKind.values);
    case ScribblePointerMode.mouseOnly:
      return const {PointerDeviceKind.mouse};
    case ScribblePointerMode.penOnly:
      return const {
        PointerDeviceKind.stylus,
        PointerDeviceKind.invertedStylus,
      };
    case ScribblePointerMode.mouseAndPen:
      return const {
        PointerDeviceKind.mouse,
        PointerDeviceKind.stylus,
        PointerDeviceKind.invertedStylus,
      };
  }
}