SearchResponseDoc class

Constructors

SearchResponseDoc({required Map<String, dynamic> fields})
Returns a new SearchResponseDoc instance.

Properties

availableFields List<String>
Get all available field names
no setter
brand String?
Product brand
no setter
description String?
Product description
no setter
fields Map<String, dynamic>
Dynamic fields map containing all product data returned by the API Structure depends on the fl parameter in the search request
final
group String?
Product group identifier
no setter
hashCode int
The hash code for this object.
no setteroverride
isLive bool?
Whether product is live/active
no setter
pid String?
Product ID - typically always requested as it's required in most fl parameters
no setter
price double?
Regular price
no setter
priceRange List<double>?
Price range min, max if available
no setter
promotions List<String>?
Product promotional messages
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
salePrice double?
Sale/discounted price
no setter
salePriceRange List<double>?
Sale price range min, max if available
no setter
score double?
Search relevance score
no setter
skuColorGroup String?
SKU color group
no setter
skuid String?
SKU ID for variant products
no setter
skuSwatchImages List<String>?
SKU swatch images
no setter
skuThumbImages List<String>?
SKU thumbnail images
no setter
thumbImage String?
Main product image thumbnail
no setter
title String?
Product title/name
no setter
url String?
Product URL/link
no setter
variants List?
Product variants (SKUs, colors, sizes, etc.) This is completely dynamic - could be List<Map<String,dynamic>> or any structure
no setter

Methods

getField<T>(String fieldName) → T?
Get a field value with proper type casting Returns null if field doesn't exist or type doesn't match
getFieldWithDefault<T>(String fieldName, T defaultValue) → T
Get field value with a default fallback
getRawField(String fieldName) → dynamic
Get raw field value without type checking
hasField(String fieldName) bool
Check if a field exists in the response
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

fromJson(dynamic value) SearchResponseDoc?
Returns a new SearchResponseDoc instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) List<SearchResponseDoc>
mapFromJson(dynamic json) Map<String, SearchResponseDoc>
mapListFromJson(dynamic json, {bool growable = false}) Map<String, List<SearchResponseDoc>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON. Since structure is dynamic, no keys are technically required