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

use_scramble 封面
插件详情v0.0.13

use_scramble

一个轻量级的包,用于随机文本动画,灵感来自 useScramble

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
89
喜欢数
18
Pub 分数
160

安装插件

flutter pub add use_scramble

插件介绍

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

一个轻量级的 Flutter 包,可实现随机文本动画,灵感来自 useScramble 钩子。它能创建动态的打字机式效果,使文本看起来像是混乱后逐渐稳定成最终形式。非常适合用于吸引用户的界面元素,如加载消息、动画标题或交互式文本显示。该包易于集成,并可在所有主要平台上运行,包括移动设备、网页和桌面端。支持自定义混乱速度和字符集,适用于各种设计需求。

适合场景

  • 动画欢迎消息
  • 加载状态指示器
  • 交互式标题效果
  • 动态标签动画
  • 引入引导屏幕

主要特点

  • 实时文本混淆
  • 可自定义的动画速度
  • 支持自定义字符集
  • 跨平台兼容性
  • 所需设置最少
  • 跨设备的流畅性能

适合对象

  • 寻求动态文本效果的UI设计师
  • 开发交互式应用的开发者
  • 带有动画引导流程的项目
  • 需要在加载期间提供视觉反馈的应用程序
  • 创意数字体验

使用建议

  • 可能会影响非常长文本的性能
  • 对单个字符的定时控制有限
  • 不适合静态文本显示
  • 最适合简短有力的短语
  • 需要仔细调整才能获得最佳视觉效果

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

LICENCE - MIT pub package

Use Scramble GIF Demo

Lightweight package for random text animations inspired by useScramble

Used by

Usage

TextScramble(
    text: 'Hello World!',
    speed: Duration(milliseconds: 50),
    chars: '!<>-_\\/[]{}—=+*^?#________',
    correctCharProbability: 0.1, // Correct character probability in [0, 1]
    scrambleCycles: 4, // Number of times to scramble the text
    builder: (context, scrambledText) {
      // Use the builder to define how the text is displayed
      return Text(
        scrambledText,
        textAlign: TextAlign.center, // Text alignment is now within the builder
        style: TextStyle( // Text style is now within the builder
          fontSize: 40,
          color: Colors.green,
          fontFamily: 'JetBrainsMono',
        ),
      );
    },
),

Bugs/Requests

If you encounter any problems feel free to open an issue. If you feel the library is missing a feature, please raise a ticket on Github and I'll look into it. Pull request are also welcome.

Additional information

Medium article link

Created by Gleb | khlebobul@gmail.com

X Telegram

Support the project:

Credits

所属分类

源码仓库

使用此插件的项目