addToWishlist method
Add product to wishlist.
Adds a product to the customer's wishlist. Requires customer authentication.
sku
the product's SKU to add to wishlist
Returns true
if product was added successfully, false
otherwise.
Implementation
@override
Future<bool> addToWishlist(String sku) async {
try {
final result = await methodChannel.invokeMethod<bool>('addToWishlist', {
'sku': sku,
});
return result ?? false;
} catch (e) {
_error = e.toString();
return false;
}
}