findAssetDetail method

  1. @override
Future<Either<AppException, Response>> findAssetDetail({
  1. required Map<String, dynamic> user,
})
override

Implementation

@override
Future<Either<AppException, response.Response>> findAssetDetail(
    {required Map<String, dynamic> user}) async {
  try {
    final eitherType =
        await networkService.get('search_asset_data', queryParameters: user);
    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',
      ),
    );
  }
}