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
Jaime Blasco
2020-09-17 15:40:43 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
34f4ffb0d647e6a294aa832d3e2d71b1480da058
34f4ffb0
1 parent
8b4d3da8
Improve comments
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
lib/src/bottom_sheet.dart
lib/src/bottom_sheet.dart
View file @
34f4ffb
...
...
@@ -299,7 +299,6 @@ 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
final
pointerKind
=
defaultPointerDeviceKind
(
context
);
_velocityTracker
=
VelocityTracker
(
pointerKind
);
_startTime
=
DateTime
.
now
();
...
...
@@ -467,7 +466,9 @@ class _CustomBottomSheetLayout extends SingleChildLayoutDelegate {
}
}
// Used by VelocityTracker
// Checks the device input type as per the OS installed in it
// Mobile platforms will be default to `touch` while desktop will do to `mouse`
// Used with VelocityTracker
// https://github.com/flutter/flutter/pull/64267#issuecomment-694196304
PointerDeviceKind
defaultPointerDeviceKind
(
BuildContext
context
)
{
final
platform
=
Theme
.
of
(
context
)?.
platform
??
defaultTargetPlatform
;
...
...
Please
register
or
login
to post a comment