toJson method
Implementation
Map<String, Object?> toJson() => {
'path': path,
'takenAt': takenAt.toIso8601String(),
'ageMs': age.inMilliseconds,
'trigger': trigger,
if (lifecycle != null) 'lifecycle': lifecycle,
if (width != null) 'width': width,
if (height != null) 'height': height,
};