Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
c2916f47
Commit
c2916f47
authored
Oct 23, 2015
by
Kris Giesing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add assertions to tap recognizer
parent
709b3550
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
tap.dart
packages/flutter/lib/src/gestures/tap.dart
+4
-1
No files found.
packages/flutter/lib/src/gestures/tap.dart
View file @
c2916f47
...
...
@@ -112,7 +112,7 @@ class TapGesture extends TapTracker {
}
void
cancel
()
{
// If we won the arena already, then
_
entry is resolved, so resolving
// If we won the arena already, then entry is resolved, so resolving
// again is a no-op. But we still need to clean up our own state.
if
(
_wonArena
)
reject
();
...
...
@@ -138,6 +138,7 @@ class TapGestureRecognizer extends DisposableArenaMember {
Map
<
int
,
TapGesture
>
_gestureMap
=
new
Map
<
int
,
TapGesture
>();
void
addPointer
(
PointerInputEvent
event
)
{
assert
(!
_gestureMap
.
containsKey
(
event
.
pointer
));
_gestureMap
[
event
.
pointer
]
=
new
TapGesture
(
gestureRecognizer:
this
,
event:
event
...
...
@@ -147,10 +148,12 @@ class TapGestureRecognizer extends DisposableArenaMember {
}
void
acceptGesture
(
int
pointer
)
{
assert
(
_gestureMap
.
containsKey
(
pointer
));
_gestureMap
[
pointer
]?.
accept
();
}
void
rejectGesture
(
int
pointer
)
{
assert
(
_gestureMap
.
containsKey
(
pointer
));
_gestureMap
[
pointer
]?.
reject
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment