INNER CODE UNIT · Dart

VerticalDragInfo

blackmann/story_view · lib/utils.dart:5

class VerticalDragInfo {
  bool cancel = false;

  Direction? direction;

  void update(double primaryDelta) {
    Direction tmpDirection;

    if (primaryDelta > 0) {
      tmpDirection = Direction.down;
    } else {
      tmpDirection = Direction.up;
    }

    if (direction != null && tmpDirection != direction) {
      cancel = true;
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…