Search packages, repositories and app categories

Package detailsv0.0.2

animated_path

A Flutter package that is used to create trim path animation.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
358
Likes
108
Pub points
160

Install package

flutter pub add animated_path

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

AnimatedPath is a Flutter package designed to create smooth trim path animations, allowing developers to animate the drawing of paths progressively. It's ideal for visual effects like line drawing, loading indicators, or custom shape reveals. The package supports all major platforms including Android, iOS, Web, macOS, Windows, and Linux. With simple integration via a single command, it enhances UIs with dynamic, engaging animations using minimal code. It leverages Flutter’s rendering engine for high performance and fluid motion.

Use cases

  • Creating animated line drawings
  • Designing loading indicators
  • Building interactive shape reveals
  • Enhancing UI transitions
  • Visualizing data flow
  • Animating custom SVG-like paths

Key features

  • Smooth trim path animation
  • Cross-platform support
  • Simple API integration
  • High performance rendering
  • Supports complex path geometries
  • Customizable animation duration and curve

Suitable for

  • UI/UX designers seeking dynamic visuals
  • Developers building interactive dashboards
  • Apps requiring animated illustrations
  • Educational apps with step-by-step diagrams
  • Games with animated path elements

Considerations

  • Limited to path-based animations
  • Requires understanding of Path class
  • May impact performance with very complex paths
  • Not suitable for non-path visual effects
  • Animation control requires careful timing setup

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Animated Path

A Flutter package that is used to create trim path animation on given path.

Features

  • start point tween
  • end point tween
  • offset tween
  • Support non-continuous path

Showcase

Usage

  • AnimatedPath widget is used to animated path for given animation.
AnimatedPath(
    animation: animationController.view,
    path: Path()
    ..moveTo(100, 100)
    ..relativeLineTo(400, 0)
    ..relativeLineTo(0, 400)
    ..relativeLineTo(-400, 0)
    ..relativeLineTo(0, -400),
    paint: paint,
    start: Tween(begin: 0.0, end: 0.7),
    end: Tween(begin: 0.0, end: 1.0),
    offset: Tween(begin: 0.0, end: 0.3),
)
  • Provide initial and final value of start, end or offset for the path.

For e.g.

Tween(begin: 0.0, end: 1.0)

This will put the start of the path at (0.0 * pathLength) (initially) and at (1.0 * pathLength) when animation finishes path for values between 0 and 1 (inclusive) will be visible only However, one can provide values < 0 or > 1 for different animation sync effects.

Similarly, for end and offset.

  • Values for end is calculated based on tween provided should always be greater than start at any point of time, or path will not be visible.

  • offset value for given animation is added in both start and end valued for path.

  • For a constant value use ConstantTween.

  • Works for continuous and non-continuous path both.

Contributing

1. Fork it (<https://github.com/himanshugarg08/animated_path/fork>)
2. Create your feature branch (`git checkout -b feature/fooBar`)
3. Commit your changes (`git commit -am 'Add some fooBar'`)
4. Push to the branch (`git push origin feature/fooBar`)
5. Create a new Pull Request

Categories

Source repository

Projects using this package

No data available yet.