typewrite_text 1.0.1 copy "typewrite_text: ^1.0.1" to clipboard
typewrite_text: ^1.0.1 copied to clipboard

A typewriter text animation wrapper with customizations. Supports iOS, Android, web, Windows, macOS, and Linux.

typewrite_text #

pub package

A typewriter text animation wrapper with customizations. Supports iOS, Android, web, Windows, macOS, and Linux.

Motivation #

While creating a website for myself, I decided to embellish it with a small yet striking text animation to give it extra allure. This little detail not only added beauty to my site but also brought dynamism, making it stand out among others. While there are some packages that offer almost what I need, they weren't quite sufficient for my vision.

Features #

  • Allows to set up different delays for forward and reverse animation.
  • Allows to set up different delays before animation starts and after animation ends.
  • Can be used just in "forward" mode.
  • Any unicode symbol can be used as a "cursor" symbol
  • Can be used with or without animated text cursor.
  • Allows to set up text theme.
  • Vibration while animating can be used for Android and iOS devices

Usage #

Basic animation. Just add text line(s) and specify text theme:

TypewriteText(
  linesOfText: ['Hello World', 'Hello Flutter', 'Hello Dart'],
  textStyle: TextStyle(color: Colors.red),
  cursorSymbol: '|',
),

One side animation without showing animated text cursor:

TypewriteText(
  linesOfText: ['Hello World', 'Hello Flutter', 'Hello Dart'],
  textStyle: TextStyle(color: Colors.blue, fontSize: 20, fontWeight: FontWeight.bold),
  reverseAnimationDuration: Duration.zero,
  beforeAnimationDuration: Duration.zero,
)

Two side animation with vibration:

TypewriteText(
  linesOfText: ['Hello World', 'Hello Flutter', 'Hello Dart'],
  textStyle: TextStyle(color: Colors.teal, fontSize: 24),
  cursorSymbol: '●',
  tryToVibrate: true, //<- use carefully if vibration is needed.
  forwardAnimationDuration: Duration(milliseconds: 50),
  reverseAnimationDuration: Duration(milliseconds: 50),
  cursorBlinkingDuration: Duration.zero,
)

[]

Documentation #

Property Purpose
linesOfText List of strings to be shown.
textStyle TextStyle for this strings.
forwardAnimationDuration The rate of a symbol appears.
reverseAnimationDuration The rate of a symbol vanishes.
beforeAnimationDuration The interval before the symbols' initial appearance.
afterAnimationDuration The pause following the display of all symbols.
cursorBlinkingDuration Interval of cursor blinking (cursorSymbol != null). If Duration.zero is used, cursor will always visible
cursorSymbol Default value is null. This means, cursor will not be shown. Otherwise, use any unicode symbol, that will be used as a cursor symbol (
cursorColor Color of the animated text cursor.
tryToVibrate if the flag is true, on Android and iOS devices, animation will be accompanied by vibration. Default value - 'false'
34
likes
0
points
185
downloads

Publisher

verified publisherhorlova.site

Weekly Downloads

A typewriter text animation wrapper with customizations. Supports iOS, Android, web, Windows, macOS, and Linux.

Homepage
Repository (GitHub)
View/report issues

Topics

#text #animation

License

unknown (license)

Dependencies

flutter

More

Packages that depend on typewrite_text