Viewing version 0.11.0. Open the latest package page.
flutter_map_animations
0.11.0Animation utilities for markers and controls of the flutter_map package.
Readme
Flutter Map Animations
Pub Version (including pre-releases)
Animation utility for the flutter_map package.
Table of Contents
Documentation
AnimatedMapController
Just create an AnimatedMapController and you're good to go:
class _MyWidgetState extends State<MyWidget> with TickerProviderStateMixin {
late final _animatedMapController = AnimatedMapController(vsync: this);
// ...
}
You can specify globally the animation's duration, curve and if previous animations should be stopped with cancelPreviousAnimations:
AnimatedMapController(
vsync: this,
duration: const Duration(milliseconds: 500),
curve: Curves.easeInOut,
cancelPreviousAnimations: true, // Default to false
);
And add it to your FlutterMap widget:
FlutterMap(
mapController: _animatedMapController.mapController,
// ...
)
Animated Movement
| Rotation | Zoom | Center on point |
|---|---|---|
Check the AnimatedMapController API for more!
AnimatedMarkerLayer & AnimatedMarker
| AnimatedMarker |
|---|
FlutterMap(
mapController: _animatedMapController.mapController,
children: [
TileLayer(
urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
userAgentPackageName: 'com.example.app',
),
AnimatedMarkerLayer(
markers: [
AnimatedMarker(
point: LatLng(51.509364, -0.128928),
builder: (_, animation) {
final size = 50.0 * animation.value;
return Icon(
Icons.location_on,
size: size,
);
},
),
],
),
],
)
Migration Guide
v0.5.0
With flutter_map v6 some parameters have been removed or renamed:
AnimatedMarker.rotateOrigin,AnimatedMarker.anchorPoshave been removedAnimatedMarker.rotateAlignmenthas been renamed toAnimatedMarker.alignmentAnimatedMarkerLayer.rotateOrigin,AnimatedMarkerLayer.anchorPoshave been removedAnimatedMarkerLayer.rotateAlignmenthas been renamed toAnimatedMarkerLayer.alignment
v0.4.0
- With flutter_map v5 it's not possible anymore to extend
MapControllerImplwhich was used to use theAnimatedMapControllerdirectly as aMapControllerin theFlutterMapwidget. Now an instance ofMapControlleris created internally or can be passed as a parameter to theAnimatedMapControllerconstructor. You can access it with themapControllergetter:
late final _animatedMapController = AnimatedMapController(vsync: this);
@override
Widget build(BuildContext context) {
return FlutterMap(
mapController: _animatedMapController.mapController,
// ...
);
}
Contributors
Changelog
0.11.0
- chore(deps): bump latlong2 from 0.9.1 to 0.10.1 by @dependabot[bot] in https://github.com/TesteurManiak/flutter_map_animations/pull/52
0.10.0
- chore(deps): bump fd_lints from 2.3.0 to 3.0.0 by @TesteurManiak
- chore(deps): bump flutter_map from 8.0.0 to 8.3.0 by @TesteurManiak
- chore(deps): removed custom_lint by @TesteurManiak
0.9.0
- chore(deps): bump custom_lint from 0.6.10 to 0.7.0 by @dependabot in https://github.com/TesteurManiak/flutter_map_animations/pull/46
- Support flutter_map v8 by @JaffaKetchup in https://github.com/TesteurManiak/flutter_map_animations/pull/47
Full Changelog: https://github.com/TesteurManiak/flutter_map_animations/compare/0.8.0...0.9.0
0.8.0
- Fix: Stop and dispose all running animations by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/45
- Feat: Added
AnimatedMapController.stopAnimations()method andcancelPreviousAnimationsproperties by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/45
Full Changelog: https://github.com/TesteurManiak/flutter_map_animations/compare/0.7.1...0.8.0
0.7.1
- 35 animation duration for animateto by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/36
- Fix #39 AnimateTo same point w/ different offset by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/41
Full Changelog: https://github.com/TesteurManiak/flutter_map_animations/compare/0.7.0...0.7.1
0.7.0
- 30 version 7 support by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/31
- chore(deps): bump custom_lint from 0.5.11 to 0.6.4 by @dependabot in https://github.com/TesteurManiak/flutter_map_animations/pull/33
- chore: bump dependencies by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/34
New Contributors
- @dependabot made their first contribution in https://github.com/TesteurManiak/flutter_map_animations/pull/33
Full Changelog: https://github.com/TesteurManiak/flutter_map_animations/compare/0.6.0...0.7.0
0.6.0
- Dependencies_upgrade by @ReinisSprogis in https://github.com/TesteurManiak/flutter_map_animations/pull/26
- docs(contributor): contributors readme action update by @github-actions in https://github.com/TesteurManiak/flutter_map_animations/pull/27
- fix: added dedicated
_AngleTweento improve rotation animation by @JaffaKetchup in https://github.com/TesteurManiak/flutter_map_animations/pull/28 - docs(contributor): contributors readme action update by @github-actions in https://github.com/TesteurManiak/flutter_map_animations/pull/29
New Contributors
- @ReinisSprogis made their first contribution in https://github.com/TesteurManiak/flutter_map_animations/pull/26
Full Changelog: https://github.com/TesteurManiak/flutter_map_animations/compare/0.5.3...0.6.0
0.5.3
- Added
offsetsupport toanimateToby @JaffaKetchup in https://github.com/TesteurManiak/flutter_map_animations/pull/20 - docs(contributor): contributors readme action update by @github-actions in https://github.com/TesteurManiak/flutter_map_animations/pull/21
- 23 android build conflicts by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/24
0.5.2
- Fixed GIFs link in README.md
0.5.1
- feat: updated example with flutter_map_cancellable_tile_provider by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/14
- feat: added rotation parameter to animatedFitCamera by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/16
- fix: update camera with correct rotation by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/17
- Chore/update readme by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/18
0.5.0
Check the Migration Guide to learn about breaking changes in this version
- Updated to flutter_map v6
0.5.0-dev.1
- Updated to flutter_map v6
0.4.1
- Fixed topics in
pubspec.yaml
0.4.0
Check the Migration Guide to learn about breaking changes in this version
- Updated to flutter_map v5
- Updated Dart SDK constraints to
>=3.0.0 <4.0.0 - Contributions from Rory Stephenson
- Add customId for for animated movements and don't trigger movement when it isn't necessary #5
0.3.0
- Updated to flutter_map v4
0.3.0-dev.2
- Added
AnimationIdclass to manage aTileUpdateTransformer
0.3.0-dev.1
- Updated to flutter_map v4
0.2.2
- Contribution from MaxiStefan
- Use the shortest rotation path when animating the camera #1
0.2.1
- Updated example
- Allow to set a custom
Curveto each of the methods ofAnimatedMapController
0.2.0
- Added
animatedFitBoundsandcenterOnPointsmethods toAnimatedMapController - Properly disposed the
AnimationControllerwhen the widget is disposed - Smoother animation when the
LatLngis updated
0.1.0+1
- Updated
README.mdto add the pub.dev badge
0.1.0
- First release
Installing
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add 'flutter_map_animations:0.11.0'pubspec.yaml
name: flutter_map_animations
description: Animation utilities for markers and controls of the flutter_map package.
version: 0.11.0
homepage: https://github.com/TesteurManiak/flutter_map_animations
repository: https://github.com/TesteurManiak/flutter_map_animations
issue_tracker: https://github.com/TesteurManiak/flutter_map_animations/issues
screenshots:
- description: Animated markers
path: gifs/animated-marker.gif
- description: Animated movement
path: gifs/center-on-point.gif
- description: Animated rotate
path: gifs/rotate.gif
- description: Animated zoom
path: gifs/zoom.gif
funding:
- https://www.buymeacoffee.com/guillaumeroux
topics:
- flutter-map
- map
- animation
environment:
sdk: ">=3.0.0 <4.0.0"
dependencies:
flutter:
sdk: flutter
flutter_map: ">=8.3.0 <9.0.0"
latlong2: ">=0.9.1 <0.11.0"
dev_dependencies:
flutter_lints: 6.0.0
flutter_test:
sdk: flutter
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 0.1.0 | On demand | Download | 2e4e917f…4b1546 |
| 0.1.0+1 | On demand | Download | f017c743…35e936 |
| 0.2.0 | On demand | Download | 41e7de54…12e74d |
| 0.2.1 | On demand | Download | 7c8da842…b255e0 |
| 0.2.2 | On demand | Download | a780978a…9add79 |
| 0.3.0-dev.1 | On demand | Download | 2c0bcdf7…88db74 |
| 0.3.0-dev.2 | On demand | Download | 70130f84…86ea79 |
| 0.3.0 | On demand | Download | 69ef62c7…fbdebd |
| 0.4.0 | On demand | Download | 789d9a6a…c16d0a |
| 0.4.1 | On demand | Download | a08b9533…9da544 |
| 0.5.0-dev.1 | On demand | Download | ef5705da…34ea06 |
| 0.5.0 | On demand | Download | ecf56536…a02081 |
| 0.5.1 | On demand | Download | 4220f69e…d8d0a0 |
| 0.5.2 | On demand | Download | 64aeb079…f8f997 |
| 0.5.3 | On demand | Download | b21fbfc0…48c33f |
| 0.6.0 | On demand | Download | e4b92963…e1c4a9 |
| 0.7.0-dev.1 | On demand | Download | e714e837…b2fa0d |
| 0.7.0 | On demand | Download | 826c10a5…1c5611 |
| 0.7.1 | On demand | Download | a2135cd3…42eae9 |
| 0.8.0 | On demand | Download | 08233f89…050d36 |
| 0.9.0 | On demand | Download | bf583863…35a09e |
| 0.10.0 | On demand | Download | fda31e6c…88bfdc |
| 0.11.0 | Cached · Upstream SHA-256 matched | Download | a524e59b…2c8f17 |
Dependencies
flutter {
"sdk": "flutter"
}
flutter_map "\u003e=8.3.0 \u003c9.0.0"
latlong2 "\u003e=0.9.1 \u003c0.11.0"