toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final image = this.image;
  final duration = this.duration;
  final fadeIn = this.fadeIn;
  final fadeOut = this.fadeOut;
  final height = this.height;
  final imageX = this.imageX;
  final imageY = this.imageY;
  final layer = this.layer;
  final opacity = this.opacity;
  final width = this.width;
  return {
    'image': image,
    if (duration != null) 'duration': duration,
    if (fadeIn != null) 'fadeIn': fadeIn,
    if (fadeOut != null) 'fadeOut': fadeOut,
    if (height != null) 'height': height,
    if (imageX != null) 'imageX': imageX,
    if (imageY != null) 'imageY': imageY,
    if (layer != null) 'layer': layer,
    if (opacity != null) 'opacity': opacity,
    if (width != null) 'width': width,
  };
}