$UikListViewBuilderPropsFromJson function

UikListViewBuilderProps $UikListViewBuilderPropsFromJson(
  1. Map<String, dynamic> json
)

Implementation

UikListViewBuilderProps $UikListViewBuilderPropsFromJson(
    Map<String, dynamic> json) {
  final UikListViewBuilderProps uikListViewBuilderProps =
      UikListViewBuilderProps();

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

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

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

  // var en = JsonEncoder.withIndent("    ");
  // debugPrint(en.convert(children));
  uikListViewBuilderProps.children = [];
  if (children != null) {
    for (int i = 0; i < children.length; i++) {
      uikListViewBuilderProps.children.add(
        UikListTile(
            WidgetType.UikImage, UikListTileProps.fromJson(children[i])),
      );
    }
  }

  /* 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])));
  } */

  return uikListViewBuilderProps;
}