getCurrentCustomer method

  1. @override
Future<Map<String, dynamic>?> getCurrentCustomer()
override

Get current customer information.

Retrieves the profile information of the currently authenticated customer. Requires the customer to be logged in.

Returns a map containing the customer's profile data, or null if not authenticated.

Implementation

@override
Future<Map<String, dynamic>?> getCurrentCustomer() async {
  try {
    final result = await methodChannel.invokeMethod<Map<String, dynamic>>(
      'getCurrentCustomer',
    );
    return result;
  } catch (e) {
    _error = e.toString();
    return null;
  }
}