logIn method

Future<ParseUser> logIn ({@required String username, @required String password })

Logs in a user with a username and password. On success, this saves the session to disk, so you can retrieve the currently logged in user using currentUser.

Implementation

static Future<ParseUser> logIn(
    {@required String username, @required String password}) async {
  assert(username != null || username.isEmpty);
  assert(password != null || password.isEmpty);

  dynamic params = {'username': username, 'password': password};

  return FlutterParse._channel
      .invokeMethod('login', params)
      .then((jsonString) {
    return _parseResult(jsonString);
  });
}