Add test to prevent future gesture detection regressions #1584
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Recently a change was made to move the TileLayer backgroundColor option to become an option of FlutterMap. This accidentally fixed an issue where gestures would stop working when going beyond a TileLayer's max zoom because FlutterMap's gesture detectors' HitTestBehaviour is the default deferToChild and when above a TileLayer's maxZoom potentially there would be no hit-testable children of FlutterMap.
Moving the color option to FlutterMap means that there is always a ColoredBox child widget which is hit testable. To avoid accidentally breaking hit testing again in the future this commit adds a test which ensures it always works.
In passing I made TileLayer only wrap its tiles in a ColoredBox widget if the user defines a backgroundColor (which is deprecated).