getCart method
Get cart information.
Retrieves the current shopping cart contents and details. Works for both guest and authenticated customers.
Returns a map containing the cart data, or null
if failed.
Implementation
@override
Future<Map<String, dynamic>?> getCart() async {
try {
final result = await methodChannel.invokeMethod<Map<String, dynamic>>(
'getCart',
);
return result;
} catch (e) {
_error = e.toString();
return null;
}
}