minnu
Committed by GitHub

rewritten using ternary operators 馃槣.

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