FLUTTER ECOSYSTEM

peaashmeter/rich_typewriter

下部の Text.rich または RichText をタイプライターのようにアニメーションさせるウィジェット。

rich_typewriter のプロジェクト画像
Stars
2
Forks
1
最終プッシュ(UTC)
2024/03/02
プロジェクト状態
公開中
Ivan Yuriev GitHub avatar
GITHUB User

Ivan Yuriev ↗

言語Dart

このリポジトリが公開するパッケージ

使用している依存関係

依存関係一覧 3 件
  • flutter{"sdk":"flutter"}
  • flutter_test開発用{"sdk":"flutter"}
  • flutter_lints開発用^3.0.1

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

README を開く / 閉じる

rich_typewriter

A widget that makes underlying Text.rich or RichText animate like a typewriter.

Preview

Motivation

I was creating a visual novel engine, so I needed a convenient way to animate RichTexts (with styles and WidgetSpans). Actually there are some packages which do the thing, but they do not work with existent RichTexts and/or do not support WidgetSpans.

In addition, it's also a kind of proof of concept in terms of interaction with the element tree.

Features

  • Wrap a Text.rich or a RichText to animate.
  • Supports trees of InlineSpan with arbitrary depth.
  • Can print both text characters and widgets.
  • Allows to set up different delays for different symbols.
  • Allows to call a function when the animation ends.

Usage

RichTypewriter(
        child: const Text.rich(TextSpan(text: "some text", children: [
      WidgetSpan(
          child: FlutterLogo(
        size: 100,
      ))
    ])));