TypeWriter Text

0

A simple typewriter text animation wrapper for flutter.

Miscellaneous

dart
flutter
flutter-package
pub-dev

A simple typewriter text animation wrapper for Flutter

This package provides a typewriter text animation wrapper for Flutter, allowing you to create typewriter-like effects in your applications. It supports various platforms including iOS, Android, web, Windows, macOS, and Linux.

Installation

To use this package, add the following line to your pubspec.yaml file:

dependencies:
  typewritertext: ^2.1.0

Usage

To use the typewriter text animation, first import the typewritertext package:

import 'package:typewritertext/typewritertext.dart';

You can then use the TypeWriterText widget as follows:

const TypeWriterText(
  text: Text('lorem ipsum dolor sit amet ...'),
  duration: Duration(milliseconds: 50),
);

Alternatively, you can use the builder method to integrate the typewriter text animation with other widgets:

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 Specify the text using the Text() widget.
duration Determine the speed at which the text changes.
alignment Align the text within the occupied size.
maintainSize Maintain the occupied size of the final text. The default value is true.
play Set whether the animation should play or not. The default value is true.
repeat Set whether the animation should be repeated or not. The default value is false.

For further details, refer to the full documentation.

Example

An example demonstrating the usage of typewritertext can be found in the following file:

typewritertext/example/lib/main.dart
Company Screenshot