getPerformanceReport method

Future<Either<ApiError, List<String>>> getPerformanceReport(
  1. ApiBase api,
  2. FlutterSecureStorage storage
)

Implementation

Future<Either<ApiError, List<String>>> getPerformanceReport(
    ApiBase api, FlutterSecureStorage storage) async {
  print("GET PERFORMANCE ID");
  final jsonString = await storage.read(key: "requestID");

  if (jsonString == null) {
    print("CEST NULL");
    return Left(ApiError(
        httpErrorCode: 400, apiStatusCode: "Unknown Performance ID"));
  }
  final List<dynamic> jsonList = jsonDecode(jsonString);
  final ids = jsonList.cast<String>();
  print("IDDD : $ids");
  return Right(ids);
}