toJson method Null safety
The current instance as a Map.
Implementation
Map<String, Object?> toJson() {
// The id is not added to the map as it is not necessary.
return {
'header': header,
'message': message,
'x': x,
'y': y,
'from': Timestamp.fromDate(from),
'to': Timestamp.fromDate(to),
'scheduled': scheduled,
'fontFamily': fontFamily,
'fontSize': fontSize,
'backgrondColour': backgrondColour,
'foregroundColour': foregroundColour,
'width': width,
'height': height,
'textAlignment': textAlignment,
};
}