$UikChipsPropsFromJson function
Implementation
UikChipsProps $UikChipsPropsFromJson(Map<String, dynamic> json) {
final UikChipsProps uikChipsProps = UikChipsProps();
final String? id = jsonConvert.convert<String>(json['id']);
if (id != null) {
uikChipsProps.id = id;
}
final String? text = jsonConvert.convert<String>(json['text']);
if (text != null) {
uikChipsProps.text = text;
}
final String? deleteIcon = jsonConvert.convert<String>(json['deleteIcon']);
if (deleteIcon != null) {
uikChipsProps.deleteIcon =
UikIcon(WidgetType.UikText, UikIconProps.fromJson(json['deleteIcon']));
}
final UikAction? action = jsonConvert.convert<UikAction>(json['action']);
if (action != null) {
uikChipsProps.action = action;
}
final String? avatar = jsonConvert.convert<String>(json['avatar']);
if (avatar != null) {
uikChipsProps.avatar =
UikAvatar(WidgetType.UikText, UikAvatarProps.fromJson(json['avatar']));
}
final double? padding = jsonConvert.convert<double>(json['padding']);
if (padding != null) {
uikChipsProps.padding = padding;
}
final String? backgroundColor =
jsonConvert.convert<String>(json['backgroundColor']);
if (backgroundColor != null) {
uikChipsProps.backgroundColor = backgroundColor.toColor();
}
return uikChipsProps;
}