MethodChannelFlutterMagento class

An implementation of FlutterMagentoPlatform that uses method channels.

This implementation provides the default platform-specific behavior for the Flutter Magento plugin using Flutter's method channel communication. It handles communication between Dart code and native platform implementations.

Inheritance

Properties

customerToken String?
Get current customer token.
no setteroverride
error String?
Get current error message.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
isAuthenticated bool
Check if customer is authenticated.
no setteroverride
methodChannel MethodChannel
The method channel used to interact with the native platform.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addToCart(String sku, int quantity, [Map<String, dynamic>? productOption]) Future<bool>
Add item to cart.
override
addToWishlist(String sku) Future<bool>
Add product to wishlist.
override
authenticateCustomer({required String email, required String password}) Future<bool>
Authenticate customer with email and password.
override
clearError() → void
Clear current error.
override
createCustomer({required String email, required String password, required String firstName, required String lastName}) Future<Map<String, dynamic>?>
Create a new customer account.
override
getCart() Future<Map<String, dynamic>?>
Get cart information.
override
getCurrentCustomer() Future<Map<String, dynamic>?>
Get current customer information.
override
getCustomerOrders() Future<List<Map<String, dynamic>>?>
Get customer orders.
override
getOrder(String orderId) Future<Map<String, dynamic>?>
Get order by ID.
override
getPlatformVersion() Future<String?>
Get platform version.
override
getProduct(String sku) Future<Map<String, dynamic>?>
Get product by SKU.
override
getProducts({int page = 1, int pageSize = 20, String? searchQuery, String? categoryId, String? sortBy, String? sortOrder, Map<String, dynamic>? filters}) Future<Map<String, dynamic>?>
Get products with pagination and filters.
override
getWishlist() Future<Map<String, dynamic>?>
Get customer wishlist.
override
initialize({required String baseUrl, Map<String, String>? headers, int? connectionTimeout, int? receiveTimeout}) Future<bool>
Initialize the Magento plugin with base URL and configuration.
override
logout() Future<void>
Logout customer.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeFromCart(String itemId) Future<bool>
Remove item from cart.
override
removeFromWishlist(String itemId) Future<bool>
Remove product from wishlist.
override
toString() String
A string representation of this object.
inherited
updateCartItem(String itemId, int quantity) Future<bool>
Update cart item quantity.
override

Operators

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