$UikTabPropsFromJson function
Implementation
UikTabProps $UikTabPropsFromJson(Map<String, dynamic> json) {
final UikTabProps uikTabProps = UikTabProps();
final String? id = jsonConvert.convert<String>(json['id']);
if (id != null) {
uikTabProps.id = id;
}
final String? isBorder = jsonConvert.convert<String>(json['isBorder']);
if (isBorder != null) {
uikTabProps.isBorder = isBorder;
}
final String? indicatorColor =
jsonConvert.convert<String>(json['indicatorColor']);
if (indicatorColor != null) {
uikTabProps.indicatorColor = Color(int.parse(indicatorColor));
}
final String? labelColor = jsonConvert.convert<String>(json['labelColor']);
if (labelColor != null) {
uikTabProps.labelColor = Color(int.parse(labelColor));
}
final String? list = jsonConvert.convert<String>(json['list']);
if (list != null) {
uikTabProps.list = list.split(",");
}
final String? unselectedLabelColor =
jsonConvert.convert<String>(json['unselectedLabelColor']);
if (unselectedLabelColor != null) {
uikTabProps.unselectedLabelColor = Color(int.parse(unselectedLabelColor));
}
final double? borderRadius =
jsonConvert.convert<double>(json['borderRadius']);
if (borderRadius != null) {
uikTabProps.borderRadius = borderRadius;
}
final double? onlyTopBorderRadius =
jsonConvert.convert<double>(json['onlyTopBorderRadius']);
if (onlyTopBorderRadius != null) {
uikTabProps.onlyTopBorderRadius = onlyTopBorderRadius;
}
final double? gapBetweenTabs =
jsonConvert.convert<double>(json['gapBetweenTabs']);
if (gapBetweenTabs != null) {
uikTabProps.gapBetweenTabs = gapBetweenTabs;
}
final UikAction? action = jsonConvert.convert<UikAction>(json['action']);
if (action != null) {
uikTabProps.action = action;
}
return uikTabProps;
}