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
1309f977
Unverified
Commit
1309f977
authored
May 31, 2023
by
Ian Hickson
Committed by
GitHub
May 31, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify PointerSignalResolver.register (#127605)
parent
4e75973e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
pointer_signal_resolver.dart
...ges/flutter/lib/src/gestures/pointer_signal_resolver.dart
+15
-2
No files found.
packages/flutter/lib/src/gestures/pointer_signal_resolver.dart
View file @
1309f977
...
...
@@ -61,8 +61,21 @@ class PointerSignalResolver {
/// Registers interest in handling [event].
///
/// See the documentation for the [PointerSignalResolver] class on when and
/// how this method should be used.
/// This method may be called multiple times (typically from different parts of the
/// widget hierarchy) for the same `event`, with differenet `callback`s, as the event
/// is being dispatched across the tree. Once the dispatching is complete, the
/// [GestureBinding] calls [resolve], and the first registered callback is called.
///
/// The `callback` is invoked with one argument, the `event`.
///
/// Once the [register] method has been called with a particular `event`, it must
/// not be called for other `event`s until after [resolve] has been called. Only one
/// event disambiguation can be in flight at a time. In normal use this is achieved
/// by only registering callbacks for an event as it is actively being dispatched
/// (for example, in [Listener.onPointerSignal]).
///
/// See the documentation for the [PointerSignalResolver] class for an example of
/// using this method.
void
register
(
PointerSignalEvent
event
,
PointerSignalResolvedCallback
callback
)
{
assert
(
_currentEvent
==
null
||
_isSameEvent
(
_currentEvent
!,
event
));
if
(
_firstRegisteredCallback
!=
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