addReply method

  1. @override
Future<Either<AppException, Response>> addReply(
  1. Map<String, dynamic> data,
  2. List<File> file
)
override

Implementation

@override
Future<Either<AppException, response.Response>> addReply(data, file) async {
  try {
    final eitherType = await networkService
        .postFileUpload('ticket_reply/create', data: data, files: file);
    return eitherType.fold(
      (exception) {
        return Left(exception);
      },
      (response) {
        return Right(response);
      },
    );
  } catch (e) {
    return Left(
      AppException(
        message: 'Unknown error occured',
        statusCode: 1,
        identifier: '${e.toString()}\nLoginUserRemoteDataSource.loginUser',
      ),
    );
  }
}