AppFlowy/frontend/app_flowy/packages/appflowy_board
2022-08-08 10:27:58 +08:00
..
example chore: rename flowy_board to appflowy_board 2022-08-08 10:27:58 +08:00
lib chore: rename flowy_board to appflowy_board 2022-08-08 10:27:58 +08:00
test chore: rename flowy_board to appflowy_board 2022-08-08 10:27:58 +08:00
.gitignore chore: rename flowy_board to appflowy_board 2022-08-08 10:27:58 +08:00
.metadata chore: rename flowy_board to appflowy_board 2022-08-08 10:27:58 +08:00
analysis_options.yaml chore: rename flowy_board to appflowy_board 2022-08-08 10:27:58 +08:00
CHANGELOG.md chore: rename flowy_board to appflowy_board 2022-08-08 10:27:58 +08:00
LICENSE chore: rename flowy_board to appflowy_board 2022-08-08 10:27:58 +08:00
pubspec.yaml chore: rename flowy_board to appflowy_board 2022-08-08 10:27:58 +08:00
README.md chore: rename flowy_board to appflowy_board 2022-08-08 10:27:58 +08:00

appflowy_board

The appflowy_board is a package that is used in AppFlowy. For the moment, this package is iterated very fast.

appflowy_board will be a standard git repository when it becomes stable.

Getting Started

@override
  void initState() {
    final column1 = BoardColumnData(id: "1", items: [
      TextItem("a"),
      TextItem("b"),
      TextItem("c"),
      TextItem("d"),
    ]);
    final column2 = BoardColumnData(id: "2", items: [
      TextItem("1"),
      TextItem("2"),
      TextItem("3"),
      TextItem("4"),
      TextItem("5"),
    ]);

    final column3 = BoardColumnData(id: "3", items: [
      TextItem("A"),
      TextItem("B"),
      TextItem("C"),
      TextItem("D"),
    ]);

    boardDataController.addColumn(column1);
    boardDataController.addColumn(column2);
    boardDataController.addColumn(column3);

    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Board(
      dataController: boardDataController,
      background: Container(color: Colors.red),
      footBuilder: (context, columnData) {
        return Container(
          color: Colors.purple,
          height: 30,
        );
      },
      headerBuilder: (context, columnData) {
        return Container(
          color: Colors.yellow,
          height: 30,
        );
      },
      cardBuilder: (context, item) {
        return _RowWidget(item: item as TextItem, key: ObjectKey(item));
      },
      columnConstraints: const BoxConstraints.tightFor(width: 240),
    );
  }