mirrored_repositories/master_flutter/adaptive_responsive/adaptive_scaffold_two/lib
// Copyright 2023 Fredrick Allan Grott. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';

/// A customized scroll behavior that enables dragging using both touch and mouse input devices.
///
/// This scroll behavior extends the default [MaterialScrollBehavior] to allow
/// dragging interactions for both touch and mouse input devices. By default,
/// the [MaterialScrollBehavior] only supports touch-based dragging. This custom
/// behavior makes it suitable for widgets that should respond to dragging with
/// both touch and mouse input, such as scrollable content.
class DragScrollBehavior extends MaterialScrollBehavior {
  @override
  Set<PointerDeviceKind> get dragDevices => {
        // Enable dragging using both touch and mouse input devices.
        PointerDeviceKind.touch,
        PointerDeviceKind.mouse,
        PointerDeviceKind.trackpad,
        PointerDeviceKind.stylus,
        PointerDeviceKind.invertedStylus,
      };
}
