login method

Future<Either<BaseException, AuthProfileModel>> login(
  1. String userName,
  2. String password
)

Implementation

Future<Either<BaseException, AuthProfileModel>> login(String userName, String password) {
  return post(
    AuthUrls.login,
    body: {
      'userName': userName,
      'password': password,
    },
    mapper: (json) => AuthProfileModel.fromMap(json),
  );
}