Stream Typewriter Text is a Flutter package that provides a typewriter text animation effect.
Add this to your package's pubspec.yaml
file:
dependencies:
stream_typewriter_text: ^1.0.8
You can install packages from the command line:
with pub
:
$ pub get
with Flutter
:
$ flutter pub get
Now in your Dart
code, you can use:
import 'package:stream_typewriter_text/stream_typewriter_text.dart';
StreamTypewriterAnimatedText
is a Stateful Widget that produces text animations.
Include it in your build
method like:
StreamBuilder(
stream: _streamController.stream,
builder: (context, snapshot) {
final text = snapshot.data ?? '';
return StreamTypewriterAnimatedText(
text: text,
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: Colors.black,
),
maxLines: 5,
overflow: TextOverflow.ellipsis,
);
},
)