搜尋套件、儲存庫與 APP 分類

GitHub 儲存庫muammertekin/timed_widget

timed_widget

一組強大且可重複使用的時間相關 Flutter 小部件。

timed_widget 專案封面
星標
0
分支
0
最近推送(UTC)
2025年6月21日
專案狀態
未封存

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

⏱️ 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

Muammer TEKİN GitHub avatar
GitHub 作者

Muammer TEKİN ↗

Software Developer | Flutter & Dart

Turkey
語言DartC++CMakeSwiftCHTMLKotlinObjective-C

此儲存庫發佈的套件

使用的依賴

依賴清單 4 項

  • flutter{"sdk":"flutter"}
  • flutter_test開發依賴{"sdk":"flutter"}
  • flutter_lints開發依賴^5.0.0
  • fake_async開發依賴^1.3.3

如何選擇適合專案的儲存庫?

先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。

  1. 透過儲存庫名稱、作者或描述搜尋,再依技術分類縮小範圍。
  2. 綜合星標、分支與最近推送比較專案;星標反映社群關注,不保證品質。
  3. 使用前在 GitHub 確認 README、授權條款與 Issues。

來源與維護

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗