$UikImagePropsFromJson function
Implementation
UikImageProps $UikImagePropsFromJson(Map<String, dynamic> json) {
final UikImageProps uikImageProps = UikImageProps();
final String? id = jsonConvert.convert<String>(json['id']);
if (id != null) {
uikImageProps.id = id;
}
final double? width = jsonConvert.convert<double>(json['width']);
if (width != null) {
uikImageProps.width = width.toDouble();
}
final double? height = jsonConvert.convert<double>(json['height']);
if (height != null) {
uikImageProps.height = height.toDouble();
}
final double? topMargin = jsonConvert.convert<double>(json['topMargin']);
if (topMargin != null) {
uikImageProps.topMargin = topMargin.toDouble();
}
final double? leftMargin = jsonConvert.convert<double>(json['leftMargin']);
if (leftMargin != null) {
uikImageProps.leftMargin = leftMargin.toDouble();
}
final double? rightMargin = jsonConvert.convert<double>(json['rightMargin']);
if (rightMargin != null) {
uikImageProps.rightMargin = rightMargin.toDouble();
}
final double? bottomMargin =
jsonConvert.convert<double>(json['bottomMargin']);
if (bottomMargin != null) {
uikImageProps.bottomMargin = bottomMargin.toDouble();
}
final double? topLeftRadius =
jsonConvert.convert<double>(json['topLeftRadius']);
if (topLeftRadius != null) {
uikImageProps.topLeftRadius = topLeftRadius.toDouble();
}
final double? topRightRadius =
jsonConvert.convert<double>(json['topRightRadius']);
if (topRightRadius != null) {
uikImageProps.topRightRadius = topRightRadius.toDouble();
}
final double? bottomLeftRadius =
jsonConvert.convert<double>(json['bottomLeftRadius']);
if (bottomLeftRadius != null) {
uikImageProps.bottomLeftRadius = bottomLeftRadius.toDouble();
}
final double? bottomRightRadius =
jsonConvert.convert<double>(json['bottomRightRadius']);
if (bottomRightRadius != null) {
uikImageProps.bottomRightRadius = bottomRightRadius.toDouble();
}
final String? url = jsonConvert.convert<String>(json['url']);
if (url != null) {
uikImageProps.url = url;
}
final UikAction? action = jsonConvert.convert<UikAction>(json['action']);
if (action != null) {
uikImageProps.action = action;
}
return uikImageProps;
}