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

插件详情v0.1.1

timed_widget

一组可重复使用的 Flutter 小部件,用于定时交互:延迟可见性、切换器、序列器、动画等。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
9
喜欢数
4
Pub 分数
155

安装插件

flutter pub add timed_widget

插件介绍

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

timed_widget 是一个 Flutter 包,提供可重用的组件,用于管理用户界面中的定时交互。它使开发者能够轻松创建延迟显示、动画切换器、顺序显示组件以及定时过渡效果。适用于引导流程、启动屏幕或交互式教程,无需编写复杂的自定义代码即可简化基于时间的 UI 逻辑实现。该包支持所有主要平台,并能无缝集成到现有的 Flutter 项目中。

适合场景

  • 引导流程
  • 启动屏动画
  • 逐步教程
  • 定时内容揭示
  • 交互式指南
  • 动画过渡

主要特点

  • 延迟的控件可见性
  • 顺序小部件显示
  • 内置动画
  • 跨平台支持
  • 简单 API
  • 可重用组件

适合对象

  • UI/UX 设计师
  • Flutter 初学者
  • App 启动开发者
  • 交互式教程创建者
  • 以动画为重点的应用

使用建议

  • 需要了解 Flutter 的 widget 生命周期
  • 高级动画的自定义功能有限
  • 最适合简单的定时场景
  • 复杂过渡可能需要额外的包
  • 不适合高性能动画密集型应用

原始 README

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

⏱️ timed_widget

A flexible and lightweight Flutter package that provides time-based UI building blocks — including delayed visibility, timed switchers, animated builders, scheduled sequences, and more.

Ideal for onboarding flows, staggered animations, tutorial steps, micro-interactions, and other UI effects that rely on timing.


✨ Features

  • Show or hide widgets after a delay
  • Switch between two widgets with timing & animation
  • Run a function after a specified delay
  • Rebuild widgets repeatedly on a timer
  • Animate widgets using AnimationController with duration + curve
  • Trigger a sequence of widget displays with custom delay per step
  • Manage widget visibility in groups or sequences
  • Use mixin utilities to manage Timer lifecycle cleanly

📦 Installation

Add to your pubspec.yaml:

dependencies:
  timed_widget: ^0.1.0

Then import:

import 'package:timed_widget/timed_widget.dart';

🧩 Available Widgets

Widget/Class Purpose
TimedVisibility Show/hide a widget after a delay, optionally reverse or loop
TimedSwitcher Switch between two widgets after a delay, animated
TimedBuilder Conditionally build a widget after a delay (bool isElapsed)
TimedFunction Execute a callback once after a delay
TimedRepeatBuilder Periodically rebuild a widget with tick counter
TimedAnimatedBuilder Animate a value (0.0 → 1.0) over time
TimedSequence Step-based widget display with delays and optional controller
TimedVisibilityController Imperative control for TimedVisibility
TimedGroupController Start/reset multiple TimedVisibility widgets at once
TimedSequenceController External control of sequence progression or reset
TimedMixin Mixin for stateful widgets to safely manage timers

🚀 Example

TimedVisibility(
  delay: Duration(seconds: 2),
  reverseAfter: Duration(seconds: 3),
  loop: true,
  child: Text('Hello after 2 seconds!'),
);
TimedFunction(
  delay: Duration(milliseconds: 500),
  onElapsed: () => print('Half a second passed!'),
);
TimedSequence(
  steps: [
    TimedStep(delay: Duration(seconds: 1), child: Text('Step 1')),
    TimedStep(delay: Duration(seconds: 2), child: Text('Step 2')),
  ],
);

📷 Demo

🕑 TimedVisibility

TimedVisibility demo

📋 TimedSequence

TimedSequence demo


📝 License

MIT License. See LICENSE.


🙌 Contributing

Contributions are welcome and appreciated.

Whether you're fixing a typo, adding a test, or suggesting a new widget, your input helps make this package better for everyone.

Open an issue, start a discussion, or send a pull request — let's collaborate. 🧩


🔗 Links

所属分类

源码仓库

使用此插件的项目

暂无相关数据。