Skip to content

Stream Typewriter Text is a Flutter package that provides a typewriter text animation effect.

License

Notifications You must be signed in to change notification settings

hantrungkien/stream-typewriter-text

Repository files navigation

Stream Typewriter Text

Stream Typewriter Text is a Flutter package that provides a typewriter text animation effect.



Platform Pub Package License: MIT


Installing

1. Depend on it

Add this to your package's pubspec.yaml file:

dependencies:
  stream_typewriter_text: ^1.0.8

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

3. Import it

Now in your Dart code, you can use:

import 'package:stream_typewriter_text/stream_typewriter_text.dart';

Usage

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,
                  );
                },
              )