FlutterMagentoPlatform class abstract

Platform interface for the Flutter Magento plugin.

This abstract class defines the interface that platform-specific implementations must follow to provide Magento e-commerce functionality across different platforms.

The interface includes methods for:

  • Authentication and customer management
  • Product catalog operations
  • Shopping cart management
  • Order processing
  • Wishlist functionality
Inheritance
  • Object
  • PlatformInterface
  • FlutterMagentoPlatform
Implementers

Constructors

FlutterMagentoPlatform.new()
Constructs a FlutterMagentoPlatform.

Properties

customerToken String?
Get current customer token.
no setter
error String?
Get current error message.
no setter
hashCode int
The hash code for this object.
no setterinherited
isAuthenticated bool
Check if customer is authenticated.
no setter
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.
addToWishlist(String sku) Future<bool>
Add product to wishlist.
authenticateCustomer({required String email, required String password}) Future<bool>
Authenticate customer with email and password.
clearError() → void
Clear current error.
createCustomer({required String email, required String password, required String firstName, required String lastName}) Future<Map<String, dynamic>?>
Create a new customer account.
getCart() Future<Map<String, dynamic>?>
Get cart information.
getCurrentCustomer() Future<Map<String, dynamic>?>
Get current customer information.
getCustomerOrders() Future<List<Map<String, dynamic>>?>
Get customer orders.
getOrder(String orderId) Future<Map<String, dynamic>?>
Get order by ID.
getPlatformVersion() Future<String?>
Get platform version.
getProduct(String sku) Future<Map<String, dynamic>?>
Get product by SKU.
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.
getWishlist() Future<Map<String, dynamic>?>
Get customer wishlist.
initialize({required String baseUrl, Map<String, String>? headers, int? connectionTimeout, int? receiveTimeout}) Future<bool>
Initialize the Magento plugin with base URL and configuration.
logout() Future<void>
Logout customer.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeFromCart(String itemId) Future<bool>
Remove item from cart.
removeFromWishlist(String itemId) Future<bool>
Remove product from wishlist.
toString() String
A string representation of this object.
inherited
updateCartItem(String itemId, int quantity) Future<bool>
Update cart item quantity.

Operators

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

Static Properties

instance FlutterMagentoPlatform
The default instance of FlutterMagentoPlatform to use.
getter/setter pair