tlserver / flutter_map_location_marker

A flutter map plugin for displaying device current location.
https://pub.dev/packages/flutter_map_location_marker
BSD 3-Clause "New" or "Revised" License
102 stars 93 forks source link

Changes to bump support to Flutter Map v6 #89

Closed bramp closed 11 months ago

bramp commented 11 months ago

Changes required for Flutter Map v6, including migrating away from deprecated properties.

Fixes https://github.com/tlserver/flutter_map_location_marker/issues/87

tlserver commented 11 months ago

Thanks you for contributing. I found some problems in this PR.

  1. Custom layers need to define their behaviour The way custom layers are defined has changed. Mobile/moving layers should now use MobileLayerTransformer at the top of their widget tree.

For this change, NonRotationContainer is not needed and can be removed.

  1. nonRotatedChildren has been removed The approach to 'mobile' and 'static' layers has been changed. Mobile layers now wrap themselves in a MobileLayerTransformer which uses the inherited state, instead of FlutterMap applying the affects directly to them. Static layers should now ensure they use Align and/or SizedBox.expand.

For this change, in the 4 examples used nonRotatedChildren, the widgets in nonRotatedChildren should be wraped in Align, otherwise Position widget throw an error.

Fixed these problems in 5f49fc53.