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

kanban_board 封面
套件詳情v1.0.0+2

kanban_board

可自定且可拖曳的看板小部件,適用於 Flutter。利用流暢的拖曳功能與彈性任務管理,建構類似 Trello 的工作看板。

AndroidiOSmacOSWindowsLinux
近 30 天下載
187
喜歡數
44
Pub 分數
140

安裝套件

flutter pub add kanban_board

套件介紹

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

一個可自訂且可拖曳的看板小工具,適用於 Flutter,支援建立類似 Trello 的任務看板,並具備流暢的拖放功能。它支援跨欄位的彈性任務管理,非常適合專案追蹤與工作流程視覺化。設計時著重於效能與易用性,能無縫整合至跨多個平台的 Flutter 應用中。

適用情境

  • 專案管理儀表板
  • 任務追蹤應用程式
  • 工作流可視化工具
  • 敏捷開發板
  • 團隊協作介面

主要特色

  • 拖曳-放開任務重新排序
  • 可自訂的欄位配置
  • 適用於所有平台的響應式設計
  • 內建動畫以實現過渡
  • 可擴展的任務卡片自訂

適合對象

  • 開發生產力應用的開發者
  • 使用敏捷或看板方法的團隊
  • 需要互動式畫板的UI設計師
  • 需要視覺任務管理的Flutter應用

使用建議

  • 複雜的工作流程需要仔細的狀態管理
  • 可能需要額外的樣式以實現品牌一致
  • 使用極大資料集時的效能影響
  • 有限的內建篩選或搜尋功能
  • 依賴外部套件以實現進階資料持久化

原始 README

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

Flutter KanbanBoard

A fully customizable and draggable Kanban Board widget for Flutter. Perfect for building Kanban tools like Trello, it offers smooth drag-and-drop interactions and flexible task management for an intuitive workflow experience.

Example

Installation

Just add kanban_board to the pubspec.yaml file.

🚀 Create Your First Board

Let's define our KanbanGroupItem which can hold custom properties, and can be done by extending KanbanBoardGroupItem.

  class KanbanGroupItem extends KanbanBoardGroupItem {
  final String itemId;
  final String title;

  KanbanGroupItem({
    required this.itemId,
    required this.title,
  });

  @override
  String get id => itemId;
  
}

Then let's generate some random tasks:

import 'dart:math' as math;

List<KanbanBoardGroup<String,KanbanGroupItem>> kanbanGroups = List.generate(
_kanbanData.length,
  (index) => KanbanBoardGroup(
    id: "group_$index",
    name: "Group $index",
    items: List.generate(
      math.Random().nextInt(10),
      (itemIndex) => KanbanGroupItem(
         itemId: "group_item_$itemIndex",
         title: "Item $itemIndex",
      ),
    ),
  ),
);

And, Here comes the Kanban Board:

void main() {
  runApp(MaterialApp(home: KanbanBoardPage()));
}

class KanbanBoardPage extends StatelessWidget {
  final _controller = KanbanBoardController();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text("Flutter Kanban Board")),
      body: KanbanBoard(
        controller: _controller,
        groups: kanbanGroups,
        groupItemBuilder: groupItemBuilder,
        onGroupItemMove:
            (oldGroupIndex, oldItemIndex, newGroupIndex, newItemIndex) {},
        onGroupMove: (oldGroupIndex, newGroupIndex) {},
      ),
    );
  }

  BoxConstraints get groupConstraints => const BoxConstraints(
        minWidth: 300,
        maxWidth: 300,
      );

  Widget groupItemBuilder(context, groupId, itemIndex) {
    final groupItem = kanbanGroups
        .firstWhere((element) => element.id == groupId)
        .items[itemIndex];
    return Container(
      padding: const EdgeInsets.all(10),
      decoration: BoxDecoration(
        borderRadius: BorderRadius.circular(8),
      ),
      child: Text(groupItem.title),
    );
  }
}

✨ Want to Customize Your Board?

Make it uniquely yours with extensive customization options by exploring range of customization properties in KanbanBoard, including:

image

⚡ Fine-tune Board Scrolling Dynamics

Tailor the scrolling experience to match your application's feel:

KanbanBoard(
   ...
   boardScrollConfig: BoardScrollConfig(
        curve: // The animation curve
        farBoundary: Boundary(
          boundary: // The distance from the edge of the board at which auto-scrolling starts when dragging near the edge.
          offset: // The amount of scroll movement when the draggable reaches this boundary.
          duration: // The time duration for each scroll step when within this boundary.
        ),
        midBoundary: Boundary( ... ), // A middle-range boundary that triggers auto-scrolling at a moderate speed.
        nearBoundary: Boundary( ... ), // The closest range to the edge, where scrolling is most responsive.
   ),
   ...
);

📱 See It In Action

Check out the example app to see all features in action.

🤝 Your Contribution Is Welcome!

Join our community of developers:

  1. Fork the repository
  2. Create your feature branch: git checkout -b amazing-feature
  3. Commit your changes: git commit -m 'Add some amazing feature'
  4. Push to the branch: git push origin amazing-feature
  5. Open a pull request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

所屬分類

依賴

依賴清單 3 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。