$UikTextChipListPropsFromJson function

UikTextChipListProps $UikTextChipListPropsFromJson(
  1. Map<String, dynamic> json
)

Implementation

UikTextChipListProps $UikTextChipListPropsFromJson(Map<String, dynamic> json) {
  print(json);
  final UikTextChipListProps uikTextChipListProps = UikTextChipListProps();

  final String? id = jsonConvert.convert<String>(json['id']);

  final List<dynamic>? children =
      jsonConvert.convert<List<dynamic>>(json["children"]);

  if (id != null) {
    uikTextChipListProps.id = id;
  }

  if (children != null) {
    print(children);

    for (var i = 0; i < children.length; i++) {
      uikTextChipListProps.children.add(UikTextChip(
          WidgetType.UikText, UikTextChipProps.fromJson(children[i])));
    }
  }

  return uikTextChipListProps;
}