toJson method

Map<String, dynamic> toJson()

Converts this Bucket instance to a JSON object.

Returns

A Map containing the bucket data in JSON format

Implementation

Map<String, dynamic> toJson() {
  return {
    'id': id,
    'name': name,
    'description': description,
    'createdAt': createdAt.toIso8601String(),
  };
}