toJson method
Implementation
Map<String, Object?> toJson() => <String, Object?>{
"id": id,
"page": pageIndex,
if (blockIndex >= 0) "block": blockIndex,
if (progress >= 0) "progress": progress,
if (title.isNotEmpty) "title": title,
if (note.isNotEmpty) "note": note,
"color": color.toARGB32(),
"created": createdAt.toIso8601String(),
};