A text animation UI plugin that provides you with gorgeous and customizable animated text widgets so that you can use them effortlessly in your project.
Physics-based animations are utilized for text animations, providing a smooth and delightful experience.
This project heavily inspires on jasudev's AnimateText for SwiftUI package
Link: https://pretty-animated-text.vercel.app
To use this package, add pretty_animated_text
as a dependency in your pubspec.yaml
file:
flutter pub add pretty_animated_text
There are two main animation types that you can trigger.
AnimationType.word
AnimationType.letter
And for texts such as RotateText
and OffsetText
, you can trigger some more variations like rotation direction and slide offset.
Currently, the plugin supports 6 alignment styles.
TextAlignment.start
TextAlignment.center
TextAlignment.end
TextAlignment.spaceAround
TextAlignment.spaceBetween
TextAlignment.spaceEvenly
Type | Word Animation | Letter Animation |
---|---|---|
Spring Text | ||
Chime Bell Text | ️ | |
Scale Text | ||
Blur Text | ||
Rotate Text (clockwise) | ||
Rotate Text (anti-clockwise) | ||
Offest Text (top-bottom) | ||
Offest Text (bottom-top) | ||
Offest Text (alternate top-bottom) | ||
Offest Text (left-right) | ||
Offest Text (right-left) | ||
Offest Text (alternate left-right) | ️ |
SpringText(
text: 'Lorem ipsum dolor sit amet ...',
duration: const Duration(seconds: 4),
type: AnimationType.word,
textStyle: const TextStyle(fontSize: 18),
)
ChimeBellText(
text: 'Lorem ipsum dolor sit amet ...',
duration: const Duration(seconds: 4),
type: AnimationType.word,
textStyle: const TextStyle(fontSize: 18),
),
ScaleText(
text: 'Lorem ipsum dolor sit amet ...',
duration: const Duration(seconds: 4),
type: AnimationType.word,
textStyle: const TextStyle(fontSize: 18),
),
Blur Text
BlurText(
text: 'Lorem ipsum dolor sit amet ...',
duration: const Duration(seconds: 4),
type: AnimationType.word,
textStyle: const TextStyle(fontSize: 18),
),
Rotate Text
For RotateText
, you can tweak two rotation directions.
RotateAnimationType.clockwise
(default)RotateAnimationType.anticlockwise
RotateText(
text: 'Lorem ipsum dolor sit amet ...',
direction: RotateAnimationType.clockwise,
duration: const Duration(seconds: 4),
type: AnimationType.word,
textStyle: const TextStyle(fontSize: 18),
),
Offset Text
OffsetText
has multiple slide effects that you can tweak according to your needs.
SlideAnimationType.topBottom
(default)SlideAnimationType.bottomTop
SlideAnimationType.alternateTB
SlideAnimationType.leftRight
SlideAnimationType.rightLeft
SlideAnimationType.alternateLR
OffsetText(
text: 'Lorem ipsum dolor sit amet ...',
duration: const Duration(seconds: 4),
type: AnimationType.word,
slideType: SlideAnimationType.topBottom,
textStyle: const TextStyle(fontSize: 18),
),
This project is licensed under MIT License.
Feel free to check it out and give it a ️ if you love it. Follow me for more updates and more projects
Suggestions are warmly welcome & more updates are coming along the way ... ️
Copyright (©️) 2024 YE LWIN OO