getUserByEmail method

Future<UserRecord> getUserByEmail(
  1. String email
)

Looks up the user identified by the provided email and returns a future that is fulfilled with a user record for the given user if that user is found.

Implementation

Future<UserRecord> getUserByEmail(String email) async {
  var response = await _authRequestHandler.getAccountInfoByEmail(email);
  // Returns the user record populated with server response.
  return UserRecord.fromJson(response['users'][0]);
}