me method

Future<Map<String, dynamic>> me()

Implementation

Future<Map<String, dynamic>> me() async {
  if (accessToken == null) {
    throw Unauthorized("Token not set!");
  }
  try {
    final response = await _dio.get("me?access_token=$accessToken");
    if (response.data["data"]["isLogined"]) {
      return response.data["data"];
    } else {
      throw Unauthorized();
    }
  } on DioException {
    throw BadResponseException();
  }
}