makeGetRequest method

TaskEither<String, Response<List>> makeGetRequest(
  1. String path,
  2. {Map<String, dynamic>? data}
)

Implementation

TaskEither<String, Response<List<dynamic>>> makeGetRequest(
  String path, {
  Map<String, dynamic>? data,
}) =>
    TaskEither<String, Response<List<dynamic>>>.tryCatch(
      data == null
          ? () async => dio.get(
                path,
              )
          : () async => dio.get(
                path,
                data: data,
              ),
      (Object error, StackTrace stackTrace) => error.toString(),
    );