removeFromWishlist method

  1. @override
Future<bool> removeFromWishlist(
  1. String itemId
)
override

Remove product from wishlist.

Removes a product from the customer's wishlist. Requires customer authentication.

itemId the ID of the wishlist item to remove

Returns true if product was removed successfully, false otherwise.

Implementation

@override
Future<bool> removeFromWishlist(String itemId) async {
  try {
    final result = await methodChannel.invokeMethod<bool>(
      'removeFromWishlist',
      {'itemId': itemId},
    );
    return result ?? false;
  } catch (e) {
    _error = e.toString();
    return false;
  }
}