搜索插件、代码仓与 APP 分类

插件详情v1.1.0

rich_typewriter

一个使底层 Text.rich 或 RichText 像打字机一样动画的组件。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
38
喜欢数
37
Pub 分数
150

安装插件

flutter pub add rich_typewriter

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

一个 Flutter 小部件,可对 Text.rich 或 RichText 内容进行动画处理,以模拟打字机效果,逐字符地流畅打出文本。非常适合创建引人入胜的引导界面、动态消息或交互式叙事界面。该动画可自定义,并可在所有主要平台(包括移动设备、网页和桌面端)上正常运行。通过为文本内容添加视觉节奏和焦点,提升用户体验。

适合场景

  • 引导教程
  • 互动叙事
  • 动态消息显示
  • 动画欢迎屏幕
  • 交互式 UI 元素
  • 实时聊天模拟

主要特点

  • 逐字符打字动画
  • 支持富文本格式
  • 跨平台兼容性
  • 可自定义的输入速度
  • 平滑的过渡效果
  • 与现有 Text.rich 的轻松集成

适合对象

  • 寻求动画文本效果的UI设计师
  • 开发交互式应用的开发者
  • 教育类或基于叙事的应用程序
  • 需要吸引注意力的文字动画的应用

使用建议

  • 可能会影响非常长文本的性能
  • 需要仔细设置时间以获得最佳用户体验
  • 不适合静态或快速变化的内容
  • 在动画过程中对单个字符样式控制有限
  • 最好少量使用,以避免用户疲劳

原始 README

以下为关联源码仓库的 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,
      ))
    ])));

所属分类

源码仓库

使用此插件的项目

暂无相关数据。