Documentation Index
Fetch the complete documentation index at: https://docs.law4devs.eu/llms.txt
Use this file to discover all available pages before exploring further.
Requirements
- Dart SDK >=3.0.0
- Works on Flutter (mobile, web, desktop) and Dart CLI
Install
Add to your pubspec.yaml:
dependencies:
law4devs: ^1.0.0
Then run:
Or for Flutter projects:
First Call
import 'package:law4devs/law4devs.dart';
final client = Law4DevsClient(
apiKey: Platform.environment['LAW4DEVS_API_KEY'],
);
final page = await client.frameworks.list();
print(page.data.first.name); // e.g. "Cyber Resilience Act"
Configuration
final client = Law4DevsClient(
apiKey: Platform.environment['LAW4DEVS_API_KEY'],
baseUrl: 'https://api.law4devs.eu/v1', // default
timeout: const Duration(seconds: 30), // default
maxRetries: 3, // retries on 429/5xx
);
| Option | Type | Default | Description |
|---|
apiKey | String? | null | Your API key (required for authenticated endpoints) |
baseUrl | String | Production URL | Override for dev/staging environment |
timeout | Duration | Duration(seconds: 30) | Per-request HTTP timeout |
maxRetries | int | 3 | Retries on 429/5xx responses |
Environment Variable
export LAW4DEVS_API_KEY="your-key"
final client = Law4DevsClient(
apiKey: Platform.environment['LAW4DEVS_API_KEY'],
);
Never hardcode your API key in source code or commit it to version control.
Verify the Install
// verify_install.dart
import 'package:law4devs/law4devs.dart';
import 'dart:io';
void main() async {
final client = Law4DevsClient(
apiKey: Platform.environment['LAW4DEVS_API_KEY'],
);
final page = await client.frameworks.list();
print('${page.meta.total} frameworks');
}
LAW4DEVS_API_KEY=your-key dart run verify_install.dart
# → 19 frameworks