├── .github ├── dependabot.yml └── workflows │ ├── build.yml │ ├── contributions.yml │ ├── sanity_check.yml │ └── stale.yml ├── .gitignore ├── .metadata ├── CHANGELOG.md ├── LICENSE ├── README.md ├── analysis_options.yaml ├── example ├── .gitignore ├── .metadata ├── README.md ├── analysis_options.yaml ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── example │ │ │ │ │ └── MainActivity.kt │ │ │ └── res │ │ │ │ ├── drawable-v21 │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable │ │ │ │ └── launch_background.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── values-night │ │ │ │ └── styles.xml │ │ │ │ └── values │ │ │ │ └── styles.xml │ │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ └── settings.gradle ├── ios │ ├── .gitignore │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ └── Release.xcconfig │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── Runner │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ └── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ └── README.md │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── Runner-Bridging-Header.h ├── lib │ └── main.dart ├── macos │ ├── .gitignore │ ├── Flutter │ │ ├── Flutter-Debug.xcconfig │ │ ├── Flutter-Release.xcconfig │ │ └── GeneratedPluginRegistrant.swift │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── Runner │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── app_icon_1024.png │ │ │ ├── app_icon_128.png │ │ │ ├── app_icon_16.png │ │ │ ├── app_icon_256.png │ │ │ ├── app_icon_32.png │ │ │ ├── app_icon_512.png │ │ │ └── app_icon_64.png │ │ ├── Base.lproj │ │ └── MainMenu.xib │ │ ├── Configs │ │ ├── AppInfo.xcconfig │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ └── Warnings.xcconfig │ │ ├── DebugProfile.entitlements │ │ ├── Info.plist │ │ ├── MainFlutterWindow.swift │ │ └── Release.entitlements ├── pubspec.lock ├── pubspec.yaml └── web │ ├── favicon.png │ ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png │ ├── index.html │ └── manifest.json ├── gifs ├── animated-marker.gif ├── center-on-point.gif ├── rotate.gif └── zoom.gif ├── lib ├── flutter_map_animations.dart └── src │ ├── animated_map_controller.dart │ ├── animated_marker.dart │ ├── animated_marker_layer.dart │ ├── animation_extensions.dart │ └── animation_id.dart ├── pubspec.yaml └── test └── src └── animation_id_test.dart /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | enable-beta-ecosystems: true 3 | updates: 4 | - package-ecosystem: "pub" 5 | directory: "/" 6 | schedule: 7 | interval: "weekly" 8 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build example 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | branches: 7 | - main 8 | paths: 9 | - 'example/**' 10 | 11 | jobs: 12 | build: 13 | name: Build example 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/checkout@v4.1.1 17 | - uses: subosito/flutter-action@v2.14.0 18 | with: 19 | cache: true 20 | - uses: bluefireteam/flutter-gh-pages@v8 21 | with: 22 | workingDir: example 23 | webRenderer: canvaskit 24 | baseHref: /flutter_map_animations/ 25 | -------------------------------------------------------------------------------- /.github/workflows/contributions.yml: -------------------------------------------------------------------------------- 1 | on: 2 | push: 3 | branches: 4 | - main 5 | 6 | jobs: 7 | contrib-readme-job: 8 | runs-on: ubuntu-latest 9 | name: A job to automate contrib in readme 10 | steps: 11 | - name: Contribute List 12 | uses: akhilmhdh/contributors-readme-action@v2.3.6 13 | env: 14 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 15 | -------------------------------------------------------------------------------- /.github/workflows/sanity_check.yml: -------------------------------------------------------------------------------- 1 | name: Sanity Check 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - main 7 | push: 8 | branches: 9 | - main 10 | - dev 11 | workflow_dispatch: 12 | 13 | concurrency: 14 | group: ${{ github.ref }} 15 | cancel-in-progress: true 16 | 17 | jobs: 18 | sanity_check: 19 | runs-on: ubuntu-latest 20 | steps: 21 | - uses: actions/checkout@v4.1.1 22 | - uses: subosito/flutter-action@v2.14.0 23 | with: 24 | cache: true 25 | 26 | - name: Analyze project 27 | run: flutter analyze --no-fatal-infos 28 | 29 | - name: Run tests 30 | run: flutter test -------------------------------------------------------------------------------- /.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | # This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time. 2 | # 3 | # You can adjust the behavior by modifying this file. 4 | # For more information, see: 5 | # https://github.com/actions/stale 6 | name: Mark stale issues and pull requests 7 | 8 | on: 9 | schedule: 10 | - cron: '37 21 * * *' 11 | 12 | jobs: 13 | stale: 14 | 15 | runs-on: ubuntu-latest 16 | permissions: 17 | issues: write 18 | pull-requests: write 19 | 20 | steps: 21 | - uses: actions/stale@v5 22 | with: 23 | repo-token: ${{ secrets.GITHUB_TOKEN }} 24 | stale-issue-message: "This issue is stale because it has been open 20 days with no activity. Remove stale label or comment or this will be closed in 5 days." 25 | stale-pr-message: "This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days." 26 | close-issue-message: "This issue was closed because it has been stalled for 5 days with no activity." 27 | stale-issue-label: 'no-issue-activity' 28 | stale-pr-label: 'no-pr-activity' 29 | days-before-stale: 20 30 | days-before-close: 5 31 | days-before-pr-close: -1 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. 26 | /pubspec.lock 27 | **/doc/api/ 28 | .dart_tool/ 29 | .packages 30 | build/ 31 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: f1875d570e39de09040c8f79aa13cc56baab8db1 8 | channel: stable 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.9.0 2 | 3 | * 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 4 | * Support flutter_map v8 by @JaffaKetchup in https://github.com/TesteurManiak/flutter_map_animations/pull/47 5 | 6 | 7 | **Full Changelog**: https://github.com/TesteurManiak/flutter_map_animations/compare/0.8.0...0.9.0 8 | 9 | ## 0.8.0 10 | 11 | * Fix: Stop and dispose all running animations by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/45 12 | * Feat: Added `AnimatedMapController.stopAnimations()` method and `cancelPreviousAnimations` properties by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/45 13 | 14 | 15 | **Full Changelog**: https://github.com/TesteurManiak/flutter_map_animations/compare/0.7.1...0.8.0 16 | 17 | ## 0.7.1 18 | 19 | * 35 animation duration for animateto by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/36 20 | * Fix #39 AnimateTo same point w/ different offset by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/41 21 | 22 | **Full Changelog**: https://github.com/TesteurManiak/flutter_map_animations/compare/0.7.0...0.7.1 23 | 24 | ## 0.7.0 25 | 26 | * 30 version 7 support by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/31 27 | * 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 28 | * chore: bump dependencies by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/34 29 | 30 | ## New Contributors 31 | * @dependabot made their first contribution in https://github.com/TesteurManiak/flutter_map_animations/pull/33 32 | 33 | **Full Changelog**: https://github.com/TesteurManiak/flutter_map_animations/compare/0.6.0...0.7.0 34 | 35 | 36 | ## 0.6.0 37 | 38 | * Dependencies_upgrade by @ReinisSprogis in https://github.com/TesteurManiak/flutter_map_animations/pull/26 39 | * docs(contributor): contributors readme action update by @github-actions in https://github.com/TesteurManiak/flutter_map_animations/pull/27 40 | * fix: added dedicated `_AngleTween` to improve rotation animation by @JaffaKetchup in https://github.com/TesteurManiak/flutter_map_animations/pull/28 41 | * docs(contributor): contributors readme action update by @github-actions in https://github.com/TesteurManiak/flutter_map_animations/pull/29 42 | 43 | ### New Contributors 44 | * @ReinisSprogis made their first contribution in https://github.com/TesteurManiak/flutter_map_animations/pull/26 45 | 46 | **Full Changelog**: https://github.com/TesteurManiak/flutter_map_animations/compare/0.5.3...0.6.0 47 | 48 | ## 0.5.3 49 | 50 | * Added `offset` support to `animateTo` by @JaffaKetchup in https://github.com/TesteurManiak/flutter_map_animations/pull/20 51 | * docs(contributor): contributors readme action update by @github-actions in https://github.com/TesteurManiak/flutter_map_animations/pull/21 52 | * 23 android build conflicts by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/24 53 | 54 | ## 0.5.2 55 | 56 | * Fixed GIFs link in README.md 57 | 58 | ## 0.5.1 59 | 60 | * feat: updated example with flutter_map_cancellable_tile_provider by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/14 61 | * feat: added rotation parameter to animatedFitCamera by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/16 62 | * fix: update camera with correct rotation by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/17 63 | * Chore/update readme by @TesteurManiak in https://github.com/TesteurManiak/flutter_map_animations/pull/18 64 | 65 | ## 0.5.0 66 | 67 | **Check the [Migration Guide](https://github.com/TesteurManiak/flutter_map_animations/blob/main/README.md#migration-guide) to learn about breaking changes in this version** 68 | 69 | * Updated to [flutter_map](https://pub.dev/packages/flutter_map/versions/6.0.0) v6 70 | 71 | ## 0.5.0-dev.1 72 | 73 | * Updated to [flutter_map](https://pub.dev/packages/flutter_map/versions/6.0.0-dev.2) v6 74 | 75 | ## 0.4.1 76 | 77 | * Fixed topics in `pubspec.yaml` 78 | 79 | ## 0.4.0 80 | 81 | **Check the [Migration Guide](https://github.com/TesteurManiak/flutter_map_animations#v040) to learn about breaking changes in this version** 82 | 83 | * Updated to [flutter_map](https://pub.dev/packages/flutter_map/versions/5.0.0) v5 84 | * Updated Dart SDK constraints to `>=3.0.0 <4.0.0` 85 | * Contributions from [Rory Stephenson](https://github.com/rorystephenson) 86 | * Add customId for for animated movements and don't trigger movement when it isn't necessary [#5](https://github.com/TesteurManiak/flutter_map_animations/pull/5) 87 | 88 | ## 0.3.0 89 | 90 | * Updated to [flutter_map](https://pub.dev/packages/flutter_map/versions/4.0.0) v4 91 | 92 | ## 0.3.0-dev.2 93 | 94 | * Added `AnimationId` class to manage a `TileUpdateTransformer` 95 | 96 | ## 0.3.0-dev.1 97 | 98 | * Updated to [flutter_map](https://pub.dev/packages/flutter_map/versions/4.0.0-dev.1) v4 99 | 100 | ## 0.2.2 101 | 102 | * Contribution from [MaxiStefan](https://github.com/MaxiStefan) 103 | * Use the shortest rotation path when animating the camera [#1](https://github.com/TesteurManiak/flutter_map_animations/pull/1) 104 | 105 | ## 0.2.1 106 | 107 | * Updated example 108 | * Allow to set a custom `Curve` to each of the methods of `AnimatedMapController` 109 | 110 | ## 0.2.0 111 | 112 | * Added `animatedFitBounds` and `centerOnPoints` methods to `AnimatedMapController` 113 | * Properly disposed the `AnimationController` when the widget is disposed 114 | * Smoother animation when the `LatLng` is updated 115 | 116 | ## 0.1.0+1 117 | 118 | * Updated `README.md` to add the pub.dev badge 119 | 120 | ## 0.1.0 121 | 122 | * First release 123 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Guillaume Roux 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Flutter Map Animations 2 | 3 | [![Pub Version (including pre-releases)](https://img.shields.io/pub/v/flutter_map_animations?include_prereleases)][pub-package] 4 | 5 | Animation utility for the [flutter_map][pub-flutter-map] package. 6 | 7 | [Try the example app][example] 8 | 9 | # Table of Contents 10 | 11 | - [Documentation](#documentation) 12 | - [AnimatedMapController](#animatedmapcontroller) 13 | - [Animated Movement](#animated-movement) 14 | - [AnimatedMarkerLayer & AnimatedMarker](#animatedmarkerlayer--animatedmarker) 15 | - [Migration Guide](#migration-guide) 16 | - [v0.5.0](#v050) 17 | - [v0.4.0](#v040) 18 | - [Contributors](#contributors) 19 | 20 | # Documentation 21 | 22 | ## AnimatedMapController 23 | 24 | Just create an `AnimatedMapController` and you're good to go: 25 | 26 | ```dart 27 | class _MyWidgetState extends State with TickerProviderStateMixin { 28 | late final _animatedMapController = AnimatedMapController(vsync: this); 29 | 30 | // ... 31 | } 32 | ``` 33 | 34 | You can specify globally the animation's `duration`, `curve` and if previous animations should be stopped with `cancelPreviousAnimations`: 35 | 36 | ```dart 37 | AnimatedMapController( 38 | vsync: this, 39 | duration: const Duration(milliseconds: 500), 40 | curve: Curves.easeInOut, 41 | cancelPreviousAnimations: true, // Default to false 42 | ); 43 | ``` 44 | 45 | And add it to your `FlutterMap` widget: 46 | 47 | ```dart 48 | FlutterMap( 49 | mapController: _animatedMapController.mapController, 50 | // ... 51 | ) 52 | ``` 53 | 54 | ### Animated Movement 55 | 56 | | Rotation | Zoom | Center on point | 57 | | ----- | ----- | ----- | 58 | | | | | 59 | 60 | Check the [`AnimatedMapController` API][animated-map-controller] for more! 61 | 62 | ## AnimatedMarkerLayer & AnimatedMarker 63 | 64 | | AnimatedMarker | 65 | | ----- | 66 | | | 67 | 68 | ```dart 69 | FlutterMap( 70 | mapController: _animatedMapController.mapController, 71 | children: [ 72 | TileLayer( 73 | urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png', 74 | userAgentPackageName: 'com.example.app', 75 | ), 76 | AnimatedMarkerLayer( 77 | markers: [ 78 | AnimatedMarker( 79 | point: LatLng(51.509364, -0.128928), 80 | builder: (_, animation) { 81 | final size = 50.0 * animation.value; 82 | return Icon( 83 | Icons.location_on, 84 | size: size, 85 | ); 86 | }, 87 | ), 88 | ], 89 | ), 90 | ], 91 | ) 92 | ``` 93 | 94 | # Migration Guide 95 | 96 | ## v0.5.0 97 | 98 | With [flutter_map v6][flutter-map-v6] some parameters have been removed or renamed: 99 | 100 | * `AnimatedMarker.rotateOrigin`, `AnimatedMarker.anchorPos` have been removed 101 | * `AnimatedMarker.rotateAlignment` has been renamed to `AnimatedMarker.alignment` 102 | * `AnimatedMarkerLayer.rotateOrigin`, `AnimatedMarkerLayer.anchorPos` have been removed 103 | * `AnimatedMarkerLayer.rotateAlignment` has been renamed to `AnimatedMarkerLayer.alignment` 104 | 105 | ## v0.4.0 106 | 107 | * With [flutter_map v5][flutter-map-v5] it's not possible anymore to extend `MapControllerImpl` which was used to use the `AnimatedMapController` directly as a `MapController` in the `FlutterMap` widget. Now an instance of `MapController` is created internally or can be passed as a parameter to the `AnimatedMapController` constructor. You can access it with the `mapController` getter: 108 | 109 | ```dart 110 | late final _animatedMapController = AnimatedMapController(vsync: this); 111 | 112 | @override 113 | Widget build(BuildContext context) { 114 | return FlutterMap( 115 | mapController: _animatedMapController.mapController, 116 | // ... 117 | ); 118 | } 119 | ``` 120 | 121 | # Contributors 122 | 123 | 124 | 125 | 126 | 133 | 140 | 147 | 154 |
127 | 128 | TesteurManiak 129 |
130 | Guillaume Roux 131 |
132 |
134 | 135 | JaffaKetchup 136 |
137 | Luka S 138 |
139 |
141 | 142 | rorystephenson 143 |
144 | Rory Stephenson 145 |
146 |
148 | 149 | ReinisSprogis 150 |
151 | Reinis Sprogis 152 |
153 |
155 | 156 | 157 | [pub-package]: https://pub.dev/packages/flutter_map_animations 158 | [pub-flutter-map]: https://pub.dev/packages/flutter_map 159 | [example]: https://testeurmaniak.github.io/flutter_map_animations/#/ 160 | [animated-map-controller]: https://pub.dev/documentation/flutter_map_animations/latest/flutter_map_animations/AnimatedMapController-class.html 161 | [flutter-map-v6]: https://pub.dev/packages/flutter_map/changelog#600---20231009 162 | [flutter-map-v5]: https://pub.dev/packages/flutter_map/changelog#500---20230604 -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:fd_lints/flutter.yaml 2 | 3 | analyzer: 4 | plugins: 5 | - custom_lint 6 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .packages 31 | .pub-cache/ 32 | .pub/ 33 | /build/ 34 | 35 | # Symbolication related 36 | app.*.symbols 37 | 38 | # Obfuscation related 39 | app.*.map.json 40 | 41 | # Android Studio will place build artifacts here 42 | /android/app/debug 43 | /android/app/profile 44 | /android/app/release 45 | -------------------------------------------------------------------------------- /example/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: "a14f74ff3a1cbd521163c5f03d68113d50af93d3" 8 | channel: "stable" 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 17 | base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 18 | - platform: web 19 | create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 20 | base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 21 | 22 | # User provided section 23 | 24 | # List of Local paths (relative to this file) that should be 25 | # ignored by the migrate tool. 26 | # 27 | # Files that are not part of the templates will be ignored by default. 28 | unmanaged_files: 29 | - 'lib/main.dart' 30 | - 'ios/Runner.xcodeproj/project.pbxproj' 31 | -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | # example 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) 13 | 14 | For help getting started with Flutter development, view the 15 | [online documentation](https://docs.flutter.dev/), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /example/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /example/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion flutter.compileSdkVersion 30 | ndkVersion flutter.ndkVersion 31 | 32 | compileOptions { 33 | sourceCompatibility JavaVersion.VERSION_1_8 34 | targetCompatibility JavaVersion.VERSION_1_8 35 | } 36 | 37 | kotlinOptions { 38 | jvmTarget = '1.8' 39 | } 40 | 41 | sourceSets { 42 | main.java.srcDirs += 'src/main/kotlin' 43 | } 44 | 45 | defaultConfig { 46 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 47 | applicationId "com.example.example" 48 | // You can update the following values to match your application needs. 49 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. 50 | minSdkVersion flutter.minSdkVersion 51 | targetSdkVersion flutter.targetSdkVersion 52 | versionCode flutterVersionCode.toInteger() 53 | versionName flutterVersionName 54 | } 55 | 56 | buildTypes { 57 | release { 58 | // TODO: Add your own signing config for the release build. 59 | // Signing with the debug keys for now, so `flutter run --release` works. 60 | signingConfig signingConfigs.debug 61 | } 62 | } 63 | } 64 | 65 | flutter { 66 | source '../..' 67 | } 68 | 69 | dependencies { 70 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 71 | } 72 | -------------------------------------------------------------------------------- /example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 15 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /example/android/app/src/main/kotlin/com/example/example/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.example 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.6.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.1.2' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | tasks.register("clean", Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip 6 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 11.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXCopyFilesBuildPhase section */ 19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 20 | isa = PBXCopyFilesBuildPhase; 21 | buildActionMask = 2147483647; 22 | dstPath = ""; 23 | dstSubfolderSpec = 10; 24 | files = ( 25 | ); 26 | name = "Embed Frameworks"; 27 | runOnlyForDeploymentPostprocessing = 0; 28 | }; 29 | /* End PBXCopyFilesBuildPhase section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 45 | /* End PBXFileReference section */ 46 | 47 | /* Begin PBXFrameworksBuildPhase section */ 48 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 49 | isa = PBXFrameworksBuildPhase; 50 | buildActionMask = 2147483647; 51 | files = ( 52 | ); 53 | runOnlyForDeploymentPostprocessing = 0; 54 | }; 55 | /* End PBXFrameworksBuildPhase section */ 56 | 57 | /* Begin PBXGroup section */ 58 | 9740EEB11CF90186004384FC /* Flutter */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 65 | ); 66 | name = Flutter; 67 | sourceTree = ""; 68 | }; 69 | 97C146E51CF9000F007C117D = { 70 | isa = PBXGroup; 71 | children = ( 72 | 9740EEB11CF90186004384FC /* Flutter */, 73 | 97C146F01CF9000F007C117D /* Runner */, 74 | 97C146EF1CF9000F007C117D /* Products */, 75 | ); 76 | sourceTree = ""; 77 | }; 78 | 97C146EF1CF9000F007C117D /* Products */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 97C146EE1CF9000F007C117D /* Runner.app */, 82 | ); 83 | name = Products; 84 | sourceTree = ""; 85 | }; 86 | 97C146F01CF9000F007C117D /* Runner */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 92 | 97C147021CF9000F007C117D /* Info.plist */, 93 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 94 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 95 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 96 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 97 | ); 98 | path = Runner; 99 | sourceTree = ""; 100 | }; 101 | /* End PBXGroup section */ 102 | 103 | /* Begin PBXNativeTarget section */ 104 | 97C146ED1CF9000F007C117D /* Runner */ = { 105 | isa = PBXNativeTarget; 106 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 107 | buildPhases = ( 108 | 9740EEB61CF901F6004384FC /* Run Script */, 109 | 97C146EA1CF9000F007C117D /* Sources */, 110 | 97C146EB1CF9000F007C117D /* Frameworks */, 111 | 97C146EC1CF9000F007C117D /* Resources */, 112 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 113 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 114 | ); 115 | buildRules = ( 116 | ); 117 | dependencies = ( 118 | ); 119 | name = Runner; 120 | productName = Runner; 121 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 122 | productType = "com.apple.product-type.application"; 123 | }; 124 | /* End PBXNativeTarget section */ 125 | 126 | /* Begin PBXProject section */ 127 | 97C146E61CF9000F007C117D /* Project object */ = { 128 | isa = PBXProject; 129 | attributes = { 130 | LastUpgradeCheck = 1300; 131 | ORGANIZATIONNAME = ""; 132 | TargetAttributes = { 133 | 97C146ED1CF9000F007C117D = { 134 | CreatedOnToolsVersion = 7.3.1; 135 | LastSwiftMigration = 1100; 136 | }; 137 | }; 138 | }; 139 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 140 | compatibilityVersion = "Xcode 9.3"; 141 | developmentRegion = en; 142 | hasScannedForEncodings = 0; 143 | knownRegions = ( 144 | en, 145 | Base, 146 | ); 147 | mainGroup = 97C146E51CF9000F007C117D; 148 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 149 | projectDirPath = ""; 150 | projectRoot = ""; 151 | targets = ( 152 | 97C146ED1CF9000F007C117D /* Runner */, 153 | ); 154 | }; 155 | /* End PBXProject section */ 156 | 157 | /* Begin PBXResourcesBuildPhase section */ 158 | 97C146EC1CF9000F007C117D /* Resources */ = { 159 | isa = PBXResourcesBuildPhase; 160 | buildActionMask = 2147483647; 161 | files = ( 162 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 163 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 164 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 165 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 166 | ); 167 | runOnlyForDeploymentPostprocessing = 0; 168 | }; 169 | /* End PBXResourcesBuildPhase section */ 170 | 171 | /* Begin PBXShellScriptBuildPhase section */ 172 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 173 | isa = PBXShellScriptBuildPhase; 174 | buildActionMask = 2147483647; 175 | files = ( 176 | ); 177 | inputPaths = ( 178 | ); 179 | name = "Thin Binary"; 180 | outputPaths = ( 181 | ); 182 | runOnlyForDeploymentPostprocessing = 0; 183 | shellPath = /bin/sh; 184 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 185 | }; 186 | 9740EEB61CF901F6004384FC /* Run Script */ = { 187 | isa = PBXShellScriptBuildPhase; 188 | buildActionMask = 2147483647; 189 | files = ( 190 | ); 191 | inputPaths = ( 192 | ); 193 | name = "Run Script"; 194 | outputPaths = ( 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | shellPath = /bin/sh; 198 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 199 | }; 200 | /* End PBXShellScriptBuildPhase section */ 201 | 202 | /* Begin PBXSourcesBuildPhase section */ 203 | 97C146EA1CF9000F007C117D /* Sources */ = { 204 | isa = PBXSourcesBuildPhase; 205 | buildActionMask = 2147483647; 206 | files = ( 207 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 208 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 209 | ); 210 | runOnlyForDeploymentPostprocessing = 0; 211 | }; 212 | /* End PBXSourcesBuildPhase section */ 213 | 214 | /* Begin PBXVariantGroup section */ 215 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 216 | isa = PBXVariantGroup; 217 | children = ( 218 | 97C146FB1CF9000F007C117D /* Base */, 219 | ); 220 | name = Main.storyboard; 221 | sourceTree = ""; 222 | }; 223 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 224 | isa = PBXVariantGroup; 225 | children = ( 226 | 97C147001CF9000F007C117D /* Base */, 227 | ); 228 | name = LaunchScreen.storyboard; 229 | sourceTree = ""; 230 | }; 231 | /* End PBXVariantGroup section */ 232 | 233 | /* Begin XCBuildConfiguration section */ 234 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 235 | isa = XCBuildConfiguration; 236 | buildSettings = { 237 | ALWAYS_SEARCH_USER_PATHS = NO; 238 | CLANG_ANALYZER_NONNULL = YES; 239 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 240 | CLANG_CXX_LIBRARY = "libc++"; 241 | CLANG_ENABLE_MODULES = YES; 242 | CLANG_ENABLE_OBJC_ARC = YES; 243 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 244 | CLANG_WARN_BOOL_CONVERSION = YES; 245 | CLANG_WARN_COMMA = YES; 246 | CLANG_WARN_CONSTANT_CONVERSION = YES; 247 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 248 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 249 | CLANG_WARN_EMPTY_BODY = YES; 250 | CLANG_WARN_ENUM_CONVERSION = YES; 251 | CLANG_WARN_INFINITE_RECURSION = YES; 252 | CLANG_WARN_INT_CONVERSION = YES; 253 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 254 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 255 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 256 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 257 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 258 | CLANG_WARN_STRICT_PROTOTYPES = YES; 259 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 260 | CLANG_WARN_UNREACHABLE_CODE = YES; 261 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 262 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 263 | COPY_PHASE_STRIP = NO; 264 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 265 | ENABLE_NS_ASSERTIONS = NO; 266 | ENABLE_STRICT_OBJC_MSGSEND = YES; 267 | GCC_C_LANGUAGE_STANDARD = gnu99; 268 | GCC_NO_COMMON_BLOCKS = YES; 269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 271 | GCC_WARN_UNDECLARED_SELECTOR = YES; 272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 273 | GCC_WARN_UNUSED_FUNCTION = YES; 274 | GCC_WARN_UNUSED_VARIABLE = YES; 275 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 276 | MTL_ENABLE_DEBUG_INFO = NO; 277 | SDKROOT = iphoneos; 278 | SUPPORTED_PLATFORMS = iphoneos; 279 | TARGETED_DEVICE_FAMILY = "1,2"; 280 | VALIDATE_PRODUCT = YES; 281 | }; 282 | name = Profile; 283 | }; 284 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 285 | isa = XCBuildConfiguration; 286 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 287 | buildSettings = { 288 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 289 | CLANG_ENABLE_MODULES = YES; 290 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 291 | ENABLE_BITCODE = NO; 292 | INFOPLIST_FILE = Runner/Info.plist; 293 | LD_RUNPATH_SEARCH_PATHS = ( 294 | "$(inherited)", 295 | "@executable_path/Frameworks", 296 | ); 297 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example; 298 | PRODUCT_NAME = "$(TARGET_NAME)"; 299 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 300 | SWIFT_VERSION = 5.0; 301 | VERSIONING_SYSTEM = "apple-generic"; 302 | }; 303 | name = Profile; 304 | }; 305 | 97C147031CF9000F007C117D /* Debug */ = { 306 | isa = XCBuildConfiguration; 307 | buildSettings = { 308 | ALWAYS_SEARCH_USER_PATHS = NO; 309 | CLANG_ANALYZER_NONNULL = YES; 310 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 311 | CLANG_CXX_LIBRARY = "libc++"; 312 | CLANG_ENABLE_MODULES = YES; 313 | CLANG_ENABLE_OBJC_ARC = YES; 314 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 315 | CLANG_WARN_BOOL_CONVERSION = YES; 316 | CLANG_WARN_COMMA = YES; 317 | CLANG_WARN_CONSTANT_CONVERSION = YES; 318 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 319 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 320 | CLANG_WARN_EMPTY_BODY = YES; 321 | CLANG_WARN_ENUM_CONVERSION = YES; 322 | CLANG_WARN_INFINITE_RECURSION = YES; 323 | CLANG_WARN_INT_CONVERSION = YES; 324 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 325 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 326 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 327 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 328 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 329 | CLANG_WARN_STRICT_PROTOTYPES = YES; 330 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 331 | CLANG_WARN_UNREACHABLE_CODE = YES; 332 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 333 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 334 | COPY_PHASE_STRIP = NO; 335 | DEBUG_INFORMATION_FORMAT = dwarf; 336 | ENABLE_STRICT_OBJC_MSGSEND = YES; 337 | ENABLE_TESTABILITY = YES; 338 | GCC_C_LANGUAGE_STANDARD = gnu99; 339 | GCC_DYNAMIC_NO_PIC = NO; 340 | GCC_NO_COMMON_BLOCKS = YES; 341 | GCC_OPTIMIZATION_LEVEL = 0; 342 | GCC_PREPROCESSOR_DEFINITIONS = ( 343 | "DEBUG=1", 344 | "$(inherited)", 345 | ); 346 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 347 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 348 | GCC_WARN_UNDECLARED_SELECTOR = YES; 349 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 350 | GCC_WARN_UNUSED_FUNCTION = YES; 351 | GCC_WARN_UNUSED_VARIABLE = YES; 352 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 353 | MTL_ENABLE_DEBUG_INFO = YES; 354 | ONLY_ACTIVE_ARCH = YES; 355 | SDKROOT = iphoneos; 356 | TARGETED_DEVICE_FAMILY = "1,2"; 357 | }; 358 | name = Debug; 359 | }; 360 | 97C147041CF9000F007C117D /* Release */ = { 361 | isa = XCBuildConfiguration; 362 | buildSettings = { 363 | ALWAYS_SEARCH_USER_PATHS = NO; 364 | CLANG_ANALYZER_NONNULL = YES; 365 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 366 | CLANG_CXX_LIBRARY = "libc++"; 367 | CLANG_ENABLE_MODULES = YES; 368 | CLANG_ENABLE_OBJC_ARC = YES; 369 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 370 | CLANG_WARN_BOOL_CONVERSION = YES; 371 | CLANG_WARN_COMMA = YES; 372 | CLANG_WARN_CONSTANT_CONVERSION = YES; 373 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 374 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 375 | CLANG_WARN_EMPTY_BODY = YES; 376 | CLANG_WARN_ENUM_CONVERSION = YES; 377 | CLANG_WARN_INFINITE_RECURSION = YES; 378 | CLANG_WARN_INT_CONVERSION = YES; 379 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 380 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 381 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 382 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 383 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 384 | CLANG_WARN_STRICT_PROTOTYPES = YES; 385 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 386 | CLANG_WARN_UNREACHABLE_CODE = YES; 387 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 388 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 389 | COPY_PHASE_STRIP = NO; 390 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 391 | ENABLE_NS_ASSERTIONS = NO; 392 | ENABLE_STRICT_OBJC_MSGSEND = YES; 393 | GCC_C_LANGUAGE_STANDARD = gnu99; 394 | GCC_NO_COMMON_BLOCKS = YES; 395 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 396 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 397 | GCC_WARN_UNDECLARED_SELECTOR = YES; 398 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 399 | GCC_WARN_UNUSED_FUNCTION = YES; 400 | GCC_WARN_UNUSED_VARIABLE = YES; 401 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 402 | MTL_ENABLE_DEBUG_INFO = NO; 403 | SDKROOT = iphoneos; 404 | SUPPORTED_PLATFORMS = iphoneos; 405 | SWIFT_COMPILATION_MODE = wholemodule; 406 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 407 | TARGETED_DEVICE_FAMILY = "1,2"; 408 | VALIDATE_PRODUCT = YES; 409 | }; 410 | name = Release; 411 | }; 412 | 97C147061CF9000F007C117D /* Debug */ = { 413 | isa = XCBuildConfiguration; 414 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 415 | buildSettings = { 416 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 417 | CLANG_ENABLE_MODULES = YES; 418 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 419 | ENABLE_BITCODE = NO; 420 | INFOPLIST_FILE = Runner/Info.plist; 421 | LD_RUNPATH_SEARCH_PATHS = ( 422 | "$(inherited)", 423 | "@executable_path/Frameworks", 424 | ); 425 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example; 426 | PRODUCT_NAME = "$(TARGET_NAME)"; 427 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 428 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 429 | SWIFT_VERSION = 5.0; 430 | VERSIONING_SYSTEM = "apple-generic"; 431 | }; 432 | name = Debug; 433 | }; 434 | 97C147071CF9000F007C117D /* Release */ = { 435 | isa = XCBuildConfiguration; 436 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 437 | buildSettings = { 438 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 439 | CLANG_ENABLE_MODULES = YES; 440 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 441 | ENABLE_BITCODE = NO; 442 | INFOPLIST_FILE = Runner/Info.plist; 443 | LD_RUNPATH_SEARCH_PATHS = ( 444 | "$(inherited)", 445 | "@executable_path/Frameworks", 446 | ); 447 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example; 448 | PRODUCT_NAME = "$(TARGET_NAME)"; 449 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 450 | SWIFT_VERSION = 5.0; 451 | VERSIONING_SYSTEM = "apple-generic"; 452 | }; 453 | name = Release; 454 | }; 455 | /* End XCBuildConfiguration section */ 456 | 457 | /* Begin XCConfigurationList section */ 458 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 459 | isa = XCConfigurationList; 460 | buildConfigurations = ( 461 | 97C147031CF9000F007C117D /* Debug */, 462 | 97C147041CF9000F007C117D /* Release */, 463 | 249021D3217E4FDB00AE95B9 /* Profile */, 464 | ); 465 | defaultConfigurationIsVisible = 0; 466 | defaultConfigurationName = Release; 467 | }; 468 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 469 | isa = XCConfigurationList; 470 | buildConfigurations = ( 471 | 97C147061CF9000F007C117D /* Debug */, 472 | 97C147071CF9000F007C117D /* Release */, 473 | 249021D4217E4FDB00AE95B9 /* Profile */, 474 | ); 475 | defaultConfigurationIsVisible = 0; 476 | defaultConfigurationName = Release; 477 | }; 478 | /* End XCConfigurationList section */ 479 | }; 480 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 481 | } 482 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Example 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | example 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | CADisableMinimumFrameDurationOnPhone 47 | 48 | UIApplicationSupportsIndirectInputEvents 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /example/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /example/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_map/flutter_map.dart'; 3 | import 'package:flutter_map_animations/flutter_map_animations.dart'; 4 | import 'package:flutter_map_cancellable_tile_provider/flutter_map_cancellable_tile_provider.dart'; 5 | import 'package:latlong2/latlong.dart'; 6 | 7 | void main() { 8 | runApp(const MyApp()); 9 | } 10 | 11 | class MyApp extends StatelessWidget { 12 | const MyApp({super.key}); 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return const MaterialApp( 17 | home: MyHomePage(), 18 | ); 19 | } 20 | } 21 | 22 | class MyHomePage extends StatefulWidget { 23 | const MyHomePage({super.key}); 24 | 25 | @override 26 | State createState() => _MyHomePageState(); 27 | } 28 | 29 | class _MyHomePageState extends State with TickerProviderStateMixin { 30 | static const _useTransformerId = 'useTransformerId'; 31 | 32 | final markers = ValueNotifier>([]); 33 | final center = const LatLng(51.509364, -0.128928); 34 | 35 | bool _useTransformer = true; 36 | int _lastMovedToMarkerIndex = -1; 37 | 38 | late final _animatedMapController = AnimatedMapController(vsync: this); 39 | 40 | @override 41 | void dispose() { 42 | markers.dispose(); 43 | _animatedMapController.dispose(); 44 | super.dispose(); 45 | } 46 | 47 | @override 48 | Widget build(BuildContext context) { 49 | return Scaffold( 50 | body: ValueListenableBuilder>( 51 | valueListenable: markers, 52 | builder: (context, markers, _) { 53 | return FlutterMap( 54 | mapController: _animatedMapController.mapController, 55 | options: MapOptions( 56 | initialCenter: center, 57 | onTap: (_, point) => _addMarker(point), 58 | ), 59 | children: [ 60 | TileLayer( 61 | urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png', 62 | userAgentPackageName: 'com.example.app', 63 | tileUpdateTransformer: _animatedMoveTileUpdateTransformer, 64 | tileProvider: CancellableNetworkTileProvider(), 65 | ), 66 | AnimatedMarkerLayer(markers: markers), 67 | ], 68 | ); 69 | }, 70 | ), 71 | floatingActionButton: SeparatedColumn( 72 | mainAxisSize: MainAxisSize.min, 73 | crossAxisAlignment: CrossAxisAlignment.end, 74 | separator: const SizedBox(height: 8), 75 | children: [ 76 | FloatingActionButton( 77 | onPressed: () => _animatedMapController.animatedRotateFrom( 78 | 90, 79 | customId: _useTransformer ? _useTransformerId : null, 80 | ), 81 | tooltip: 'Rotate 90°', 82 | child: const Icon(Icons.rotate_right), 83 | ), 84 | FloatingActionButton( 85 | onPressed: () => _animatedMapController.animatedRotateFrom( 86 | -90, 87 | customId: _useTransformer ? _useTransformerId : null, 88 | ), 89 | tooltip: 'Rotate -90°', 90 | child: const Icon(Icons.rotate_left), 91 | ), 92 | FloatingActionButton( 93 | onPressed: () { 94 | markers.value = []; 95 | _animatedMapController.animateTo( 96 | dest: center, 97 | rotation: 0, 98 | customId: _useTransformer ? _useTransformerId : null, 99 | ); 100 | }, 101 | tooltip: 'Clear modifications', 102 | child: const Icon(Icons.clear_all), 103 | ), 104 | FloatingActionButton( 105 | onPressed: () => _animatedMapController.animatedZoomIn( 106 | customId: _useTransformer ? _useTransformerId : null, 107 | ), 108 | tooltip: 'Zoom in', 109 | child: const Icon(Icons.zoom_in), 110 | ), 111 | FloatingActionButton( 112 | onPressed: () => _animatedMapController.animatedZoomOut( 113 | customId: _useTransformer ? _useTransformerId : null, 114 | ), 115 | tooltip: 'Zoom out', 116 | child: const Icon(Icons.zoom_out), 117 | ), 118 | FloatingActionButton( 119 | tooltip: 'Center on markers', 120 | onPressed: () { 121 | if (markers.value.length < 2) return; 122 | 123 | final points = markers.value.map((m) => m.point).toList(); 124 | _animatedMapController.animatedFitCamera( 125 | cameraFit: CameraFit.coordinates( 126 | coordinates: points, 127 | padding: const EdgeInsets.all(12), 128 | ), 129 | rotation: 0, 130 | customId: _useTransformer ? _useTransformerId : null, 131 | ); 132 | }, 133 | child: const Icon(Icons.center_focus_strong), 134 | ), 135 | Row( 136 | mainAxisSize: MainAxisSize.min, 137 | children: [ 138 | FloatingActionButton( 139 | tooltip: 'Move to next marker with offset', 140 | onPressed: () { 141 | if (markers.value.isEmpty) return; 142 | 143 | final points = markers.value.map((m) => m.point); 144 | setState( 145 | () => _lastMovedToMarkerIndex = 146 | (_lastMovedToMarkerIndex + 1) % points.length, 147 | ); 148 | 149 | _animatedMapController.animateTo( 150 | dest: points.elementAt(_lastMovedToMarkerIndex), 151 | customId: _useTransformer ? _useTransformerId : null, 152 | offset: const Offset(100, 100), 153 | ); 154 | }, 155 | child: const Icon(Icons.multiple_stop), 156 | ), 157 | const SizedBox.square(dimension: 8), 158 | FloatingActionButton( 159 | tooltip: 'Move to next marker', 160 | onPressed: () { 161 | if (markers.value.isEmpty) return; 162 | 163 | final points = markers.value.map((m) => m.point); 164 | setState( 165 | () => _lastMovedToMarkerIndex = 166 | (_lastMovedToMarkerIndex + 1) % points.length, 167 | ); 168 | 169 | _animatedMapController.animateTo( 170 | dest: points.elementAt(_lastMovedToMarkerIndex), 171 | customId: _useTransformer ? _useTransformerId : null, 172 | ); 173 | }, 174 | child: const Icon(Icons.polyline_rounded), 175 | ), 176 | ], 177 | ), 178 | FloatingActionButton.extended( 179 | label: Row( 180 | children: [ 181 | const Text('Transformer'), 182 | Switch( 183 | activeColor: Colors.blue.shade200, 184 | activeTrackColor: Colors.black38, 185 | value: _useTransformer, 186 | onChanged: (newValue) { 187 | setState(() => _useTransformer = newValue); 188 | }, 189 | ), 190 | ], 191 | ), 192 | onPressed: () { 193 | setState(() => _useTransformer = !_useTransformer); 194 | }, 195 | ), 196 | ], 197 | ), 198 | ); 199 | } 200 | 201 | void _addMarker(LatLng point) { 202 | markers.value = List.from(markers.value) 203 | ..add( 204 | MyMarker( 205 | point: point, 206 | onTap: () => _animatedMapController.animateTo( 207 | dest: point, 208 | customId: _useTransformer ? _useTransformerId : null, 209 | ), 210 | ), 211 | ); 212 | } 213 | } 214 | 215 | class MyMarker extends AnimatedMarker { 216 | MyMarker({ 217 | required super.point, 218 | VoidCallback? onTap, 219 | }) : super( 220 | width: markerSize, 221 | height: markerSize, 222 | builder: (context, animation) { 223 | final size = markerSize * animation.value; 224 | 225 | return GestureDetector( 226 | onTap: onTap, 227 | child: Opacity( 228 | opacity: animation.value, 229 | child: Icon( 230 | Icons.room, 231 | size: size, 232 | ), 233 | ), 234 | ); 235 | }, 236 | ); 237 | 238 | static const markerSize = 50.0; 239 | } 240 | 241 | class SeparatedColumn extends StatelessWidget { 242 | const SeparatedColumn({ 243 | super.key, 244 | required this.separator, 245 | this.children = const [], 246 | this.mainAxisSize = MainAxisSize.max, 247 | this.crossAxisAlignment = CrossAxisAlignment.start, 248 | }); 249 | 250 | final Widget separator; 251 | final List children; 252 | final MainAxisSize mainAxisSize; 253 | final CrossAxisAlignment crossAxisAlignment; 254 | 255 | @override 256 | Widget build(BuildContext context) { 257 | return Column( 258 | mainAxisSize: mainAxisSize, 259 | crossAxisAlignment: crossAxisAlignment, 260 | children: [ 261 | ..._buildChildren(), 262 | ], 263 | ); 264 | } 265 | 266 | Iterable _buildChildren() sync* { 267 | for (var i = 0; i < children.length; i++) { 268 | yield children[i]; 269 | if (i < children.length - 1) yield separator; 270 | } 271 | } 272 | } 273 | 274 | /// Inspired by the contribution of [rorystephenson](https://github.com/fleaflet/flutter_map/pull/1475/files#diff-b663bf9f32e20dbe004bd1b58a53408aa4d0c28bcc29940156beb3f34e364556) 275 | final _animatedMoveTileUpdateTransformer = TileUpdateTransformer.fromHandlers( 276 | handleData: (updateEvent, sink) { 277 | final id = AnimationId.fromMapEvent(updateEvent.mapEvent); 278 | 279 | if (id == null) return sink.add(updateEvent); 280 | if (id.customId != _MyHomePageState._useTransformerId) { 281 | if (id.moveId == AnimatedMoveId.started) { 282 | debugPrint('TileUpdateTransformer disabled, using default behaviour.'); 283 | } 284 | return sink.add(updateEvent); 285 | } 286 | 287 | switch (id.moveId) { 288 | case AnimatedMoveId.started: 289 | debugPrint('Loading tiles at animation destination.'); 290 | sink.add( 291 | updateEvent.loadOnly( 292 | loadCenterOverride: id.destLocation, 293 | loadZoomOverride: id.destZoom, 294 | ), 295 | ); 296 | break; 297 | case AnimatedMoveId.inProgress: 298 | // Do not prune or load during movement. 299 | break; 300 | case AnimatedMoveId.finished: 301 | debugPrint('Pruning tiles after animated movement.'); 302 | sink.add(updateEvent.pruneOnly()); 303 | break; 304 | } 305 | }, 306 | ); 307 | -------------------------------------------------------------------------------- /example/macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /example/macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /example/macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /example/macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | 9 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 10 | } 11 | -------------------------------------------------------------------------------- /example/macos/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 51; 7 | objects = { 8 | 9 | /* Begin PBXAggregateTarget section */ 10 | 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { 11 | isa = PBXAggregateTarget; 12 | buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; 13 | buildPhases = ( 14 | 33CC111E2044C6BF0003C045 /* ShellScript */, 15 | ); 16 | dependencies = ( 17 | ); 18 | name = "Flutter Assemble"; 19 | productName = FLX; 20 | }; 21 | /* End PBXAggregateTarget section */ 22 | 23 | /* Begin PBXBuildFile section */ 24 | 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; 25 | 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; 26 | 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; 27 | 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; 28 | 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; 29 | /* End PBXBuildFile section */ 30 | 31 | /* Begin PBXContainerItemProxy section */ 32 | 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { 33 | isa = PBXContainerItemProxy; 34 | containerPortal = 33CC10E52044A3C60003C045 /* Project object */; 35 | proxyType = 1; 36 | remoteGlobalIDString = 33CC111A2044C6BA0003C045; 37 | remoteInfo = FLX; 38 | }; 39 | /* End PBXContainerItemProxy section */ 40 | 41 | /* Begin PBXCopyFilesBuildPhase section */ 42 | 33CC110E2044A8840003C045 /* Bundle Framework */ = { 43 | isa = PBXCopyFilesBuildPhase; 44 | buildActionMask = 2147483647; 45 | dstPath = ""; 46 | dstSubfolderSpec = 10; 47 | files = ( 48 | ); 49 | name = "Bundle Framework"; 50 | runOnlyForDeploymentPostprocessing = 0; 51 | }; 52 | /* End PBXCopyFilesBuildPhase section */ 53 | 54 | /* Begin PBXFileReference section */ 55 | 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; 56 | 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; 57 | 33CC10ED2044A3C60003C045 /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 58 | 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 59 | 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; 60 | 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; 61 | 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; }; 62 | 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; }; 63 | 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; }; 64 | 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; }; 65 | 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; }; 66 | 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; 67 | 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; 68 | 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; 69 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; 70 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; 71 | /* End PBXFileReference section */ 72 | 73 | /* Begin PBXFrameworksBuildPhase section */ 74 | 33CC10EA2044A3C60003C045 /* Frameworks */ = { 75 | isa = PBXFrameworksBuildPhase; 76 | buildActionMask = 2147483647; 77 | files = ( 78 | ); 79 | runOnlyForDeploymentPostprocessing = 0; 80 | }; 81 | /* End PBXFrameworksBuildPhase section */ 82 | 83 | /* Begin PBXGroup section */ 84 | 33BA886A226E78AF003329D5 /* Configs */ = { 85 | isa = PBXGroup; 86 | children = ( 87 | 33E5194F232828860026EE4D /* AppInfo.xcconfig */, 88 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 89 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 90 | 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, 91 | ); 92 | path = Configs; 93 | sourceTree = ""; 94 | }; 95 | 33CC10E42044A3C60003C045 = { 96 | isa = PBXGroup; 97 | children = ( 98 | 33FAB671232836740065AC1E /* Runner */, 99 | 33CEB47122A05771004F2AC0 /* Flutter */, 100 | 33CC10EE2044A3C60003C045 /* Products */, 101 | D73912EC22F37F3D000D13A0 /* Frameworks */, 102 | ); 103 | sourceTree = ""; 104 | }; 105 | 33CC10EE2044A3C60003C045 /* Products */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | 33CC10ED2044A3C60003C045 /* example.app */, 109 | ); 110 | name = Products; 111 | sourceTree = ""; 112 | }; 113 | 33CC11242044D66E0003C045 /* Resources */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 33CC10F22044A3C60003C045 /* Assets.xcassets */, 117 | 33CC10F42044A3C60003C045 /* MainMenu.xib */, 118 | 33CC10F72044A3C60003C045 /* Info.plist */, 119 | ); 120 | name = Resources; 121 | path = ..; 122 | sourceTree = ""; 123 | }; 124 | 33CEB47122A05771004F2AC0 /* Flutter */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, 128 | 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, 129 | 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, 130 | 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, 131 | ); 132 | path = Flutter; 133 | sourceTree = ""; 134 | }; 135 | 33FAB671232836740065AC1E /* Runner */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | 33CC10F02044A3C60003C045 /* AppDelegate.swift */, 139 | 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, 140 | 33E51913231747F40026EE4D /* DebugProfile.entitlements */, 141 | 33E51914231749380026EE4D /* Release.entitlements */, 142 | 33CC11242044D66E0003C045 /* Resources */, 143 | 33BA886A226E78AF003329D5 /* Configs */, 144 | ); 145 | path = Runner; 146 | sourceTree = ""; 147 | }; 148 | D73912EC22F37F3D000D13A0 /* Frameworks */ = { 149 | isa = PBXGroup; 150 | children = ( 151 | ); 152 | name = Frameworks; 153 | sourceTree = ""; 154 | }; 155 | /* End PBXGroup section */ 156 | 157 | /* Begin PBXNativeTarget section */ 158 | 33CC10EC2044A3C60003C045 /* Runner */ = { 159 | isa = PBXNativeTarget; 160 | buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; 161 | buildPhases = ( 162 | 33CC10E92044A3C60003C045 /* Sources */, 163 | 33CC10EA2044A3C60003C045 /* Frameworks */, 164 | 33CC10EB2044A3C60003C045 /* Resources */, 165 | 33CC110E2044A8840003C045 /* Bundle Framework */, 166 | 3399D490228B24CF009A79C7 /* ShellScript */, 167 | ); 168 | buildRules = ( 169 | ); 170 | dependencies = ( 171 | 33CC11202044C79F0003C045 /* PBXTargetDependency */, 172 | ); 173 | name = Runner; 174 | productName = Runner; 175 | productReference = 33CC10ED2044A3C60003C045 /* example.app */; 176 | productType = "com.apple.product-type.application"; 177 | }; 178 | /* End PBXNativeTarget section */ 179 | 180 | /* Begin PBXProject section */ 181 | 33CC10E52044A3C60003C045 /* Project object */ = { 182 | isa = PBXProject; 183 | attributes = { 184 | LastSwiftUpdateCheck = 0920; 185 | LastUpgradeCheck = 1300; 186 | ORGANIZATIONNAME = ""; 187 | TargetAttributes = { 188 | 33CC10EC2044A3C60003C045 = { 189 | CreatedOnToolsVersion = 9.2; 190 | LastSwiftMigration = 1100; 191 | ProvisioningStyle = Automatic; 192 | SystemCapabilities = { 193 | com.apple.Sandbox = { 194 | enabled = 1; 195 | }; 196 | }; 197 | }; 198 | 33CC111A2044C6BA0003C045 = { 199 | CreatedOnToolsVersion = 9.2; 200 | ProvisioningStyle = Manual; 201 | }; 202 | }; 203 | }; 204 | buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; 205 | compatibilityVersion = "Xcode 9.3"; 206 | developmentRegion = en; 207 | hasScannedForEncodings = 0; 208 | knownRegions = ( 209 | en, 210 | Base, 211 | ); 212 | mainGroup = 33CC10E42044A3C60003C045; 213 | productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; 214 | projectDirPath = ""; 215 | projectRoot = ""; 216 | targets = ( 217 | 33CC10EC2044A3C60003C045 /* Runner */, 218 | 33CC111A2044C6BA0003C045 /* Flutter Assemble */, 219 | ); 220 | }; 221 | /* End PBXProject section */ 222 | 223 | /* Begin PBXResourcesBuildPhase section */ 224 | 33CC10EB2044A3C60003C045 /* Resources */ = { 225 | isa = PBXResourcesBuildPhase; 226 | buildActionMask = 2147483647; 227 | files = ( 228 | 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, 229 | 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, 230 | ); 231 | runOnlyForDeploymentPostprocessing = 0; 232 | }; 233 | /* End PBXResourcesBuildPhase section */ 234 | 235 | /* Begin PBXShellScriptBuildPhase section */ 236 | 3399D490228B24CF009A79C7 /* ShellScript */ = { 237 | isa = PBXShellScriptBuildPhase; 238 | buildActionMask = 2147483647; 239 | files = ( 240 | ); 241 | inputFileListPaths = ( 242 | ); 243 | inputPaths = ( 244 | ); 245 | outputFileListPaths = ( 246 | ); 247 | outputPaths = ( 248 | ); 249 | runOnlyForDeploymentPostprocessing = 0; 250 | shellPath = /bin/sh; 251 | shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; 252 | }; 253 | 33CC111E2044C6BF0003C045 /* ShellScript */ = { 254 | isa = PBXShellScriptBuildPhase; 255 | buildActionMask = 2147483647; 256 | files = ( 257 | ); 258 | inputFileListPaths = ( 259 | Flutter/ephemeral/FlutterInputs.xcfilelist, 260 | ); 261 | inputPaths = ( 262 | Flutter/ephemeral/tripwire, 263 | ); 264 | outputFileListPaths = ( 265 | Flutter/ephemeral/FlutterOutputs.xcfilelist, 266 | ); 267 | outputPaths = ( 268 | ); 269 | runOnlyForDeploymentPostprocessing = 0; 270 | shellPath = /bin/sh; 271 | shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; 272 | }; 273 | /* End PBXShellScriptBuildPhase section */ 274 | 275 | /* Begin PBXSourcesBuildPhase section */ 276 | 33CC10E92044A3C60003C045 /* Sources */ = { 277 | isa = PBXSourcesBuildPhase; 278 | buildActionMask = 2147483647; 279 | files = ( 280 | 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, 281 | 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, 282 | 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, 283 | ); 284 | runOnlyForDeploymentPostprocessing = 0; 285 | }; 286 | /* End PBXSourcesBuildPhase section */ 287 | 288 | /* Begin PBXTargetDependency section */ 289 | 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { 290 | isa = PBXTargetDependency; 291 | target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; 292 | targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; 293 | }; 294 | /* End PBXTargetDependency section */ 295 | 296 | /* Begin PBXVariantGroup section */ 297 | 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { 298 | isa = PBXVariantGroup; 299 | children = ( 300 | 33CC10F52044A3C60003C045 /* Base */, 301 | ); 302 | name = MainMenu.xib; 303 | path = Runner; 304 | sourceTree = ""; 305 | }; 306 | /* End PBXVariantGroup section */ 307 | 308 | /* Begin XCBuildConfiguration section */ 309 | 338D0CE9231458BD00FA5F75 /* Profile */ = { 310 | isa = XCBuildConfiguration; 311 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 312 | buildSettings = { 313 | ALWAYS_SEARCH_USER_PATHS = NO; 314 | CLANG_ANALYZER_NONNULL = YES; 315 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 316 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 317 | CLANG_CXX_LIBRARY = "libc++"; 318 | CLANG_ENABLE_MODULES = YES; 319 | CLANG_ENABLE_OBJC_ARC = YES; 320 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 321 | CLANG_WARN_BOOL_CONVERSION = YES; 322 | CLANG_WARN_CONSTANT_CONVERSION = YES; 323 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 324 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 325 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 326 | CLANG_WARN_EMPTY_BODY = YES; 327 | CLANG_WARN_ENUM_CONVERSION = YES; 328 | CLANG_WARN_INFINITE_RECURSION = YES; 329 | CLANG_WARN_INT_CONVERSION = YES; 330 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 331 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 332 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 333 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 334 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 335 | CODE_SIGN_IDENTITY = "-"; 336 | COPY_PHASE_STRIP = NO; 337 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 338 | ENABLE_NS_ASSERTIONS = NO; 339 | ENABLE_STRICT_OBJC_MSGSEND = YES; 340 | GCC_C_LANGUAGE_STANDARD = gnu11; 341 | GCC_NO_COMMON_BLOCKS = YES; 342 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 343 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 344 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 345 | GCC_WARN_UNUSED_FUNCTION = YES; 346 | GCC_WARN_UNUSED_VARIABLE = YES; 347 | MACOSX_DEPLOYMENT_TARGET = 10.11; 348 | MTL_ENABLE_DEBUG_INFO = NO; 349 | SDKROOT = macosx; 350 | SWIFT_COMPILATION_MODE = wholemodule; 351 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 352 | }; 353 | name = Profile; 354 | }; 355 | 338D0CEA231458BD00FA5F75 /* Profile */ = { 356 | isa = XCBuildConfiguration; 357 | baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; 358 | buildSettings = { 359 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 360 | CLANG_ENABLE_MODULES = YES; 361 | CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; 362 | CODE_SIGN_STYLE = Automatic; 363 | COMBINE_HIDPI_IMAGES = YES; 364 | INFOPLIST_FILE = Runner/Info.plist; 365 | LD_RUNPATH_SEARCH_PATHS = ( 366 | "$(inherited)", 367 | "@executable_path/../Frameworks", 368 | ); 369 | PROVISIONING_PROFILE_SPECIFIER = ""; 370 | SWIFT_VERSION = 5.0; 371 | }; 372 | name = Profile; 373 | }; 374 | 338D0CEB231458BD00FA5F75 /* Profile */ = { 375 | isa = XCBuildConfiguration; 376 | buildSettings = { 377 | CODE_SIGN_STYLE = Manual; 378 | PRODUCT_NAME = "$(TARGET_NAME)"; 379 | }; 380 | name = Profile; 381 | }; 382 | 33CC10F92044A3C60003C045 /* Debug */ = { 383 | isa = XCBuildConfiguration; 384 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 385 | buildSettings = { 386 | ALWAYS_SEARCH_USER_PATHS = NO; 387 | CLANG_ANALYZER_NONNULL = YES; 388 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 389 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 390 | CLANG_CXX_LIBRARY = "libc++"; 391 | CLANG_ENABLE_MODULES = YES; 392 | CLANG_ENABLE_OBJC_ARC = YES; 393 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 394 | CLANG_WARN_BOOL_CONVERSION = YES; 395 | CLANG_WARN_CONSTANT_CONVERSION = YES; 396 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 397 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 398 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 399 | CLANG_WARN_EMPTY_BODY = YES; 400 | CLANG_WARN_ENUM_CONVERSION = YES; 401 | CLANG_WARN_INFINITE_RECURSION = YES; 402 | CLANG_WARN_INT_CONVERSION = YES; 403 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 404 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 405 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 406 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 407 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 408 | CODE_SIGN_IDENTITY = "-"; 409 | COPY_PHASE_STRIP = NO; 410 | DEBUG_INFORMATION_FORMAT = dwarf; 411 | ENABLE_STRICT_OBJC_MSGSEND = YES; 412 | ENABLE_TESTABILITY = YES; 413 | GCC_C_LANGUAGE_STANDARD = gnu11; 414 | GCC_DYNAMIC_NO_PIC = NO; 415 | GCC_NO_COMMON_BLOCKS = YES; 416 | GCC_OPTIMIZATION_LEVEL = 0; 417 | GCC_PREPROCESSOR_DEFINITIONS = ( 418 | "DEBUG=1", 419 | "$(inherited)", 420 | ); 421 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 422 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 423 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 424 | GCC_WARN_UNUSED_FUNCTION = YES; 425 | GCC_WARN_UNUSED_VARIABLE = YES; 426 | MACOSX_DEPLOYMENT_TARGET = 10.11; 427 | MTL_ENABLE_DEBUG_INFO = YES; 428 | ONLY_ACTIVE_ARCH = YES; 429 | SDKROOT = macosx; 430 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 431 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 432 | }; 433 | name = Debug; 434 | }; 435 | 33CC10FA2044A3C60003C045 /* Release */ = { 436 | isa = XCBuildConfiguration; 437 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 438 | buildSettings = { 439 | ALWAYS_SEARCH_USER_PATHS = NO; 440 | CLANG_ANALYZER_NONNULL = YES; 441 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 442 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 443 | CLANG_CXX_LIBRARY = "libc++"; 444 | CLANG_ENABLE_MODULES = YES; 445 | CLANG_ENABLE_OBJC_ARC = YES; 446 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 447 | CLANG_WARN_BOOL_CONVERSION = YES; 448 | CLANG_WARN_CONSTANT_CONVERSION = YES; 449 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 450 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 451 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 452 | CLANG_WARN_EMPTY_BODY = YES; 453 | CLANG_WARN_ENUM_CONVERSION = YES; 454 | CLANG_WARN_INFINITE_RECURSION = YES; 455 | CLANG_WARN_INT_CONVERSION = YES; 456 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 457 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 458 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 459 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 460 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 461 | CODE_SIGN_IDENTITY = "-"; 462 | COPY_PHASE_STRIP = NO; 463 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 464 | ENABLE_NS_ASSERTIONS = NO; 465 | ENABLE_STRICT_OBJC_MSGSEND = YES; 466 | GCC_C_LANGUAGE_STANDARD = gnu11; 467 | GCC_NO_COMMON_BLOCKS = YES; 468 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 469 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 470 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 471 | GCC_WARN_UNUSED_FUNCTION = YES; 472 | GCC_WARN_UNUSED_VARIABLE = YES; 473 | MACOSX_DEPLOYMENT_TARGET = 10.11; 474 | MTL_ENABLE_DEBUG_INFO = NO; 475 | SDKROOT = macosx; 476 | SWIFT_COMPILATION_MODE = wholemodule; 477 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 478 | }; 479 | name = Release; 480 | }; 481 | 33CC10FC2044A3C60003C045 /* Debug */ = { 482 | isa = XCBuildConfiguration; 483 | baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; 484 | buildSettings = { 485 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 486 | CLANG_ENABLE_MODULES = YES; 487 | CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; 488 | CODE_SIGN_STYLE = Automatic; 489 | COMBINE_HIDPI_IMAGES = YES; 490 | INFOPLIST_FILE = Runner/Info.plist; 491 | LD_RUNPATH_SEARCH_PATHS = ( 492 | "$(inherited)", 493 | "@executable_path/../Frameworks", 494 | ); 495 | PROVISIONING_PROFILE_SPECIFIER = ""; 496 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 497 | SWIFT_VERSION = 5.0; 498 | }; 499 | name = Debug; 500 | }; 501 | 33CC10FD2044A3C60003C045 /* Release */ = { 502 | isa = XCBuildConfiguration; 503 | baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; 504 | buildSettings = { 505 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 506 | CLANG_ENABLE_MODULES = YES; 507 | CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; 508 | CODE_SIGN_STYLE = Automatic; 509 | COMBINE_HIDPI_IMAGES = YES; 510 | INFOPLIST_FILE = Runner/Info.plist; 511 | LD_RUNPATH_SEARCH_PATHS = ( 512 | "$(inherited)", 513 | "@executable_path/../Frameworks", 514 | ); 515 | PROVISIONING_PROFILE_SPECIFIER = ""; 516 | SWIFT_VERSION = 5.0; 517 | }; 518 | name = Release; 519 | }; 520 | 33CC111C2044C6BA0003C045 /* Debug */ = { 521 | isa = XCBuildConfiguration; 522 | buildSettings = { 523 | CODE_SIGN_STYLE = Manual; 524 | PRODUCT_NAME = "$(TARGET_NAME)"; 525 | }; 526 | name = Debug; 527 | }; 528 | 33CC111D2044C6BA0003C045 /* Release */ = { 529 | isa = XCBuildConfiguration; 530 | buildSettings = { 531 | CODE_SIGN_STYLE = Automatic; 532 | PRODUCT_NAME = "$(TARGET_NAME)"; 533 | }; 534 | name = Release; 535 | }; 536 | /* End XCBuildConfiguration section */ 537 | 538 | /* Begin XCConfigurationList section */ 539 | 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { 540 | isa = XCConfigurationList; 541 | buildConfigurations = ( 542 | 33CC10F92044A3C60003C045 /* Debug */, 543 | 33CC10FA2044A3C60003C045 /* Release */, 544 | 338D0CE9231458BD00FA5F75 /* Profile */, 545 | ); 546 | defaultConfigurationIsVisible = 0; 547 | defaultConfigurationName = Release; 548 | }; 549 | 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { 550 | isa = XCConfigurationList; 551 | buildConfigurations = ( 552 | 33CC10FC2044A3C60003C045 /* Debug */, 553 | 33CC10FD2044A3C60003C045 /* Release */, 554 | 338D0CEA231458BD00FA5F75 /* Profile */, 555 | ); 556 | defaultConfigurationIsVisible = 0; 557 | defaultConfigurationName = Release; 558 | }; 559 | 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { 560 | isa = XCConfigurationList; 561 | buildConfigurations = ( 562 | 33CC111C2044C6BA0003C045 /* Debug */, 563 | 33CC111D2044C6BA0003C045 /* Release */, 564 | 338D0CEB231458BD00FA5F75 /* Profile */, 565 | ); 566 | defaultConfigurationIsVisible = 0; 567 | defaultConfigurationName = Release; 568 | }; 569 | /* End XCConfigurationList section */ 570 | }; 571 | rootObject = 33CC10E52044A3C60003C045 /* Project object */; 572 | } 573 | -------------------------------------------------------------------------------- /example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /example/macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @NSApplicationMain 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "app_icon_16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "app_icon_32.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "app_icon_32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "app_icon_64.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "app_icon_128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "app_icon_256.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "app_icon_256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "app_icon_512.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "app_icon_512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "app_icon_1024.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /example/macos/Runner/Base.lproj/MainMenu.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | -------------------------------------------------------------------------------- /example/macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = example 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2022 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /example/macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /example/macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /example/macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /example/macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /example/macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | $(PRODUCT_COPYRIGHT) 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /example/macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController.init() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /example/macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" 9 | url: "https://pub.dev" 10 | source: hosted 11 | version: "2.11.0" 12 | boolean_selector: 13 | dependency: transitive 14 | description: 15 | name: boolean_selector 16 | sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" 17 | url: "https://pub.dev" 18 | source: hosted 19 | version: "2.1.1" 20 | characters: 21 | dependency: transitive 22 | description: 23 | name: characters 24 | sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" 25 | url: "https://pub.dev" 26 | source: hosted 27 | version: "1.3.0" 28 | clock: 29 | dependency: transitive 30 | description: 31 | name: clock 32 | sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf 33 | url: "https://pub.dev" 34 | source: hosted 35 | version: "1.1.1" 36 | collection: 37 | dependency: transitive 38 | description: 39 | name: collection 40 | sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf 41 | url: "https://pub.dev" 42 | source: hosted 43 | version: "1.19.0" 44 | dart_earcut: 45 | dependency: transitive 46 | description: 47 | name: dart_earcut 48 | sha256: e485001bfc05dcbc437d7bfb666316182e3522d4c3f9668048e004d0eb2ce43b 49 | url: "https://pub.dev" 50 | source: hosted 51 | version: "1.2.0" 52 | dio: 53 | dependency: transitive 54 | description: 55 | name: dio 56 | sha256: "253a18bbd4851fecba42f7343a1df3a9a4c1d31a2c1b37e221086b4fa8c8dbc9" 57 | url: "https://pub.dev" 58 | source: hosted 59 | version: "5.8.0+1" 60 | dio_web_adapter: 61 | dependency: transitive 62 | description: 63 | name: dio_web_adapter 64 | sha256: e485c7a39ff2b384fa1d7e09b4e25f755804de8384358049124830b04fc4f93a 65 | url: "https://pub.dev" 66 | source: hosted 67 | version: "2.1.0" 68 | fake_async: 69 | dependency: transitive 70 | description: 71 | name: fake_async 72 | sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" 73 | url: "https://pub.dev" 74 | source: hosted 75 | version: "1.3.1" 76 | flutter: 77 | dependency: "direct main" 78 | description: flutter 79 | source: sdk 80 | version: "0.0.0" 81 | flutter_lints: 82 | dependency: "direct dev" 83 | description: 84 | name: flutter_lints 85 | sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" 86 | url: "https://pub.dev" 87 | source: hosted 88 | version: "4.0.0" 89 | flutter_map: 90 | dependency: "direct main" 91 | description: 92 | name: flutter_map 93 | sha256: "82786b8e1ffbff079487eeeed59a34e8a0b09896dd7713d8e1dc193d673496b5" 94 | url: "https://pub.dev" 95 | source: hosted 96 | version: "8.0.0" 97 | flutter_map_animations: 98 | dependency: "direct main" 99 | description: 100 | path: ".." 101 | relative: true 102 | source: path 103 | version: "0.8.0" 104 | flutter_map_cancellable_tile_provider: 105 | dependency: "direct main" 106 | description: 107 | name: flutter_map_cancellable_tile_provider 108 | sha256: "801760c104a3cfd9268cda7c9b1241223247e8182613a7e060ef4ffc0d825ac8" 109 | url: "https://pub.dev" 110 | source: hosted 111 | version: "3.1.0" 112 | flutter_test: 113 | dependency: "direct dev" 114 | description: flutter 115 | source: sdk 116 | version: "0.0.0" 117 | http: 118 | dependency: transitive 119 | description: 120 | name: http 121 | sha256: fe7ab022b76f3034adc518fb6ea04a82387620e19977665ea18d30a1cf43442f 122 | url: "https://pub.dev" 123 | source: hosted 124 | version: "1.3.0" 125 | http_parser: 126 | dependency: transitive 127 | description: 128 | name: http_parser 129 | sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" 130 | url: "https://pub.dev" 131 | source: hosted 132 | version: "4.1.2" 133 | intl: 134 | dependency: transitive 135 | description: 136 | name: intl 137 | sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5" 138 | url: "https://pub.dev" 139 | source: hosted 140 | version: "0.20.2" 141 | latlong2: 142 | dependency: "direct main" 143 | description: 144 | name: latlong2 145 | sha256: "98227922caf49e6056f91b6c56945ea1c7b166f28ffcd5fb8e72fc0b453cc8fe" 146 | url: "https://pub.dev" 147 | source: hosted 148 | version: "0.9.1" 149 | leak_tracker: 150 | dependency: transitive 151 | description: 152 | name: leak_tracker 153 | sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" 154 | url: "https://pub.dev" 155 | source: hosted 156 | version: "10.0.7" 157 | leak_tracker_flutter_testing: 158 | dependency: transitive 159 | description: 160 | name: leak_tracker_flutter_testing 161 | sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" 162 | url: "https://pub.dev" 163 | source: hosted 164 | version: "3.0.8" 165 | leak_tracker_testing: 166 | dependency: transitive 167 | description: 168 | name: leak_tracker_testing 169 | sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" 170 | url: "https://pub.dev" 171 | source: hosted 172 | version: "3.0.1" 173 | lints: 174 | dependency: transitive 175 | description: 176 | name: lints 177 | sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" 178 | url: "https://pub.dev" 179 | source: hosted 180 | version: "4.0.0" 181 | lists: 182 | dependency: transitive 183 | description: 184 | name: lists 185 | sha256: "4ca5c19ae4350de036a7e996cdd1ee39c93ac0a2b840f4915459b7d0a7d4ab27" 186 | url: "https://pub.dev" 187 | source: hosted 188 | version: "1.0.1" 189 | logger: 190 | dependency: transitive 191 | description: 192 | name: logger 193 | sha256: be4b23575aac7ebf01f225a241eb7f6b5641eeaf43c6a8613510fc2f8cf187d1 194 | url: "https://pub.dev" 195 | source: hosted 196 | version: "2.5.0" 197 | matcher: 198 | dependency: transitive 199 | description: 200 | name: matcher 201 | sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb 202 | url: "https://pub.dev" 203 | source: hosted 204 | version: "0.12.16+1" 205 | material_color_utilities: 206 | dependency: transitive 207 | description: 208 | name: material_color_utilities 209 | sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec 210 | url: "https://pub.dev" 211 | source: hosted 212 | version: "0.11.1" 213 | meta: 214 | dependency: transitive 215 | description: 216 | name: meta 217 | sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 218 | url: "https://pub.dev" 219 | source: hosted 220 | version: "1.15.0" 221 | mgrs_dart: 222 | dependency: transitive 223 | description: 224 | name: mgrs_dart 225 | sha256: fb89ae62f05fa0bb90f70c31fc870bcbcfd516c843fb554452ab3396f78586f7 226 | url: "https://pub.dev" 227 | source: hosted 228 | version: "2.0.0" 229 | path: 230 | dependency: transitive 231 | description: 232 | name: path 233 | sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" 234 | url: "https://pub.dev" 235 | source: hosted 236 | version: "1.9.0" 237 | polylabel: 238 | dependency: transitive 239 | description: 240 | name: polylabel 241 | sha256: "41b9099afb2aa6c1730bdd8a0fab1400d287694ec7615dd8516935fa3144214b" 242 | url: "https://pub.dev" 243 | source: hosted 244 | version: "1.0.1" 245 | proj4dart: 246 | dependency: transitive 247 | description: 248 | name: proj4dart 249 | sha256: c8a659ac9b6864aa47c171e78d41bbe6f5e1d7bd790a5814249e6b68bc44324e 250 | url: "https://pub.dev" 251 | source: hosted 252 | version: "2.1.0" 253 | sky_engine: 254 | dependency: transitive 255 | description: flutter 256 | source: sdk 257 | version: "0.0.0" 258 | source_span: 259 | dependency: transitive 260 | description: 261 | name: source_span 262 | sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" 263 | url: "https://pub.dev" 264 | source: hosted 265 | version: "1.10.0" 266 | stack_trace: 267 | dependency: transitive 268 | description: 269 | name: stack_trace 270 | sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" 271 | url: "https://pub.dev" 272 | source: hosted 273 | version: "1.12.0" 274 | stream_channel: 275 | dependency: transitive 276 | description: 277 | name: stream_channel 278 | sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 279 | url: "https://pub.dev" 280 | source: hosted 281 | version: "2.1.2" 282 | string_scanner: 283 | dependency: transitive 284 | description: 285 | name: string_scanner 286 | sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" 287 | url: "https://pub.dev" 288 | source: hosted 289 | version: "1.3.0" 290 | term_glyph: 291 | dependency: transitive 292 | description: 293 | name: term_glyph 294 | sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 295 | url: "https://pub.dev" 296 | source: hosted 297 | version: "1.2.1" 298 | test_api: 299 | dependency: transitive 300 | description: 301 | name: test_api 302 | sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" 303 | url: "https://pub.dev" 304 | source: hosted 305 | version: "0.7.3" 306 | typed_data: 307 | dependency: transitive 308 | description: 309 | name: typed_data 310 | sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 311 | url: "https://pub.dev" 312 | source: hosted 313 | version: "1.4.0" 314 | unicode: 315 | dependency: transitive 316 | description: 317 | name: unicode 318 | sha256: "0f69e46593d65245774d4f17125c6084d2c20b4e473a983f6e21b7d7762218f1" 319 | url: "https://pub.dev" 320 | source: hosted 321 | version: "0.3.1" 322 | vector_math: 323 | dependency: transitive 324 | description: 325 | name: vector_math 326 | sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" 327 | url: "https://pub.dev" 328 | source: hosted 329 | version: "2.1.4" 330 | vm_service: 331 | dependency: transitive 332 | description: 333 | name: vm_service 334 | sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b 335 | url: "https://pub.dev" 336 | source: hosted 337 | version: "14.3.0" 338 | web: 339 | dependency: transitive 340 | description: 341 | name: web 342 | sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb 343 | url: "https://pub.dev" 344 | source: hosted 345 | version: "1.1.0" 346 | wkt_parser: 347 | dependency: transitive 348 | description: 349 | name: wkt_parser 350 | sha256: "8a555fc60de3116c00aad67891bcab20f81a958e4219cc106e3c037aa3937f13" 351 | url: "https://pub.dev" 352 | source: hosted 353 | version: "2.0.0" 354 | sdks: 355 | dart: ">=3.6.0 <4.0.0" 356 | flutter: ">=3.27.0" 357 | -------------------------------------------------------------------------------- /example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: example 2 | description: A new Flutter project. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `flutter pub publish`. This is preferred for private packages. 6 | publish_to: "none" # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | # In Windows, build-name is used as the major, minor, and patch parts 19 | # of the product and file versions while build-number is used as the build suffix. 20 | version: 1.0.0+1 21 | 22 | environment: 23 | sdk: ">=2.18.1 <3.0.0" 24 | 25 | # Dependencies specify other packages that your package needs in order to work. 26 | # To automatically upgrade your package dependencies to the latest versions 27 | # consider running `flutter pub upgrade --major-versions`. Alternatively, 28 | # dependencies can be manually updated by changing the version numbers below to 29 | # the latest version available on pub.dev. To see which dependencies have newer 30 | # versions available, run `flutter pub outdated`. 31 | dependencies: 32 | flutter: 33 | sdk: flutter 34 | flutter_map: ^8.0.0 35 | flutter_map_animations: 36 | path: ../ 37 | flutter_map_cancellable_tile_provider: ^3.1.0 38 | latlong2: ^0.9.1 39 | 40 | dev_dependencies: 41 | flutter_lints: ^4.0.0 42 | flutter_test: 43 | sdk: flutter 44 | 45 | # For information on the generic Dart part of this file, see the 46 | # following page: https://dart.dev/tools/pub/pubspec 47 | # The following section is specific to Flutter packages. 48 | flutter: 49 | # The following line ensures that the Material Icons font is 50 | # included with your application, so that you can use the icons in 51 | # the material Icons class. 52 | uses-material-design: true 53 | # To add assets to your application, add an assets section, like this: 54 | # assets: 55 | # - images/a_dot_burr.jpeg 56 | # - images/a_dot_ham.jpeg 57 | # An image asset can refer to one or more resolution-specific "variants", see 58 | # https://flutter.dev/assets-and-images/#resolution-aware 59 | # For details regarding adding assets from package dependencies, see 60 | # https://flutter.dev/assets-and-images/#from-packages 61 | # To add custom fonts to your application, add a fonts section here, 62 | # in this "flutter" section. Each entry in this list should have a 63 | # "family" key with the font family name, and a "fonts" key with a 64 | # list giving the asset and other descriptors for the font. For 65 | # example: 66 | # fonts: 67 | # - family: Schyler 68 | # fonts: 69 | # - asset: fonts/Schyler-Regular.ttf 70 | # - asset: fonts/Schyler-Italic.ttf 71 | # style: italic 72 | # - family: Trajan Pro 73 | # fonts: 74 | # - asset: fonts/TrajanPro.ttf 75 | # - asset: fonts/TrajanPro_Bold.ttf 76 | # weight: 700 77 | # 78 | # For details regarding fonts from package dependencies, 79 | # see https://flutter.dev/custom-fonts/#from-packages 80 | -------------------------------------------------------------------------------- /example/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/web/favicon.png -------------------------------------------------------------------------------- /example/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/web/icons/Icon-192.png -------------------------------------------------------------------------------- /example/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/web/icons/Icon-512.png -------------------------------------------------------------------------------- /example/web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /example/web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/example/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /example/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | example 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /example/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example", 3 | "short_name": "example", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /gifs/animated-marker.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/gifs/animated-marker.gif -------------------------------------------------------------------------------- /gifs/center-on-point.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/gifs/center-on-point.gif -------------------------------------------------------------------------------- /gifs/rotate.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/gifs/rotate.gif -------------------------------------------------------------------------------- /gifs/zoom.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TesteurManiak/flutter_map_animations/accfab7e1df52c6bc397f4c29b95e8d489b76a37/gifs/zoom.gif -------------------------------------------------------------------------------- /lib/flutter_map_animations.dart: -------------------------------------------------------------------------------- 1 | library flutter_map_animations; 2 | 3 | export 'src/animated_map_controller.dart'; 4 | export 'src/animated_marker.dart'; 5 | export 'src/animated_marker_layer.dart'; 6 | export 'src/animation_id.dart'; 7 | -------------------------------------------------------------------------------- /lib/src/animated_map_controller.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_map/flutter_map.dart'; 5 | import 'package:flutter_map_animations/src/animation_extensions.dart'; 6 | import 'package:flutter_map_animations/src/animation_id.dart'; 7 | import 'package:latlong2/latlong.dart'; 8 | 9 | typedef _MovementCallback = bool Function( 10 | CurvedAnimation animation, 11 | LatLngTween latLngTween, 12 | Tween zoomTween, 13 | Tween offset, 14 | Tween rotateTween, 15 | AnimationId animationId, 16 | ); 17 | 18 | /// A wrap around [MapController] that provides animated methods. 19 | class AnimatedMapController { 20 | /// Creates a [MapController] that provides animated methods. 21 | AnimatedMapController({ 22 | required this.vsync, 23 | MapController? mapController, 24 | this.duration = const Duration(milliseconds: 500), 25 | this.curve = Curves.fastOutSlowIn, 26 | this.cancelPreviousAnimations = false, 27 | }) : mapController = mapController ?? MapController(), 28 | _internal = mapController == null; 29 | 30 | /// The vsync of the animation. 31 | final TickerProvider vsync; 32 | 33 | /// Implementation of the map controller that will be used to trigger 34 | /// movements. 35 | /// 36 | /// Defaults to a new [MapController] which should be a [MapControllerImpl]. 37 | /// 38 | /// If created internally (i.e. not passed as a parameter), it will be 39 | /// disposed when [dispose] is called. 40 | final MapController mapController; 41 | 42 | /// Whether the map controller was created internally or passed as a 43 | /// parameter. Used to know if the map controller should be disposed or not 44 | /// by the animated map controller. 45 | final bool _internal; 46 | 47 | /// The duration of the animation. 48 | /// 49 | /// Defaults to 500 milliseconds. 50 | final Duration duration; 51 | 52 | /// The curve of the animation. 53 | /// 54 | /// Defaults to [Curves.fastOutSlowIn]. 55 | final Curve curve; 56 | 57 | /// Global option to define if previous animations should be canceled when a 58 | /// new one is triggered. 59 | /// 60 | /// Defaults to `false`. 61 | final bool cancelPreviousAnimations; 62 | 63 | /// Current rotation of the map. 64 | double get rotation { 65 | double effectiveRotation = mapController.camera.rotation; 66 | if (effectiveRotation >= 360) { 67 | effectiveRotation -= 360; 68 | } else if (effectiveRotation < 0) { 69 | effectiveRotation += 360; 70 | } 71 | return effectiveRotation; 72 | } 73 | 74 | final _runningAnimations = {}; 75 | 76 | void dispose() { 77 | // Stop running animations and dispose their controllers. 78 | stopAnimations(); 79 | 80 | // Dispose the map controller if it was created internally. 81 | if (_internal) { 82 | mapController.dispose(); 83 | } 84 | } 85 | 86 | /// Animate the map to [dest] with an optional [zoom] level and [rotation] in 87 | /// degrees. 88 | /// 89 | /// [offset] is only supported where [rotation] is `null`, due to a flutter_map 90 | /// limitation. 91 | /// 92 | /// If specified, [zoom] must be greater or equal to 0. 93 | /// 94 | /// {@template animated_map_controller.animate_to.curve} 95 | /// If [curve] is not specified, the one specified in the constructor will be 96 | /// used. 97 | /// 98 | /// Defaults to the value specified in the constructor. 99 | /// {@endtemplate} 100 | /// 101 | /// {@template animated_map_controller.animate_to_cancel_previous_animations} 102 | /// If [cancelPreviousAnimations] is `true`, all ongoing animations will be 103 | /// stopped before starting the new one. 104 | /// 105 | /// Defaults to the value specified in the constructor. 106 | /// {@endtemplate} 107 | Future animateTo({ 108 | LatLng? dest, 109 | double? zoom, 110 | Offset offset = Offset.zero, 111 | double? rotation, 112 | Curve? curve, 113 | String? customId, 114 | Duration? duration, 115 | bool? cancelPreviousAnimations, 116 | }) { 117 | if (zoom != null && zoom < 0) { 118 | throw ArgumentError.value( 119 | zoom, 120 | 'zoom', 121 | 'Zoom must be greater or equal to 0', 122 | ); 123 | } 124 | 125 | final camera = mapController.camera; 126 | final effectiveDest = dest ?? camera.center; 127 | final effectiveZoom = zoom ?? camera.zoom; 128 | final effectiveRotation = rotation ?? this.rotation; 129 | final latLngTween = LatLngTween( 130 | begin: mapController.camera.center, 131 | end: effectiveDest, 132 | ); 133 | final zoomTween = Tween( 134 | begin: mapController.camera.zoom, 135 | end: effectiveZoom, 136 | ); 137 | final offsetTween = Tween( 138 | begin: Offset.zero, 139 | end: offset, 140 | ); 141 | final startRotation = this.rotation; 142 | final endRotation = effectiveRotation; 143 | 144 | final rotateTween = _AngleTween( 145 | begin: startRotation, 146 | end: endRotation, 147 | ); 148 | 149 | // Determine the callback for movement. If no movement will occur return 150 | // immediately. 151 | final bool hasRotation = rotation != null && rotation != this.rotation; 152 | final bool hasMovement = 153 | (dest != null && dest != mapController.camera.center) || 154 | (zoom != null && zoom != mapController.camera.zoom) || 155 | (offset != Offset.zero); 156 | final movementCallback = 157 | _movementCallback(hasMovement: hasMovement, hasRotation: hasRotation); 158 | if (movementCallback == null) return Future.value(); 159 | 160 | // If cancelPreviousAnimations is true, stop all ongoing animations. 161 | if (cancelPreviousAnimations ?? this.cancelPreviousAnimations) { 162 | stopAnimations(); 163 | } 164 | 165 | // This controller will be disposed when the animation is completed. 166 | final animationController = AnimationController( 167 | vsync: vsync, 168 | duration: duration ?? this.duration, 169 | ); 170 | _runningAnimations.add(animationController); 171 | 172 | final animation = CurvedAnimation( 173 | parent: animationController, 174 | curve: curve ?? this.curve, 175 | )..onEnd(() { 176 | animationController.dispose(); 177 | _runningAnimations.remove(animationController); 178 | }); 179 | 180 | AnimationId animationId = AnimationId( 181 | destLocation: effectiveDest, 182 | destZoom: effectiveZoom, 183 | customId: customId, 184 | ); 185 | 186 | bool hasTriggeredMove = false; 187 | bool animationCompleted = false; 188 | 189 | animationController.addListener(() { 190 | // The animation calls this listener with value 1.0 twice. Once when the 191 | // value is 1.0 but isCompleted is false and again when it is still 1.0 192 | // and isCompleted is true. This check ensures we don't trigger a 193 | // duplicate movement but also, more importantly, that we trigger the 194 | // final movement with the finished id exactly once. 195 | if (animationCompleted) return; 196 | animationCompleted |= animation.value == 1.0; 197 | 198 | animationId = animationId.copyWith( 199 | moveId: AnimatedMoveId.fromAnimationAndTriggeredMove( 200 | animationIsCompleted: animationCompleted, 201 | hasTriggeredMove: hasTriggeredMove, 202 | ), 203 | ); 204 | 205 | hasTriggeredMove |= movementCallback( 206 | animation, 207 | latLngTween, 208 | zoomTween, 209 | offsetTween, 210 | rotateTween, 211 | animationId, 212 | ); 213 | }); 214 | 215 | return animationController.forward(); 216 | } 217 | 218 | // Determine what MapController method should be called based on whether 219 | // there is movement and/or rotation. If there is neither movement nor 220 | // rotation null is returned. 221 | _MovementCallback? _movementCallback({ 222 | required bool hasMovement, 223 | required bool hasRotation, 224 | }) { 225 | if (hasMovement && hasRotation) { 226 | return ( 227 | animation, 228 | latLngTween, 229 | zoomTween, 230 | offsetTween, 231 | rotateTween, 232 | animationId, 233 | ) { 234 | final result = mapController.moveAndRotate( 235 | latLngTween.evaluate(animation), 236 | zoomTween.evaluate(animation), 237 | rotateTween.evaluate(animation), 238 | id: animationId.id, 239 | ); 240 | return result.moveSuccess || result.rotateSuccess; 241 | }; 242 | } else if (hasMovement) { 243 | return ( 244 | animation, 245 | latLngTween, 246 | zoomTween, 247 | offsetTween, 248 | rotateTween, 249 | animationId, 250 | ) => 251 | mapController.move( 252 | latLngTween.evaluate(animation), 253 | zoomTween.evaluate(animation), 254 | offset: offsetTween.evaluate(animation), 255 | id: animationId.id, 256 | ); 257 | } else if (hasRotation) { 258 | return ( 259 | animation, 260 | latLngTween, 261 | zoomTween, 262 | offsetTween, 263 | rotateTween, 264 | animationId, 265 | ) => 266 | mapController.rotate( 267 | rotateTween.evaluate(animation), 268 | id: animationId.id, 269 | ); 270 | } else { 271 | return null; 272 | } 273 | } 274 | 275 | /// Center the map on [point] with an optional [zoom] level. 276 | /// 277 | /// {@macro animated_map_controller.animate_to.curve} 278 | /// 279 | /// {@macro animated_map_controller.animate_to_cancel_previous_animations} 280 | Future centerOnPoint( 281 | LatLng point, { 282 | double? zoom, 283 | Curve? curve, 284 | String? customId, 285 | Duration? duration, 286 | bool? cancelPreviousAnimations, 287 | }) { 288 | return animateTo( 289 | dest: point, 290 | zoom: zoom, 291 | curve: curve, 292 | customId: customId, 293 | duration: duration, 294 | cancelPreviousAnimations: cancelPreviousAnimations, 295 | ); 296 | } 297 | 298 | /// Apply a rotation of [degree] to the current rotation. 299 | /// 300 | /// {@macro animated_map_controller.animate_to.curve} 301 | /// 302 | /// {@macro animated_map_controller.animate_to_cancel_previous_animations} 303 | Future animatedRotateFrom( 304 | double degree, { 305 | Curve? curve, 306 | String? customId, 307 | Duration? duration, 308 | bool? cancelPreviousAnimations, 309 | }) { 310 | return animateTo( 311 | rotation: rotation + degree, 312 | curve: curve, 313 | customId: customId, 314 | duration: duration, 315 | cancelPreviousAnimations: cancelPreviousAnimations, 316 | ); 317 | } 318 | 319 | /// Set the rotation to [degree]. 320 | /// 321 | /// {@macro animated_map_controller.animate_to.curve} 322 | /// 323 | /// {@macro animated_map_controller.animate_to_cancel_previous_animations} 324 | Future animatedRotateTo( 325 | double degree, { 326 | Curve? curve, 327 | String? customId, 328 | Duration? duration, 329 | bool? cancelPreviousAnimations, 330 | }) { 331 | return animateTo( 332 | rotation: degree, 333 | curve: curve, 334 | customId: customId, 335 | duration: duration, 336 | ); 337 | } 338 | 339 | /// Reset the rotation to 0. 340 | /// 341 | /// {@macro animated_map_controller.animate_to.curve} 342 | /// 343 | /// {@macro animated_map_controller.animate_to_cancel_previous_animations} 344 | Future animatedRotateReset({ 345 | Curve? curve, 346 | String? customId, 347 | Duration? duration, 348 | bool? cancelPreviousAnimations, 349 | }) { 350 | return animateTo( 351 | rotation: 0, 352 | curve: curve, 353 | customId: customId, 354 | duration: duration, 355 | cancelPreviousAnimations: cancelPreviousAnimations, 356 | ); 357 | } 358 | 359 | /// Add one level to the current zoom level. 360 | /// 361 | /// {@macro animated_map_controller.animate_to.curve} 362 | /// 363 | /// {@macro animated_map_controller.animate_to_cancel_previous_animations} 364 | Future animatedZoomIn({ 365 | Curve? curve, 366 | String? customId, 367 | Duration? duration, 368 | bool? cancelPreviousAnimations, 369 | }) { 370 | return animateTo( 371 | zoom: mapController.camera.zoom + 1, 372 | curve: curve, 373 | customId: customId, 374 | duration: duration, 375 | cancelPreviousAnimations: cancelPreviousAnimations, 376 | ); 377 | } 378 | 379 | /// Remove one level to the current zoom level. 380 | /// 381 | /// If the current zoom level is 0, nothing will happen. 382 | /// 383 | /// {@macro animated_map_controller.animate_to.curve} 384 | /// 385 | /// {@macro animated_map_controller.animate_to_cancel_previous_animations} 386 | Future animatedZoomOut({ 387 | Curve? curve, 388 | String? customId, 389 | Duration? duration, 390 | bool? cancelPreviousAnimations, 391 | }) async { 392 | final newZoom = mapController.camera.zoom - 1; 393 | if (newZoom < 0) return; 394 | 395 | return animateTo( 396 | zoom: newZoom, 397 | curve: curve, 398 | customId: customId, 399 | duration: duration, 400 | cancelPreviousAnimations: cancelPreviousAnimations, 401 | ); 402 | } 403 | 404 | /// Set the zoom level to [newZoom]. 405 | /// 406 | /// [newZoom] must be greater or equal to 0. 407 | /// 408 | /// {@macro animated_map_controller.animate_to.curve} 409 | /// 410 | /// {@macro animated_map_controller.animate_to_cancel_previous_animations} 411 | Future animatedZoomTo( 412 | double newZoom, { 413 | Curve? curve, 414 | String? customId, 415 | Duration? duration, 416 | bool? cancelPreviousAnimations, 417 | }) { 418 | return animateTo( 419 | zoom: newZoom, 420 | curve: curve, 421 | customId: customId, 422 | duration: duration, 423 | cancelPreviousAnimations: cancelPreviousAnimations, 424 | ); 425 | } 426 | 427 | /// Will use the [cameraFit] to calculate the center and zoom level and then 428 | /// animate to that position. 429 | /// 430 | /// {@macro animated_map_controller.animate_to.curve} 431 | /// 432 | /// {@macro animated_map_controller.animate_to_cancel_previous_animations} 433 | Future animatedFitCamera({ 434 | required CameraFit cameraFit, 435 | Curve? curve, 436 | String? customId, 437 | double? rotation, 438 | Duration? duration, 439 | bool? cancelPreviousAnimations, 440 | }) { 441 | MapCamera camera = mapController.camera; 442 | if (rotation != null) { 443 | camera = camera.withRotation(rotation); 444 | } 445 | 446 | final centerZoom = cameraFit.fit(camera); 447 | 448 | return animateTo( 449 | dest: centerZoom.center, 450 | zoom: centerZoom.zoom, 451 | curve: curve, 452 | customId: customId, 453 | rotation: rotation, 454 | duration: duration, 455 | cancelPreviousAnimations: cancelPreviousAnimations, 456 | ); 457 | } 458 | 459 | /// Will use the [LatLngBounds.fromPoints] method to calculate the bounds of 460 | /// the [points] and then use the [animatedFitCamera] method to animate to 461 | /// that position. 462 | /// 463 | /// {@macro animated_map_controller.animate_to.curve} 464 | @Deprecated( 465 | 'Prefer `animatedFitCamera` with a `CameraFit.coordiantes() or CameraFit.bounds()` instead. ' 466 | 'This method will be removed in a future release as it is now redundant. ' 467 | 'This method is deprecated since v0.5.0', 468 | ) 469 | Future centerOnPoints( 470 | List points, { 471 | Curve? curve, 472 | String? customId, 473 | }) { 474 | final cameraFit = CameraFit.bounds( 475 | bounds: LatLngBounds.fromPoints(points), 476 | padding: const EdgeInsets.all(12), 477 | ); 478 | 479 | return animatedFitCamera( 480 | cameraFit: cameraFit, 481 | curve: curve, 482 | customId: customId, 483 | ); 484 | } 485 | 486 | /// Stop all ongoing animations. 487 | void stopAnimations() { 488 | for (final animation in _runningAnimations) { 489 | if (animation.isAnimating) animation.stop(); 490 | animation.dispose(); 491 | } 492 | _runningAnimations.clear(); 493 | } 494 | } 495 | 496 | class _AngleTween extends Tween { 497 | _AngleTween({ 498 | required double super.begin, 499 | required double super.end, 500 | }) : _begin = begin, 501 | _end = end; 502 | 503 | final double _begin; 504 | final double _end; 505 | 506 | @override 507 | double lerp(double t) => _begin + _angleDifference(_begin, _end) * t; 508 | 509 | static double _angleDifference(double angle1, double angle2) { 510 | final diff = (angle2 - angle1 + 180) % 360 - 180; 511 | return diff < -180 ? diff + 360 : diff; 512 | } 513 | } 514 | -------------------------------------------------------------------------------- /lib/src/animated_marker.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:latlong2/latlong.dart'; 3 | 4 | typedef AnimatedWidgetBuilder = Widget Function( 5 | BuildContext context, 6 | Animation animation, 7 | ); 8 | 9 | class AnimatedMarker { 10 | AnimatedMarker({ 11 | required this.point, 12 | required this.builder, 13 | this.key, 14 | this.width = 30.0, 15 | this.height = 30.0, 16 | this.rotate, 17 | this.alignment, 18 | this.duration = const Duration(milliseconds: 300), 19 | this.curve = Curves.ease, 20 | }); 21 | 22 | /// Coordinates of the marker 23 | final LatLng point; 24 | 25 | /// Function that builds UI of the marker 26 | final AnimatedWidgetBuilder builder; 27 | 28 | /// Key of the marker 29 | final Key? key; 30 | 31 | /// Bounding box width of the marker 32 | final double width; 33 | 34 | /// Bounding box height of the marker 35 | final double height; 36 | 37 | final Alignment? alignment; 38 | 39 | /// If true marker will be counter rotated to the map rotation 40 | final bool? rotate; 41 | 42 | /// The duration of the animation. 43 | final Duration duration; 44 | 45 | /// The curve of the animation. 46 | final Curve curve; 47 | } 48 | -------------------------------------------------------------------------------- /lib/src/animated_marker_layer.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_map/flutter_map.dart'; 3 | import 'package:flutter_map_animations/src/animated_marker.dart'; 4 | 5 | class AnimatedMarkerLayer extends StatelessWidget { 6 | const AnimatedMarkerLayer({ 7 | super.key, 8 | required this.markers, 9 | this.rotate = false, 10 | this.alignment = Alignment.center, 11 | }); 12 | 13 | final List markers; 14 | 15 | /// If true markers will be counter rotated to the map rotation. 16 | final bool rotate; 17 | 18 | final Alignment alignment; 19 | 20 | @override 21 | Widget build(BuildContext context) { 22 | final map = MapCamera.maybeOf(context); 23 | if (map == null) { 24 | throw StateError('No FlutterMapState found.'); 25 | } 26 | final worldWidth = map.getWorldWidthAtZoom(); 27 | 28 | // Copies `MarkerLayer` implementation 29 | return MobileLayerTransformer( 30 | child: Stack( 31 | children: (List markers) sync* { 32 | for (final m in markers) { 33 | // Resolve real alignment 34 | final left = 0.5 * m.width * ((m.alignment ?? alignment).x + 1); 35 | final top = 0.5 * m.height * ((m.alignment ?? alignment).y + 1); 36 | final right = m.width - left; 37 | final bottom = m.height - top; 38 | 39 | // Perform projection 40 | final pxPoint = map.projectAtZoom(m.point); 41 | 42 | Positioned? getPositioned(double worldShift) { 43 | final shiftedX = pxPoint.dx + worldShift; 44 | 45 | // Cull if out of bounds 46 | if (!map.pixelBounds.overlaps( 47 | Rect.fromPoints( 48 | Offset(shiftedX + left, pxPoint.dy - bottom), 49 | Offset(shiftedX - right, pxPoint.dy + top), 50 | ), 51 | )) { 52 | return null; 53 | } 54 | 55 | // Shift original coordinate along worlds, then move into relative 56 | // to origin space 57 | final shiftedLocalPoint = 58 | Offset(shiftedX, pxPoint.dy) - map.pixelOrigin; 59 | 60 | return Positioned( 61 | key: m.key, 62 | width: m.width, 63 | height: m.height, 64 | left: shiftedLocalPoint.dx - right, 65 | top: shiftedLocalPoint.dy - bottom, 66 | child: (m.rotate ?? rotate) 67 | ? Transform.rotate( 68 | angle: -map.rotationRad, 69 | alignment: (m.alignment ?? alignment) * -1, 70 | child: _AnimatedMarkerWidget(marker: m), 71 | ) 72 | : _AnimatedMarkerWidget(marker: m), 73 | ); 74 | } 75 | 76 | // Create marker in main world, unless culled 77 | final main = getPositioned(0); 78 | if (main != null) yield main; 79 | // It is unsafe to assume that if the main one is culled, it will 80 | // also be culled in all other worlds, so we must continue 81 | 82 | // Repeat over all worlds (<--||-->) until culling determines that 83 | // that marker is out of view, and therefore all further markers in 84 | // that direction will also be 85 | if (worldWidth == 0) continue; 86 | for (double shift = -worldWidth;; shift -= worldWidth) { 87 | final additional = getPositioned(shift); 88 | if (additional == null) break; 89 | yield additional; 90 | } 91 | for (double shift = worldWidth;; shift += worldWidth) { 92 | final additional = getPositioned(shift); 93 | if (additional == null) break; 94 | yield additional; 95 | } 96 | } 97 | }(markers) 98 | .toList(), 99 | ), 100 | ); 101 | } 102 | } 103 | 104 | class _AnimatedMarkerWidget extends StatefulWidget { 105 | const _AnimatedMarkerWidget({ 106 | required this.marker, 107 | }); 108 | 109 | final AnimatedMarker marker; 110 | 111 | @override 112 | State<_AnimatedMarkerWidget> createState() => _AnimatedMarkerWidgetState(); 113 | } 114 | 115 | class _AnimatedMarkerWidgetState extends State<_AnimatedMarkerWidget> 116 | with SingleTickerProviderStateMixin { 117 | late final AnimationController controller; 118 | late final Animation animation; 119 | 120 | @override 121 | void initState() { 122 | super.initState(); 123 | controller = AnimationController( 124 | vsync: this, 125 | duration: widget.marker.duration, 126 | )..forward(); 127 | 128 | animation = CurvedAnimation( 129 | parent: controller, 130 | curve: widget.marker.curve, 131 | ); 132 | } 133 | 134 | @override 135 | void dispose() { 136 | controller.dispose(); 137 | super.dispose(); 138 | } 139 | 140 | @override 141 | Widget build(BuildContext context) { 142 | return UnconstrainedBox( 143 | child: ConstrainedBox( 144 | constraints: BoxConstraints( 145 | maxHeight: widget.marker.height, 146 | maxWidth: widget.marker.width, 147 | ), 148 | child: AnimatedBuilder( 149 | animation: animation, 150 | builder: (context, _) => widget.marker.builder(context, animation), 151 | ), 152 | ), 153 | ); 154 | } 155 | } 156 | -------------------------------------------------------------------------------- /lib/src/animation_extensions.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | extension AnimationExtensions on Animation { 4 | /// Calls [onAnimationEnd] when the animation is completed or dismissed. 5 | void onEnd(VoidCallback onAnimationEnd) { 6 | void statusListener(AnimationStatus status) { 7 | if (status == AnimationStatus.completed || 8 | status == AnimationStatus.dismissed) { 9 | removeStatusListener(statusListener); 10 | onAnimationEnd(); 11 | } 12 | } 13 | 14 | addStatusListener(statusListener); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/src/animation_id.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_map/flutter_map.dart'; 3 | import 'package:latlong2/latlong.dart'; 4 | 5 | @immutable 6 | class AnimationId { 7 | const AnimationId({ 8 | this.moveId = AnimatedMoveId.started, 9 | required this.destLocation, 10 | required this.destZoom, 11 | this.customId, 12 | }); 13 | 14 | /// Parse the [id] into an [AnimationId] object. 15 | /// 16 | /// It expects the [id] to be in the format of: 17 | /// ```dart 18 | /// "moveId#latitude,longitude,destZoom[#customId]" 19 | /// ``` 20 | factory AnimationId.parse(String id) { 21 | final parts = id.split('#'); 22 | final moveId = AnimatedMoveId.values.byName(parts[0]); 23 | final destParts = parts[1].split(','); 24 | final lat = double.parse(destParts[0]); 25 | final lng = double.parse(destParts[1]); 26 | final zoom = double.parse(destParts[2]); 27 | final customId = parts.length == 3 ? parts[2] : null; 28 | 29 | return AnimationId( 30 | moveId: moveId, 31 | destLocation: LatLng(lat, lng), 32 | destZoom: zoom, 33 | customId: customId, 34 | ); 35 | } 36 | 37 | /// Try to parse the [id] into an [AnimationId] object. 38 | /// 39 | /// If the [id] is null or cannot be parsed, it will return null. 40 | static AnimationId? tryParse(String? id) { 41 | if (id == null) return null; 42 | 43 | try { 44 | final animationId = AnimationId.parse(id); 45 | return animationId; 46 | } catch (e) { 47 | return null; 48 | } 49 | } 50 | 51 | static AnimationId? fromMapEvent(MapEvent mapEvent) { 52 | if (mapEvent is MapEventMove) return tryParse(mapEvent.id); 53 | if (mapEvent is MapEventRotate) return tryParse(mapEvent.id); 54 | return null; 55 | } 56 | 57 | final AnimatedMoveId moveId; 58 | final LatLng destLocation; 59 | final double destZoom; 60 | final String? customId; 61 | 62 | String get id { 63 | return '${moveId.name}#' 64 | '${destLocation.latitude},${destLocation.longitude},$destZoom' 65 | '${customId == null ? '' : '#$customId'}'; 66 | } 67 | 68 | @override 69 | bool operator ==(Object other) { 70 | return identical(this, other) || 71 | other is AnimationId && 72 | runtimeType == other.runtimeType && 73 | moveId == other.moveId && 74 | destLocation == other.destLocation && 75 | destZoom == other.destZoom && 76 | customId == other.customId; 77 | } 78 | 79 | @override 80 | int get hashCode => Object.hash(moveId, destLocation, destZoom, customId); 81 | 82 | AnimationId copyWith({ 83 | AnimatedMoveId? moveId, 84 | LatLng? destLocation, 85 | double? destZoom, 86 | String? customid, 87 | }) { 88 | return AnimationId( 89 | moveId: moveId ?? this.moveId, 90 | destLocation: destLocation ?? this.destLocation, 91 | destZoom: destZoom ?? this.destZoom, 92 | customId: customId, 93 | ); 94 | } 95 | } 96 | 97 | enum AnimatedMoveId { 98 | started, 99 | inProgress, 100 | finished; 101 | 102 | static AnimatedMoveId fromAnimationAndTriggeredMove({ 103 | required bool animationIsCompleted, 104 | required bool hasTriggeredMove, 105 | }) { 106 | final AnimatedMoveId moveId; 107 | if (animationIsCompleted) { 108 | moveId = AnimatedMoveId.finished; 109 | } else if (!hasTriggeredMove) { 110 | moveId = AnimatedMoveId.started; 111 | } else { 112 | moveId = AnimatedMoveId.inProgress; 113 | } 114 | return moveId; 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_map_animations 2 | description: Animation utilities for markers and controls of the flutter_map package. 3 | version: 0.9.0 4 | homepage: https://github.com/TesteurManiak/flutter_map_animations 5 | repository: https://github.com/TesteurManiak/flutter_map_animations 6 | issue_tracker: https://github.com/TesteurManiak/flutter_map_animations/issues 7 | screenshots: 8 | - description: Animated markers 9 | path: gifs/animated-marker.gif 10 | - description: Animated movement 11 | path: gifs/center-on-point.gif 12 | - description: Animated rotate 13 | path: gifs/rotate.gif 14 | - description: Animated zoom 15 | path: gifs/zoom.gif 16 | funding: 17 | - https://www.buymeacoffee.com/guillaumeroux 18 | topics: 19 | - flutter-map 20 | - map 21 | - animation 22 | 23 | environment: 24 | sdk: ">=3.0.0 <4.0.0" 25 | 26 | dependencies: 27 | flutter: 28 | sdk: flutter 29 | flutter_map: ^8.0.0 30 | latlong2: ^0.9.1 31 | 32 | dev_dependencies: 33 | custom_lint: ">=0.5.11 <0.8.0" 34 | fd_lints: ^2.3.0 35 | flutter_test: 36 | sdk: flutter 37 | -------------------------------------------------------------------------------- /test/src/animation_id_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/services.dart'; 2 | import 'package:flutter_map/flutter_map.dart'; 3 | import 'package:flutter_map_animations/src/animation_id.dart'; 4 | import 'package:flutter_test/flutter_test.dart'; 5 | import 'package:latlong2/latlong.dart'; 6 | 7 | void main() { 8 | group('AnimationId', () { 9 | const validId = 'started#51.0,0.0,1.0'; 10 | const validIdWithCustomId = 'started#51.0,0.0,1.0#aCustomId'; 11 | const invalidId = 'invalid#51.0,0.0,1.0'; 12 | 13 | group('id', () { 14 | test('should return a formatted string', () { 15 | const animationId = AnimationId( 16 | destLocation: LatLng(51, 0), 17 | destZoom: 1, 18 | ); 19 | 20 | expect(animationId.id, validId); 21 | }); 22 | }); 23 | 24 | group('parse', () { 25 | test('should return an AnimationId', () { 26 | final animationId = AnimationId.parse(validId); 27 | 28 | expect(animationId, isA()); 29 | }); 30 | 31 | test('should return a customId', () { 32 | final animationId = AnimationId.parse(validIdWithCustomId); 33 | 34 | expect( 35 | animationId, 36 | isA().having( 37 | (animationId) => animationId.customId, 38 | 'customId', 39 | 'aCustomId', 40 | ), 41 | ); 42 | }); 43 | 44 | test('should throw an error if the moveId is invalid', () { 45 | expect(() => AnimationId.parse(invalidId), throwsArgumentError); 46 | }); 47 | }); 48 | 49 | group('tryParse', () { 50 | test('should return an AnimationId', () { 51 | final animationId = AnimationId.tryParse(validId); 52 | 53 | expect(animationId, isNotNull); 54 | }); 55 | 56 | test('should return null if the moveId is invalid', () { 57 | final animationId = AnimationId.tryParse(invalidId); 58 | 59 | expect(animationId, isNull); 60 | }); 61 | }); 62 | 63 | group('fromMapEvent', () { 64 | test('should return an AnimationId', () { 65 | final animationId = AnimationId.fromMapEvent( 66 | MapEventMove( 67 | oldCamera: MapCamera( 68 | center: const LatLng(1, 2), 69 | zoom: 6, 70 | crs: const CrsSimple(), 71 | rotation: 0, 72 | nonRotatedSize: const Size(50, 100), 73 | ), 74 | camera: MapCamera( 75 | center: const LatLng(2, 4), 76 | zoom: 5, 77 | crs: const CrsSimple(), 78 | rotation: 0, 79 | nonRotatedSize: const Size(50, 100), 80 | ), 81 | source: MapEventSource.custom, 82 | id: validId, 83 | ), 84 | ); 85 | 86 | expect(animationId, isNotNull); 87 | }); 88 | 89 | test('should return null if the MapEvent is not a MapEventMove', () { 90 | final animationId = AnimationId.fromMapEvent( 91 | MapEventTap( 92 | camera: MapCamera( 93 | center: const LatLng(1, 2), 94 | zoom: 6, 95 | crs: const CrsSimple(), 96 | rotation: 0, 97 | nonRotatedSize: const Size(50, 100), 98 | ), 99 | source: MapEventSource.custom, 100 | tapPosition: const LatLng(3, 4), 101 | ), 102 | ); 103 | 104 | expect(animationId, isNull); 105 | }); 106 | }); 107 | }); 108 | } 109 | --------------------------------------------------------------------------------