$UikProfilePropsFromJson function
Implementation
UikProfileProps $UikProfilePropsFromJson(Map<String, dynamic> json) {
final UikProfileProps uikProfileProps = UikProfileProps();
final String? id = jsonConvert.convert<String>(json['id']);
if (id != null) {
uikProfileProps.id = id;
}
final String? circularAvatar =
jsonConvert.convert<String>(json['circularAvatar']);
if (circularAvatar != null) {
uikProfileProps.circularAvatar = UikAvatar(
WidgetType.UikText, UikAvatarProps.fromJson(json['circularAvatar']));
}
final String? title = jsonConvert.convert<String>(json['title']);
if (title != null) {
uikProfileProps.title =
UikText(WidgetType.UikText, UikTextProps.fromJson(json['title']));
}
final String? subtitle = jsonConvert.convert<String>(json['subtitle']);
if (subtitle != null) {
uikProfileProps.subtitle =
UikText(WidgetType.UikText, UikTextProps.fromJson(json['subtitle']));
}
final double? leftMargin = jsonConvert.convert<double>(json['leftMargin']);
if (leftMargin != null) {
uikProfileProps.leftMargin = leftMargin;
}
final double? topMargin = jsonConvert.convert<double>(json['topMargin']);
if (topMargin != null) {
uikProfileProps.topMargin = topMargin;
}
final double? rightMargin = jsonConvert.convert<double>(json['rightMargin']);
if (rightMargin != null) {
uikProfileProps.rightMargin = rightMargin;
}
final double? bottomMargin =
jsonConvert.convert<double>(json['bottomMargin']);
if (bottomMargin != null) {
uikProfileProps.bottomMargin = bottomMargin;
}
final UikAction? action = jsonConvert.convert<UikAction>(json['action']);
if (action != null) {
uikProfileProps.action = action;
}
return uikProfileProps;
}