toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    if (image != null) 'image': image,
    if (backgroundColor != null) 'backgroundColor': backgroundColor,
    if (duration != null) 'duration': duration,
  };
}