virusis_api_client_ng
Dart and Flutter API client SDK generated from the Virusis backend OpenAPI specification.
This package is the Flutter/Dart companion release for:
@virusis/api-client@0.1.20
Use the same version number in web and mobile projects when you want both clients to target the same generated API surface.
Installation
Add the package to your Flutter app:
dependencies:
virusis_api_client_ng: 0.1.20
Then run:
flutter pub get
Import
import 'package:virusis_api_client_ng/virusis_api_client_ng.dart';
Basic Usage
import 'package:virusis_api_client_ng/virusis_api_client_ng.dart';
final client = VirusisApiClient(
basePathOverride: 'https://api.example.com',
);
client.setApiKey('Bearer', 'Bearer $accessToken');
final authApi = client.getAuthApi();
final scansApi = client.getScansApi();
Keep API setup in one app-level service so base URL and authentication are not duplicated across screens.
Version Alignment
| Platform | Package | Version |
|---|---|---|
| Web/Node/TypeScript | @virusis/api-client |
0.1.20 |
| Flutter/Dart | virusis_api_client_ng |
0.1.20 |
Regeneration
From the repository root:
PUB_NAME=virusis_api_client_ng PUB_VERSION=0.1.20 SPEC_URL="http://localhost:5000/swagger/v1/swagger.json" npm run gen:flutter
Before publishing:
cd out/flutter
dart pub get
dart run build_runner build --delete-conflicting-outputs
dart analyze
dart pub publish --dry-run