$UikMyAgentPropsFromJson function
Implementation
UikMyAgentProps $UikMyAgentPropsFromJson(Map<String, dynamic> json) {
final UikMyAgentProps uikMyAgentProps = UikMyAgentProps();
final String? id = jsonConvert.convert<String>(json['id']);
if (id != null) {
uikMyAgentProps.id = id;
}
final Map<String, dynamic>? scrollProductsPropsJson = json['scrollProductsProps'];
if (scrollProductsPropsJson != null) {
uikMyAgentProps.scrollProductsProps =
UikScrollProductsProps.fromJson(scrollProductsPropsJson);
}
final UikTextProps containerText =
jsonConvert.convert<UikTextProps>(json['containerText']) ?? UikTextProps(); // Provide a default value
uikMyAgentProps.containerText = containerText;
final UikButtonProps buttonText =
jsonConvert.convert<UikButtonProps>(json['buttonText']) ?? UikButtonProps(); // Provide a default value
uikMyAgentProps.buttonText = buttonText;
final UikButtonProps buttonText2 =
jsonConvert.convert<UikButtonProps>(json['buttonText2']) ?? UikButtonProps(); // Provide a default value
uikMyAgentProps.buttonText2 = buttonText2;
final String? bgcolor = jsonConvert.convert<String>(json['bgcolor']);
if (bgcolor != null) {
uikMyAgentProps.bgcolor = bgcolor.toColor();
}
final double? width = jsonConvert.convert<double>(json['width']);
if (width != null) {
uikMyAgentProps.width = width;
}
final double? height = jsonConvert.convert<double>(json['height']);
if (height != null) {
uikMyAgentProps.height = height;
}
return uikMyAgentProps;
}