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

appflowy_board 封面
套件詳情v0.1.2

appflowy_board

AppFlowyBoard 是一個基於面板的組件,由多個群組組成。它支援在不同群組之間進行拖曳與放置操作。

AndroidiOSmacOSWindowsLinux
近 30 天下載
3390
喜歡數
225
Pub 分數
130

安裝套件

flutter pub add appflowy_board

套件介紹

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

AppFlowyBoard 是一個 Flutter 小部件,專為建立具有多個群組的板式介面而設計,支援群組間直觀的拖曳與放置互動。非常適合以視覺化、彈性的佈局來組織任務、專案或內容。此小部件支援跨平台使用,相容 Android、iOS、macOS、Windows 與 Linux。它是 AppFlowy 生態系統的一部分,強調生產力與使用者友善的資料管理。其模組化設計讓開發者能輕鬆自訂群組行為與項目互動。

適用情境

  • 任務管理
  • 專案規劃
  • 內容組織
  • 可視化工作流設計
  • 協作編輯

主要特色

  • 多組板佈局
  • 組間拖放
  • 跨平台支援
  • 可自定義的組項目
  • 可擴充的 UI 組件

適合對象

  • 生產力應用
  • 看板式工具
  • 儀表板建構器
  • 開發者工具
  • 互動式資料顯示

使用建議

  • 需要了解 Flutter 手勢
  • 可能需要額外的狀態管理
  • 除了 GitHub 外,文件內容有限
  • 最適合中到大型棋盤
  • 依賴 AppFlowy 生態系統以實現完整功能

原始 README

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

appflowy_board

AppFlowy Board

A customizable and draggable Kanban Board widget for Flutter

Discord • Twitter

AppFlowyBoard

Intro

appflowy_board is a customizable and draggable Kanban Board widget for Flutter. You can use it to create a Kanban Board tool like those in Trello.

Check out appflowy_board to see to build a BoardView database.

AppFlowyBoard

Getting Started

Add the AppFlowy Board Flutter package to your environment.

With Flutter:

flutter pub add appflowy_board
flutter pub get

This will add a line like this to your package's pubspec.yaml:

dependencies:
  appflowy_board: ^0.1.0

Create your first board

Initialize an AppFlowyBoardController for the board. It contains the data used by the board. You can register callbacks to receive the changes of the board.


final AppFlowyBoardController controller = AppFlowyBoardController(
  onMoveGroup: (fromGroupId, fromIndex, toGroupId, toIndex) {
    debugPrint('Move item from $fromIndex to $toIndex');
  },
  onMoveGroupItem: (groupId, fromIndex, toIndex) {
    debugPrint('Move $groupId:$fromIndex to $groupId:$toIndex');
  },
  onMoveGroupItemToGroup: (fromGroupId, fromIndex, toGroupId, toIndex) {
    debugPrint('Move $fromGroupId:$fromIndex to $toGroupId:$toIndex');
  },
);

Provide an initial value of the board by initializing the AppFlowyGroupData. It represents a group data and contains list of items. Each item displayed in the group requires to implement the AppFlowyGroupItem class.


void initState() {
  final group1 = AppFlowyGroupData(id: "To Do", items: [
    TextItem("Card 1"),
    TextItem("Card 2"),
  ]);
  final group2 = AppFlowyGroupData(id: "In Progress", items: [
    TextItem("Card 3"),
    TextItem("Card 4"),
  ]);

  final group3 = AppFlowyGroupData(id: "Done", items: []);

  controller.addGroup(group1);
  controller.addGroup(group2);
  controller.addGroup(group3);
  super.initState();
}

class TextItem extends AppFlowyGroupItem {
  final String s;
  TextItem(this.s);

  @override
  String get id => s;
}

Finally, return a AppFlowyBoard widget in the build method.


@override
Widget build(BuildContext context) {
  return AppFlowyBoard(
    controller: controller,
    cardBuilder: (context, group, groupItem) {
      final textItem = groupItem as TextItem;
      return AppFlowyGroupCard(
        key: ObjectKey(textItem),
        child: Text(textItem.s),
      );
    },
    groupConstraints: const BoxConstraints.tightFor(width: 240),
  );
}

Usage Example

To quickly grasp how it can be used, look at the /example/lib folder. First, run main.dart to play with the demo.

Second, let's delve into multi_board_list_example.dart to understand a few key components:

  • A Board widget is created via instantiating an AppFlowyBoard object.
  • In the AppFlowyBoard object, you can find the AppFlowyBoardController, which is defined in board_data.dart, is fed with pre-populated mock data. It also contains callback functions to materialize future user data.
  • Three builders: AppFlowyBoardHeaderBuilder, AppFlowyBoardFooterBuilder, AppFlowyBoardCardBuilder. See below image for what they are used for.

AppFlowyBoard

Glossary

Please refer to the API documentation.

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

Please look at CONTRIBUTING.md for details.

所屬分類

依賴

依賴清單 2 項

原始碼儲存庫

使用此套件的專案