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
6611bf62
Commit
6611bf62
authored
Nov 03, 2015
by
Ian Hickson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1910 from Hixie/gesture-cleanup
Merge DisposableArenaMember and GestureArenaMember
parents
33f13940
bfe3baca
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
8 deletions
+9
-8
arena.dart
packages/flutter/lib/src/gestures/arena.dart
+5
-0
recognizer.dart
packages/flutter/lib/src/gestures/recognizer.dart
+1
-5
tap.dart
packages/flutter/lib/src/gestures/tap.dart
+2
-2
gesture_detector.dart
packages/flutter/lib/src/widgets/gesture_detector.dart
+1
-1
No files found.
packages/flutter/lib/src/gestures/arena.dart
View file @
6611bf62
...
...
@@ -21,6 +21,11 @@ abstract class GestureArenaMember {
/// Called when this member loses the arena for the given key.
void
rejectGesture
(
Object
key
);
/// Release any resources used by the object. Called when the object is no
/// longer needed (e.g. a gesture recogniser is being unregistered from a
/// [GestureDetector]).
void
dispose
()
{
}
}
/// An interface to information to an arena
...
...
packages/flutter/lib/src/gestures/recognizer.dart
View file @
6611bf62
...
...
@@ -12,11 +12,7 @@ import 'pointer_router.dart';
export
'pointer_router.dart'
show
PointerRouter
;
abstract
class
DisposableArenaMember
extends
GestureArenaMember
{
void
dispose
();
}
abstract
class
GestureRecognizer
extends
DisposableArenaMember
{
abstract
class
GestureRecognizer
extends
GestureArenaMember
{
GestureRecognizer
({
PointerRouter
router
})
:
_router
=
router
{
assert
(
_router
!=
null
);
}
...
...
packages/flutter/lib/src/gestures/tap.dart
View file @
6611bf62
...
...
@@ -182,7 +182,7 @@ class _TapGesture extends _TapTracker {
/// independently. That is, each pointer sequence that could resolve to a tap
/// does so independently of others: down-1, down-2, up-1, up-2 produces two
/// taps, on up-1 and up-2.
class
MultiTapGestureRecognizer
extends
Disposabl
eArenaMember
{
class
MultiTapGestureRecognizer
extends
Gestur
eArenaMember
{
MultiTapGestureRecognizer
({
this
.
router
,
this
.
onTapDown
,
...
...
@@ -243,7 +243,7 @@ class MultiTapGestureRecognizer extends DisposableArenaMember {
}
class
DoubleTapGestureRecognizer
extends
Disposabl
eArenaMember
{
class
DoubleTapGestureRecognizer
extends
Gestur
eArenaMember
{
DoubleTapGestureRecognizer
({
this
.
router
,
this
.
onDoubleTap
});
...
...
packages/flutter/lib/src/widgets/gesture_detector.dart
View file @
6611bf62
...
...
@@ -217,7 +217,7 @@ class _GestureDetectorState extends State<GestureDetector> {
}
}
DisposableArenaMember
_ensureDisposed
(
Disposabl
eArenaMember
recognizer
)
{
GestureArenaMember
_ensureDisposed
(
Gestur
eArenaMember
recognizer
)
{
recognizer
?.
dispose
();
return
null
;
}
...
...
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