logout method

  1. @override
Future<void> logout()
override

Logout customer.

Logs out the currently authenticated customer and clears their session. This invalidates the customer token and removes any stored authentication data.

Implementation

@override
Future<void> logout() async {
  try {
    await methodChannel.invokeMethod('logout');
    _customerToken = null;
  } catch (e) {
    _error = e.toString();
  }
}