minnu
Committed by GitHub

VelocityTracker() has a fix with positional arguments

... ... @@ -300,7 +300,17 @@ class _ModalBottomSheetState extends State<ModalBottomSheet>
// Otherwise the calculate the velocity with a VelocityTracker
if (_velocityTracker == null) {
_velocityTracker = VelocityTracker();
// Checking the device type as per the OS installed in it
// SmartPhone Devices
if (Platform.isAndroid || Platform.isIOS) {
_velocityTracker = VelocityTracker(PointerDeviceKind.touch);
}
// PCs or desktops or Laptops devices has mouse pointers
else if (Platform.isLinux || Platform.isWindows || Platform.isMacOS) {
_velocityTracker = VelocityTracker(PointerDeviceKind.mouse);
} else {
_velocityTracker = VelocityTracker(PointerDeviceKind.unknown);
}
_startTime = DateTime.now();
}
DragUpdateDetails dragDetails;
... ...