pointer_input.dart 651 B

1234567891011121314151617181920212223242526272829
  1. enum PointerInput {
  2. /// Taps / buttons presses & releases.
  3. tap,
  4. /// Scroll / mouse wheels events.
  5. scroll,
  6. /// Drag events, a pointer is in a down state and dragged across the terminal.
  7. drag,
  8. /// Move events, a pointer is in an up state and moved across the terminal.
  9. move,
  10. }
  11. class PointerInputs {
  12. final Set<PointerInput> inputs;
  13. const PointerInputs(this.inputs);
  14. const PointerInputs.none() : inputs = const <PointerInput>{};
  15. const PointerInputs.all()
  16. : inputs = const <PointerInput>{
  17. PointerInput.tap,
  18. PointerInput.scroll,
  19. PointerInput.drag,
  20. PointerInput.move,
  21. };
  22. }