KanbanColumn class

Represents a column in a Kanban board that contains tasks.

Each column has a unique id, header, optional columnLimit, and can be configured to allow or disallow direct task additions.

Constructors

KanbanColumn({required String id, required String header, int? columnLimit, bool canAddTask = true, String? headerBgColorLight, String? headerBgColorDark})
Creates a new Kanban column.

Properties

canAddTask bool
Whether tasks can be directly added to this column.
final
columnLimit int?
Maximum number of tasks allowed in this column. If null, there is no limit.
final
hashCode int
The hash code for this object.
no setterinherited
Display header text for the column.
final
headerBgColorDark String?
Background color for the column header in dark theme. Must be in hex ARGB format like "#FFF8F8F8"
final
headerBgColorLight String?
Background color for the column header in light theme. Must be in hex ARGB format like "#FF333333"
final
id String
Unique identifier for the column.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tasks List<Task>
List of tasks currently in this column.
final

Methods

addTask(Task task) → void
Adds a task to this column.
copyWith({String? id, String? header, int? columnLimit, bool? canAddTask, String? headerBgColorLight, String? headerBgColorDark, List<Task>? tasks}) KanbanColumn
Creates a copy of this kanban column with the given fields replaced with new values.
deleteTask(int index) Task
Deletes and returns the task at the specified index.
isDoneColumn() bool
Checks if this is the "Done" column.
moveTaskTo(int sourceIndex, KanbanColumn destination, [int? destinationIndex]) → void
Moves a task from this column to another column.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reorderTask(int oldIndex, int newIndex) → void
Reorders a task within this column.
replaceTask(int index, Task updatedTask) → void
Replaces the task at the specified index with an updated version.
toJson() Map<String, dynamic>
Converts the column to a JSON-compatible map for persistence.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited