Giter Site home page Giter Site logo

guchengxi1994 / flutterkanbanboard Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 1akhanbaheti/flutterkanbanboard

0.0 0.0 0.0 23.44 MB

It is a customizable kanban board, which can be used to reorder items and list with drag and drop.

Home Page: https://pub.dev/packages/kanban_board

License: Other

C++ 13.92% C 0.87% Objective-C 0.02% Kotlin 0.07% Dart 71.48% Swift 1.06% HTML 1.12% CMake 11.45%

flutterkanbanboard's Introduction

Flutter KanbanBoard

It is a customizable kanban board, which can be used to reorder items and list with drag and drop.

Installation

Just add kanban_board to the pubspec.yaml file.

Usage Example

To get started you can look inside the /example folder. This package is broken into 3 core parts

Example

KanbanBoard

The KanbanBoard class takes in a List of BoardListsData

List<BoardListsData> _lists = List<BoardListsData>();

KanbanBoard(
   _lists,
);

It can take some other parameters also like :


BackgroundColor,
CardPlaceHolderColor,
ListPlaceHolderColor,
BoardDecoration,
CardTransitionBuilder,
ListTransitionBuilder,
CardTransitionDuration,
ListTransitionDuration,
ListDecoration,
TextStyle,
DisplacementX = 0.0,
DisplacementY = 0.0,

Callbacks

The Kanban Board has several callback methods that get called when dragging. A long press on the item field widget will begin the drag process.

KanbanBoard(

onItemLongPress: (int cardIndex,int listIndex) { },
    
onItemReorder: (int oldCardIndex, int newCardIndex, int oldListIndex, int newListIndex) { },
        
onListLongPress: (int listIndex) { },
        
onListReorder: (int oldListIndex, int newListIndex) {},
        
onItemTap: (int cardIndex, int listIndex){},

onListTap: (int listIndex){}

);

BoardListsData

The BoardListData has several parameters to customize lists in board. The header & footer expects a Widget as its object, and items expect List. The header item on long press will begin the drag process for the BoardList.

    BoardListsData(
      title: 'TITLE',
      width: 300,
      headerBackgroundColor: Color.fromARGB(255, 235, 236, 240),
      footerBackgroundColor: Color.fromARGB(255, 235, 236, 240),
      backgroundColor: Color.fromARGB(255, 235, 236, 240),
      header: Padding(
                padding: EdgeInsets.all(5),
                child: Text(
                  "List Title",
                  style: TextStyle(fontSize: 20),
                )),

      footer :Padding(
                padding: EdgeInsets.all(5),
                child: Text(
                  "List Footer",
                  style: TextStyle(fontSize: 20),
                )),   
      items: items,
    );

flutterkanbanboard's People

Contributors

1akhanbaheti avatar guchengxi1994 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.