toJson method
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',
};
}