Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
modal_bottom_sheet
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
minnu
2020-09-13 04:26:15 +0530
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2020-09-13 04:26:15 +0530
Commit
b27b17f9e8440254232e40ea68f039502fa9ccdf
b27b17f9
1 parent
b8f2a7e3
rewritten using ternary operators 馃槣.
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
lib/src/bottom_sheet.dart
lib/src/bottom_sheet.dart
View file @
b27b17f
...
...
@@ -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
;
...
...
Please
register
or
login
to post a comment