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