TransformConfigs.fromMap constructor
TransformConfigs.fromMap(
- Map map
Implementation
factory TransformConfigs.fromMap(Map map) {
return TransformConfigs(
angle: map['angle'] ?? 0,
cropRect: Rect.fromLTRB(
map['cropRect']?['left'] ?? 0,
map['cropRect']?['top'] ?? 0,
map['cropRect']?['right'] ?? 0,
map['cropRect']?['bottom'] ?? 0,
),
originalSize: Size(
map['originalSize']?['width'] ?? 0,
map['originalSize']?['height'] ?? 0,
),
cropEditorScreenRatio: map['cropEditorScreenRatio'] ?? 0,
scaleUser: map['scaleUser'] ?? 1,
scaleRotation: map['scaleRotation'] ?? 1,
aspectRatio: map['aspectRatio'] ?? -1,
flipX: map['flipX'] ?? false,
flipY: map['flipY'] ?? false,
offset: Offset(
map['offset']?['dx'] ?? 0,
map['offset']?['dy'] ?? 0,
),
);
}