$UikTopBarPropsFromJson function
Implementation
UikTopBarProps $UikTopBarPropsFromJson(Map<String, dynamic> json) {
final UikTopBarProps uikTopBarProps = UikTopBarProps();
final String? id = jsonConvert.convert<String>(json['id']);
final double? leftPadding = jsonConvert.convert<double>(json["leftPadding"]);
final double? rightPadding =
jsonConvert.convert<double>(json["rightPadding"]);
final double? topPadding = jsonConvert.convert<double>(json["topPadding"]);
final double? bottomPadding =
jsonConvert.convert<double>(json["bottomPadding"]);
final String? icon = jsonConvert.convert<String>(json["icon"]);
final String? text = jsonConvert.convert<String>(json["text"]);
if (id != null) {
uikTopBarProps.id = id;
}
if (leftPadding != null) {
uikTopBarProps.leftPadding = leftPadding;
}
if (rightPadding != null) {
uikTopBarProps.rightPadding = rightPadding;
}
if (topPadding != null) {
uikTopBarProps.topPadding = topPadding;
}
if (bottomPadding != null) {
uikTopBarProps.bottomPadding = bottomPadding;
}
if (icon != null) {
uikTopBarProps.icon =
UikIcon(WidgetType.UikText, UikIconProps.fromJson(json["icon"]));
}
if (text != null) {
uikTopBarProps.text =
UikText(WidgetType.UikText, UikTextProps.fromJson(json['text']));
}
return uikTopBarProps;
}