typewriter 0.0.3
typewriter provides a builder-pattern-friendly Typewriter widget for animating text.
typewriter
A simple Flutter typewriter animation wrapper
Installing
See Installing Tab.
Usage
This package exposes a single Typewriter Widget:
Typewriter("hello world!",
controller: _animationController,
);
You can create the AnimationController when you create your widget's state:
@override
void initState() {
_animationController = AnimationController(
vsync: this,
duration: Duration(
seconds: 2,
),
);
super.initState();
}
@override
void dispose() {
_controller.dispose();
super.dispose();
}
From there, you can trigger the Typewriter's animation using the AnimationController.
FlatButton(
onPressed: () {
_controller.forward();
},
child: Text("Tap to play animation"),
)
Example
See Example Tab for a full example.