PassioSearchResponse class
Represents the response from a food search API, containing search results and alternate names for the searched food item.
Constructors
-
PassioSearchResponse({required List<
PassioFoodDataInfo> results, required List<String> alternateNames}) -
Creates a new instance of
PassioSearchResponse
.const -
PassioSearchResponse.fromJson(Map<
String, dynamic> json) -
Creates a new instance of
PassioSearchResponse
from a JSON map.factory
Properties
-
alternateNames
→ List<
String> -
A list of possible alternative names for the searched food item.
final
- hashCode → int
-
Calculates the hash code for this
PassioSearchResponse
object.no setteroverride -
results
→ List<
PassioFoodDataInfo> -
A list of search results matching the query.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Converts the
PassioSearchResponse
object to a JSON map. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
Compares two
PassioSearchResponse
objects for equality.override