authenticateCustomer method
Authenticate customer with email and password.
Implementation
@override
Future<bool> authenticateCustomer({
required String email,
required String password,
}) async {
try {
final result = await methodChannel.invokeMethod<bool>('authenticateCustomer', {
'email': email,
'password': password,
});
if (result == true) {
// Get token after successful authentication
_customerToken = await methodChannel.invokeMethod<String>('getCustomerToken');
}
return result ?? false;
} catch (e) {
_error = e.toString();
return false;
}
}