Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c6ebb21
Restore upstream BSD-3 attribution to google_map_animation
VMichael1999 Oct 25, 2026
9479474
Apply dart format to lib
VMichael1999 Oct 25, 2026
01599d7
Fix delays shortening the polyline animation
VMichael1999 Oct 25, 2026
dfabc72
Fix generateEquidistantPolylineByDuration spacing and endpoints
VMichael1999 Oct 25, 2026
b98aedf
Include delays and colors in animator equality
VMichael1999 Oct 25, 2026
25084c7
Expose repeat and delay parameters on SnackAnimator and ColorTransiti…
VMichael1999 Oct 25, 2026
abeea2d
Keep marker rotation when it does not move; add useMarkerRotation
VMichael1999 Oct 25, 2026
261aada
Rename delayed_curved_animaiton.dart to delayed_curved_animation.dart
VMichael1999 Oct 25, 2026
25026d1
Document and test when onAnimationStop is called
VMichael1999 Oct 25, 2026
5ba1988
Replace Color.withValues with withAlpha for older Flutter
VMichael1999 Oct 25, 2026
7c308aa
Declare real SDK range, platforms and project links
VMichael1999 Oct 25, 2026
b11e3ad
Apply dart format for language version 3.4
VMichael1999 Oct 25, 2026
cb693f8
Remove deprecated legacy Android renderer from the example
VMichael1999 Oct 25, 2026
4a8f586
Add CHANGELOG entry for 1.1.0
VMichael1999 Oct 25, 2026
02a46a4
Add tests for MapAnimationController with a fake maps platform
VMichael1999 Oct 25, 2026
abcca91
Add tests for SphericalUtil, MathUtil, animators and AnimatedPolyline
VMichael1999 Oct 25, 2026
36bf153
Add tests for managers, tweens and DelayedCurvedAnimation
VMichael1999 Oct 25, 2026
a4fb457
Ignore coverage output
VMichael1999 Oct 25, 2026
90481bf
Add GitHub Actions CI and .pubignore
VMichael1999 Oct 25, 2026
34d506b
Document animated markers and ID clashes in the README
VMichael1999 Oct 25, 2026
857e88f
Document the public API and enforce it with public_member_api_docs
VMichael1999 Oct 25, 2026
8275da5
Rewrite the README in English and add a Spanish version
VMichael1999 Oct 25, 2026
e34fbbf
Apply the analyzer excludes added by recent Flutter versions
VMichael1999 Oct 25, 2026
52a5872
Support Flutter 3.22: limited repeats and DelayedCurvedAnimation
VMichael1999 Oct 25, 2026
55276e5
Update the example's Android toolchain for current Flutter
VMichael1999 Oct 25, 2026
ce7ee2e
Skip the example when resolving dependencies on the minimum Flutter
VMichael1999 Oct 25, 2026
cffbec8
Use dart pub in the compatibility job
VMichael1999 Oct 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 105 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: CI

on:
push:
branches: [main]
pull_request:

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
checks:
name: Format, analyze and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- run: flutter pub get
- name: Format
run: dart format --set-exit-if-changed lib test
- name: Analyze
run: flutter analyze
- name: Test with coverage
run: flutter test --coverage
- name: Check coverage is at least 90%
run: |
python3 - <<'PY'
found = hit = 0
for line in open("coverage/lcov.info"):
if line.startswith("LF:"):
found += int(line[3:])
elif line.startswith("LH:"):
hit += int(line[3:])
percent = 100 * hit / found
print(f"line coverage: {percent:.1f}% ({hit}/{found})")
raise SystemExit(0 if percent >= 90 else "coverage below 90%")
PY
- uses: codecov/codecov-action@v4
with:
files: coverage/lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false

compatibility:
name: Flutter ${{ matrix.flutter }} / ${{ matrix.deps }} dependencies
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
flutter: ['3.22.0', 'stable']
deps: [minimum, latest]
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.flutter != 'stable' && matrix.flutter || '' }}
channel: stable
cache: true
# The example needs a newer SDK than the package, so it is left out of
# dependency resolution (--no-example) and only lib and test are checked.
# `dart pub` is used because `flutter pub upgrade` still tries to prepare
# the example afterwards and fails when example/.dart_tool is missing.
- name: Resolve dependencies
run: |
if [ "${{ matrix.deps }}" = "minimum" ]; then
dart pub downgrade --no-example
else
dart pub upgrade --no-example
fi
- run: flutter analyze --no-pub lib test
- run: flutter test --no-pub

publish-dry-run:
name: Publish dry run
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- run: flutter pub get
- run: flutter pub publish --dry-run

example-android:
name: Build example (Android)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- run: flutter pub get
working-directory: example
- run: flutter build apk --debug
working-directory: example
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ build/

# Ensure demo asset is included in package
!doc/demo.gif

# Coverage
coverage/
26 changes: 26 additions & 0 deletions .pubignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# When this file exists pub ignores .gitignore, so the rules are repeated here.
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/
*.iml
*.ipr
*.iws
.idea/
/pubspec.lock
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
build/
coverage/

# Not part of the package: the demo is linked from the README on GitHub.
doc/demo.gif
doc/notes/
.github/
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
## 1.1.0 (unreleased)

### Breaking behavior

- Animations with `delayStart`/`delayEnd` now take the full `duration` to draw. Before, the delays were taken out of `duration`, so the drawing phase was shorter than configured. If you shortened `duration` to compensate, restore the value you intended.
- `MapAnimationUtils.generateEquidistantPolylineByDuration` now returns evenly spaced points, no duplicated first point and including the last point of the path. The number and position of the generated points changed.
- A marker that does not move (less than 0.5 m) keeps its rotation instead of turning to face north.

### New

- `MapAnimationController.useMarkerRotation` (default `false`): use `Marker.rotation` instead of the heading between positions.
- `SnackAnimator` accepts `delayStart` and `delayEnd`.
- `ColorTransitionAnimation` accepts `repeatCount`, `reverse`, `delayStart` and `delayEnd`.

### Fixes

- `PolylineAnimator` equality and `hashCode` now include `delayStart` and `delayEnd`, and `ColorTransitionAnimation` includes `colors`. Changing only those values now restarts the animation.
- `generateEquidistantPolylineByDuration` no longer loops forever when the path has zero length.

### Other

- Supports Flutter 3.22 and Dart 3.4 (was effectively Flutter 3.27): `Color.withValues` replaced with `withAlpha`, `google_maps_flutter_platform_interface` constraint lowered to `^2.10.0`.
- Declared supported platforms: Android, iOS and web.
- `onAnimationStop` is documented: called once when the animation completes, not on dispose and not for endless repeating animations.
- Added unit tests.
- Repository links point to `VMichael1999`.
- Example no longer requests the deprecated legacy Android renderer.

## 1.0.4

- Initial release of `polyline_animation_plus`.
Expand Down
72 changes: 51 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,51 @@
MIT License

Copyright (c) 2025 ToolRides

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
This package is a fork of google_map_animation by Manish Relani
(https://github.com/manishrelani/google_map_animation). The original code is
distributed under the BSD 3-Clause License, reproduced in section 1 below.
Changes and additions made in this fork are covered by section 2.

================================================================================
1. Original work: google_map_animation
================================================================================

BSD 3-Clause License

Copyright (c) 2025, Manish Relani
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

================================================================================
2. Modifications and additions in polyline_animation_plus
================================================================================

BSD 3-Clause License

Copyright (c) 2025, Michael Anthony Valdiviezo Maza
All rights reserved.

This section covers only the changes and new code added in this fork. It does
not replace or reduce the notice in section 1, which continues to apply to the
original code. The conditions and disclaimer are the same as in section 1.
Loading
Loading