$UikTabBarPropsFromJson function
Implementation
UikTabBarProps $UikTabBarPropsFromJson(Map<String, dynamic> json) {
final UikTabBarProps uikTabBarProps = UikTabBarProps();
final String? backgroundColor =
jsonConvert.convert<String>(json['backgroundColor']);
if (backgroundColor != null) {
uikTabBarProps.backgroundColor = Color(int.parse(backgroundColor));
}
final String? indicatorColor =
jsonConvert.convert<String>(json['indicatorColor']);
if (indicatorColor != null) {
uikTabBarProps.indicatorColor = Color(int.parse(indicatorColor));
}
// final double? iconSize = jsonConvert.convert<double>(json['iconSize']);
// if (iconSize != null) {
// uikTabBarProps.iconSize = iconSize;
// }
final double? topMargin = jsonConvert.convert<double>(json['topMargin']);
if (topMargin != null) {
uikTabBarProps.topMargin = topMargin;
}
final bool? isBorder = jsonConvert.convert<bool>(json['isBorder']);
if (isBorder != null) {
uikTabBarProps.isBorder = isBorder;
}
final List<dynamic>? ll = jsonConvert.convert<List<dynamic>>(json['ll']);
if (ll != null) {
for (int i = 0; i < ll.length; i++)
uikTabBarProps.ll
.add(UikIcon(WidgetType.UikText, UikIconProps.fromJson(ll[i])));
}
final String? id = jsonConvert.convert<String>(json['id']);
if (id != null) {
uikTabBarProps.id = id;
}
final String? text = jsonConvert.convert<String>(json['text']);
if (text != null) {
uikTabBarProps.text = text;
}
final UikAction? action = jsonConvert.convert<UikAction>(json['action']);
if (action != null) {
uikTabBarProps.action = action;
}
return uikTabBarProps;
}