toJson method Null safety

Map<String, Object?> toJson()

The current instance as a Map.

Implementation

Map<String, Object?> toJson() {
  return {
    'header': header,
    'message': message,
    'id': id,
    'fontFamily': fontFamily,
    'fontSize': fontSize,
    'backgrondColour': backgrondColour,
    'foregroundColour': foregroundColour,
    'width': width,
    'height': height,
    'textAlignment': textAlignment,
  };
}