Task class

Demo task entity stored in memory.

Constructors

Task({required String id, required String title, required String description, required bool done, required DateTime createdAt})
Creates a task with the given fields.

Properties

createdAt → DateTime
Creation timestamp.
final
description → String
Optional longer description.
final
done → bool
Whether the task is completed.
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
Unique identifier.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
title → String
Short task title.
final

Methods

copyWith({bool? done}) → Task
Returns a copy with an updated done flag.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Serializes this task to JSON.
toString() → String
A string representation of this object.
inherited

Operators

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