load products
This commit is contained in:
@@ -24,11 +24,14 @@ class Product {
|
||||
/// Product images (URLs)
|
||||
final List<String> images;
|
||||
|
||||
/// Thumbnail image URL
|
||||
final String? thumbnail;
|
||||
|
||||
/// Image captions
|
||||
final Map<String, String> imageCaptions;
|
||||
|
||||
/// 360-degree view link
|
||||
final String? link360;
|
||||
/// Custom 360-degree view link
|
||||
final String? customLink360;
|
||||
|
||||
/// Product specifications
|
||||
final Map<String, dynamic> specifications;
|
||||
@@ -63,8 +66,9 @@ class Product {
|
||||
this.description,
|
||||
required this.basePrice,
|
||||
required this.images,
|
||||
this.thumbnail,
|
||||
required this.imageCaptions,
|
||||
this.link360,
|
||||
this.customLink360,
|
||||
required this.specifications,
|
||||
this.category,
|
||||
this.brand,
|
||||
@@ -86,7 +90,7 @@ class Product {
|
||||
String? get categoryId => category;
|
||||
|
||||
/// Check if product has 360 view
|
||||
bool get has360View => link360 != null && link360!.isNotEmpty;
|
||||
bool get has360View => customLink360 != null && customLink360!.isNotEmpty;
|
||||
|
||||
/// Check if product has multiple images
|
||||
bool get hasMultipleImages => images.length > 1;
|
||||
@@ -123,8 +127,9 @@ class Product {
|
||||
String? description,
|
||||
double? basePrice,
|
||||
List<String>? images,
|
||||
String? thumbnail,
|
||||
Map<String, String>? imageCaptions,
|
||||
String? link360,
|
||||
String? customLink360,
|
||||
Map<String, dynamic>? specifications,
|
||||
String? category,
|
||||
String? brand,
|
||||
@@ -141,8 +146,9 @@ class Product {
|
||||
description: description ?? this.description,
|
||||
basePrice: basePrice ?? this.basePrice,
|
||||
images: images ?? this.images,
|
||||
thumbnail: thumbnail ?? this.thumbnail,
|
||||
imageCaptions: imageCaptions ?? this.imageCaptions,
|
||||
link360: link360 ?? this.link360,
|
||||
customLink360: customLink360 ?? this.customLink360,
|
||||
specifications: specifications ?? this.specifications,
|
||||
category: category ?? this.category,
|
||||
brand: brand ?? this.brand,
|
||||
|
||||
Reference in New Issue
Block a user