typewritertext 2.2.0 typewritertext: ^2.2.0 copied to clipboard
A simple typewriter text animation wrapper for flutter. Supports iOS, Android, web, Windows, macOS, and Linux.
Type Writer Text #
A simple typewriter text animation wrapper for flutter, supports iOS, Android, web, Windows, macOS, and Linux.
Preview #
Install #
Add this line to your pubspec.yaml.
dependencies:
typewritertext: ^2.2.0
Usage #
First, import the typewriter package.
import 'package:typewritertext/typewritertext.dart';
And then put the widget like this.
const TypeWriterText(
text: Text('lorem ipsum dolor sit amet ...'),
duration: Duration(milliseconds: 50),
);
// or you can use builder to integrate
// with other widget like this
const TypeWriterText.builder(
'Lorem ipsum dolor sit amet ...',
duration: Duration(milliseconds: 50),
builder: (context, value) {
return AutoSizeText(
value,
maxLines: 2,
minFontSize: 2.0,
);
}
);
Documentation #
Property | Purpose |
text | Use widget Text(). |
duration | Used to determine how fast text changes. |
alignment | Align the text within the occupied size. |
maintainSize | Used to maintain occupied size of final text. Default value is true. |
play | To set whether animation should play or not. Default value is true. |
repeat | To set whether animation should be repeated or not. Default value is false. |
Full documentation here.