findProductDetails static method
Finds the ProductDetails
for the given product ID.
Returns null if not found.
Implementation
static ProductDetails? findProductDetails(String id) =>
products.firstWhereOrNull((item) => item.id == id);
Finds the ProductDetails
for the given product ID.
Returns null if not found.
static ProductDetails? findProductDetails(String id) =>
products.firstWhereOrNull((item) => item.id == id);