toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    'type': type,
    'rawContent': rawContent,
    'imageUri': imageUri,
    'youtubeVideoId': youtubeVideoId,
    'soundcloudTrackId': soundcloudTrackId,
    'soudcloudEmbedCode': soudcloudEmbedCode,
    'hearthisAtTrackId': hearthisAtTrackId,
    'fontFamily': fontFamily,
    'textAlign': textAlign == TextAlign.left
        ? 'left'
        : textAlign == TextAlign.center
            ? 'center'
            : 'right',
  };
}