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

flutter_timeline 封面
套件詳情v0.3.0

flutter_timeline

一個完全可自訂且通用的時間軸小部件,基於真實世界應用參考

近 30 天下載
152
喜歡數
138
Pub 分數
60

安裝套件

flutter pub add flutter_timeline

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個完全可自訂的 Flutter 時間軸小工具,專為現實世界的應用參考而設計。它支援靈活的佈局設定,讓開發者能夠建立動態且互動式的時間軸,用於事件、流程或歷史資料。此小工具具備通用性,適用於各種用途,例如專案追蹤、入職流程和事件歷程。透過直覺的自訂選項,它能順暢適應不同設計需求,同時維持效能與可讀性。

適用情境

  • 專案進度追蹤
  • 使用者引導流程
  • 歷史事件展示
  • 流程圖可視化
  • 應用更新日誌

主要特色

  • 高度可自訂的設計
  • 支援垂直與水平佈局
  • 可擴充的事件項目設定
  • 響應式且高效能的渲染
  • 內建動畫支援

適合對象

  • 開發流程導向的應用程式開發者
  • 需要靈活時間軸組件的設計師
  • 需要視覺事件順序的應用程式

使用建議

  • 複雜的動畫需要手動設定
  • 有限的平台特定優化
  • 無內建的日期格式化工具
  • 最適合靜態或半動態內容
  • 依賴外部樣式進行主題整合

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。


framework: flutter platform: Android, iOS, Web, macOS, Linux, Windows tags: flutter, timeline, flutter timeline, timeline tile title: flutter timeline

flutter_timeline

logo

a fully customizable & general timeline widget, based on real-world application references

  • ✅ fully customizable indicator dot
  • ✅ support spacing between indicator dot and lines
  • ✅ support spacing between event (items) but leaving the line connected
  • ✅ uses custom paint, but yet, indicator and body are fully customizable.
  • ✅ 2 real-world demos
  • ✅ L2R support
  • ✅ anchor support
  • ✅ global offset support
  • ✅ item offset support
  • ✅ supported & used by enterprise, constantly updated, used on production application.

Installation

dependencies:
  flutter_timeline: latest

usage

simple

  TimelineEventDisplay get plainEventDisplay {
    return TimelineEventDisplay(
        child: TimelineEventCard(
          title: Text("just now"),
          content: Text("someone commented on your timeline ${DateTime.now()}"),
        ),
        indicator: TimelineDots.of(context).circleIcon);
  }

  List<TimelineEventDisplay> events;

  Widget _buildTimeline() {
    return TimelineTheme(
        data: TimelineThemeData(lineColor: Colors.blueAccent),
        child: Timeline(
          indicatorSize: 56,
          events: events,
        ));
  }

  void _addEvent() {
    setState(() {
      events.add(plainEventDisplay);
    });
  }

using offset

Widget _buildTimeline() {
  return Timeline(
      indicatorSize: 56,
      events: events,
      altOffset: Offset(0, -24) // set offset
  );
}

using anchor & offset

  TimelineEventDisplay get plainEventDisplay {
    return TimelineEventDisplay(
        anchor: IndicatorPosition.top,
        indicatorOffset: Offset(0, 24),
        child: TimelineEventCard(
          title: Text("multi\nline\ntitle\nawesome!"),
          content: Text("someone commented on your timeline ${DateTime.now()}"),
        ),
        indicator: randomIndicator);
  }

complex example

simple example (run it now!)

more documentation available at github

Sponsors

sponsored-by-grida

Also check out...

flutter_layouts

references

https://www.pinterest.com/official_softmarshmallow/flutter-timeline/

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。