We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Work in progress, feedback and additions are welcome, event names are not final
MapEventZoom
abstract
onMapEvent
build() { return FlutterMap( options: MapOptions( onMapEvent: (event) { switch (event) { case final MapEventDoubleTapZoom event: print('double tap zoom'); break; case final MapEventFlingAnimationNotStarted event: print('fling animation not started'); break; } }, ), ); }
sealed
build() { return FlutterMap( options: MapOptions( onMapEvent: (event) { switch (event) { case MapCameraEvent(): switch (event) { case CameraEventType.doubleTapZoom: print('double tap zoom'); break; } break; case MapEventFlingAnimationNotStarted(): print('fling animation not started'); break; } }, ), ); }
build() { return FlutterMap( options: MapOptions( onMapEvent: (event) { switch (event) { case MapDoubleTapZoomEvent(): print('fling animation not started'); break; case MapEventFlingAnimationNotStarted(): print('fling animation not started'); break; default: break; } }, ), ); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Work in progress, feedback and additions are welcome, event names are not final
Motivation
MapEventZoom
#1732Current state
Needed additions
events (multi!: rewrite gesture handling #1733)
MapEventZoom
#1732)function (multi!: rewrite gesture handling #1733 (comment))
Class hierarchy
abstract
MapEventMapEventTertiaryLongPress
abstract
MapEventWithMoveUsage in
onMapEvent
callbackProposals
Proposal 1: Minimal class approach
Class hierarchy
sealed
MapEventUsage in
onMapEvent
callbackProposal 2: Further embrace class subtyping
Class hierarchy
sealed
MapEventsealed
MapInteractionEventMapEventTertiaryLongPress
sealed
MapStartEventMapEventRotateStart
sealed
MapEndEventMapRotateEventEnd
sealed
MapCameraEventUsage in
onMapEvent
callbackTODO: add more proposals
Challenges
between multi!: rewrite gesture handling #1733 (comment)
and [FEATURE] Add catch-all
MapEventZoom
#1732The text was updated successfully, but these errors were encountered: