toMap method

Map toMap()

Implementation

Map toMap() {
  if (isEmpty) return {};
  return {
    'angle': angle,
    'cropRect': {
      'left': cropRect.left,
      'top': cropRect.top,
      'right': cropRect.right,
      'bottom': cropRect.bottom,
    },
    'originalSize': {
      'width': originalSize.width,
      'height': originalSize.height,
    },
    'cropEditorScreenRatio': cropEditorScreenRatio,
    'scaleUser': scaleUser,
    'scaleRotation': scaleRotation,
    'aspectRatio': aspectRatio,
    'flipX': flipX,
    'flipY': flipY,
    'offset': {
      'dx': offset.dx,
      'dy': offset.dy,
    },
  };
}