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

overflow_text_animated 封面
插件详情v0.0.6

overflow_text_animated

一个处理文本溢出动画的 Flutter 包项目。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
211
喜欢数
51
Pub 分数
155

安装插件

flutter pub add overflow_text_animated

插件介绍

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

一个 Flutter 包,通过平滑地显示或隐藏溢出文本,实现文本溢出的动画效果。当文本超出其容器边界时,该包通过微妙的动画提升用户体验,非常适合空间有限的动态 UI。该包支持多个平台,并可无缝集成到现有的 Flutter 项目中。专为寻求在文本截断时获得优雅视觉反馈的开发者设计。

适合场景

  • 动态文本容器
  • 动画文本截断
  • 用户界面增强
  • 响应式设计元素
  • 交互式文本显示
  • 溢出时的视觉反馈

主要特点

  • 溢出时的平滑动画
  • 跨平台支持
  • 与 Flutter 的轻松集成
  • 可自定义的动画持续时间
  • 支持多行文本
  • 所需的样板代码最少

适合对象

  • UI/UX 设计师
  • Flutter 开发者
  • 文本内容可变的应用程序
  • 交互式仪表板
  • 移动和Web应用

使用建议

  • 大型文本块可能影响性能
  • 动画行为可能因平台而异
  • 需要仔细调整以获得最佳用户体验
  • 不适用于仅静态文本
  • 除了基本动画外,自定义选项有限
  • 依赖于 Flutter 的渲染管道

原始 README

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

A plugin that displays overflowed text in a different way:

Installing

1. Depend on it

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

dependencies:
  overflow_text_animated: ^0.0.6
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:overflow_text_animated/overflow_text_animated.dart';

Usage

OverflowTextAnimated is a Stateful Widget. Include it in your build method like:

OverflowTextAnimated(
  text: overflowText,
  style: descriptionStyle,
  curve: Curves.fastEaseInToSlowEaseOut,
  animation: OverFlowTextAnimations.scrollOpposite,
  animateDuration: Duration(milliseconds: 1500),
  delay: Duration(milliseconds: 500),
)

OverflowTextAnimated is used as default text widget. It has many configurable properties, including:

  • text - required properties
  • style – style of text
  • curve – motion curves of animation effects
  • animation - animation type
  • animateDuration – is the duration of the animation
  • delay – is the break time between 2 animations

Note: Widget is only available when its parent has a specified width.

所属分类

源码仓库

使用此插件的项目

暂无相关数据。