fromJson static method
Implementation
static AreaPosition? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return AreaPosition(
xPercentage: (json['x_percentage'] as num?)?.toDouble() ?? 0.0,
yPercentage: (json['y_percentage'] as num?)?.toDouble() ?? 0.0,
widthPercentage: (json['width_percentage'] as num?)?.toDouble() ?? 0.0,
heightPercentage: (json['height_percentage'] as num?)?.toDouble() ?? 0.0,
rotationAngle: (json['rotation_angle'] as num?)?.toDouble() ?? 0.0,
cornerRadiusPercentage:
(json['corner_radius_percentage'] as num?)?.toDouble() ?? 0.0,
);
}