CutoutConfig.fromJson constructor

CutoutConfig.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory CutoutConfig.fromJson(Map<String, dynamic> json) => CutoutConfig(
    alignment: cutoutConfigAlignmentValues.map[json["alignment"]],
    animation: cutoutConfigAnimationValues.map[json["animation"]],
    cornerRadius: json["cornerRadius"],
    cropOffset: json["cropOffset"] == null ? null : Offset.fromJson(json["cropOffset"]),
    cropPadding: json["cropPadding"] == null ? null : NonNegativeOffset.fromJson(json["cropPadding"]),
    feedbackStrokeColor: json["feedbackStrokeColor"],
    maxHeightPercent: json["maxHeightPercent"],
    maxWidthPercent: json["maxWidthPercent"],
    offset: json["offset"] == null ? null : Offset.fromJson(json["offset"]),
    outerAlpha: json["outerAlpha"]?.toDouble(),
    outerColor: json["outerColor"],
    ratioFromSize: json["ratioFromSize"] == null ? null : RatioFromSize.fromJson(json["ratioFromSize"]),
    strokeColor: json["strokeColor"],
    strokeWidth: json["strokeWidth"],
    width: json["width"],
);