MLVisionSearchProduct.fromMap constructor

MLVisionSearchProduct.fromMap(
  1. Map? map
)

Implementation

factory MLVisionSearchProduct.fromMap(Map<dynamic, dynamic>? map) {
  if (map == null) {
    return const MLVisionSearchProduct._();
  }
  final List<MLVisionSearchProductImage> images =
      <MLVisionSearchProductImage>[];
  if (map['imageList'] != null) {
    map['imageList'].forEach((dynamic v) {
      images.add(MLVisionSearchProductImage.fromMap(v));
    });
  }
  return MLVisionSearchProduct._(
    customContent: map['customContent'],
    productId: map['productId'],
    productUrl: map['productUrl'],
    imageList: images,
  );
}