You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GestureArena is confused about whether it is an arena with multiple matches, or if it's a group of arenas. We seem to use "arena" to mean both interchangeably right now.
_GestureArenaState is really the singular GestureArena class (but it's private).
GestureArena today is a map of keys to _GestureArenaState, i.e. it's a global lookup table of arenas.
I would typically rename _GestureArenaState to GestureArena (or _GestureArena if it stays private), and GestureArena to GestureArenaManager. But we don't tend to use *Manager in Flutter code, so it might be odd to introduce that nomenclature just for this one case.
Another option is to give GestureArena a static lookup method that returns a GestureArena, and make the methods close(), sweep(), hold(), and release() not take a key anymore. But that introduces lifetime issues since the caller might hold onto a GestureArena longer than necessary.
We should also consider whether to continue making GestureArenaManager (currently GestureArena) pretend that it uses arbitrary keys (as opposed to integers), with GestureRecognizer (the subclass of GestureArenaMember) knowing that they're really ints. We should probably merge GestureArenaMember and GestureRecognizer and move to just saying int everywhere. We're not getting anything from pretending that keys can be arbitrary objects.
Agreed; and in fact the notion that the ints are pointer IDs turned out to be pretty important when I was working in this code a few months ago, so I might vote to be even more explicit.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
abarth commentedon Feb 4, 2016
What should we call it? GestureDisambiguatior ? GestureResolver ?
/cc @krisgiesing
abarth commentedon Feb 4, 2016
/cc @Hixie
krisgiesing commentedon Feb 4, 2016
_GestureArenaState is really the singular GestureArena class (but it's private).
GestureArena today is a map of keys to _GestureArenaState, i.e. it's a global lookup table of arenas.
I would typically rename _GestureArenaState to GestureArena (or _GestureArena if it stays private), and GestureArena to GestureArenaManager. But we don't tend to use *Manager in Flutter code, so it might be odd to introduce that nomenclature just for this one case.
Another option is to give GestureArena a static lookup method that returns a GestureArena, and make the methods close(), sweep(), hold(), and release() not take a key anymore. But that introduces lifetime issues since the caller might hold onto a GestureArena longer than necessary.
Hixie commentedon Feb 4, 2016
GestureArena and GestureArenaManager seems fine to me. It's an improvement over the current state.
Hixie commentedon Feb 11, 2016
We should also consider whether to continue making GestureArenaManager (currently GestureArena) pretend that it uses arbitrary keys (as opposed to integers), with GestureRecognizer (the subclass of GestureArenaMember) knowing that they're really ints. We should probably merge GestureArenaMember and GestureRecognizer and move to just saying int everywhere. We're not getting anything from pretending that keys can be arbitrary objects.
krisgiesing commentedon Feb 11, 2016
Agreed; and in fact the notion that the ints are pointer IDs turned out to be pretty important when I was working in this code a few months ago, so I might vote to be even more explicit.
[rename fixit] GestureArena -> GestureArenaManager
Android readme (flutter#202)
github-actions commentedon Aug 17, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.