Nexora SDK

Nexora SDK is a powerful, beginner-friendly, cross-platform Flutter plugin that provides a single, unified Dart API for advanced hardware features.
With Nexora SDK, you can easily implement:
- πΈ Smart Camera Preview (with built-in QR/Barcode & Face scanning)
- ποΈ Audio Capture & Analysis (Real-time FFT spectrum data)
- π‘ Bluetooth LE (BLE) (Scanning, Connecting, and GATT Data reading/writing)
- π Location & Geofencing (Foreground and background tracking)
- π Device Health & Telemetry (Background sync of battery/network diagnostics)
- π Secure Storage (Hardware-backed AES encryption)
π Beginner Quick Start & Installation
Step 1: Add Dependency
Add nexora_sdk to your Flutter project's pubspec.yaml:
flutter pub add nexora_sdk
Step 2: Native Platform Configuration
Hardware features require explicit permissions declared in your native files.
π€ Android Setup
Open android/app/src/main/AndroidManifest.xml and add:
<!-- Camera & Audio -->
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<!-- Bluetooth -->
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<!-- Location -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
π iOS Setup
Open ios/Runner/Info.plist and add:
<key>NSCameraUsageDescription</key>
<string>This app requires camera access for preview and image scanning.</string>
<key>NSMicrophoneUsageDescription</key>
<string>This app requires microphone access for audio analysis.</string>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>This app requires Bluetooth access to connect to devices.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>This app requires location access for tracking.</string>
π Detailed Use Cases
1. Smart Camera & AI Vision πΈ
Easily start a camera preview and overlay UI elements on top of it. You can also enable AI vision modes to scan barcodes or detect faces in real-time.
final sdk = NexoraSdk.instance;
// 1. Request Permission
final granted = await sdk.requestCameraPermission();
if (!granted) return;
// 2. Start Camera (Returns a Texture ID to display in your UI)
final textureId = await sdk.camera.start(quality: CameraQuality.hd);
// 3. Enable Vision Processing
await sdk.setVisionMode(face: true, barcode: true);
// 4. Display in UI
if (textureId != null) {
return Texture(textureId: textureId);
}
Tip: Listen to sdk.eventsFor('camera') to receive bounding boxes for detected faces or string values for scanned QR codes!
2. Audio FFT Spectrum Visualizer ποΈ
Build beautiful audio visualizers or voice recorders using real-time FFT frequency data.
// 1. Request Permission
await sdk.requestAudioPermission();
// 2. Start Audio with FFT Analysis enabled (Updates every 80ms)
await sdk.startAudioWithAnalysis(updateIntervalMs: 80);
// 3. Listen to the stream
sdk.audio.stream.listen((AudioFrame frame) {
final spectrum = frame.spectrum; // Array of frequency magnitudes
// Use 'spectrum' data to draw UI bars or waves!
print('Loudest frequency magnitude: ${spectrum.reduce(math.max)}');
});
3. Bluetooth LE Scanner (BLE) π‘
Scan for nearby devices, connect to them, and read/write characteristic data instantly without dealing with complex native Bluetooth stacks.
// 1. Start scanning for devices
await sdk.bluetooth.startScan();
// 2. Listen for discovered devices
sdk.eventsFor('bluetooth').listen((event) {
if (event.type == 'device_discovered') {
final deviceName = event.data['name'];
final deviceId = event.data['id'];
print('Found device: $deviceName ($deviceId)');
}
});
// 3. Connect and Read Data
await sdk.connectDevice('device_id_here');
final data = await sdk.readData(
'device_id_here',
'service_uuid_here',
'characteristic_uuid_here'
);
print('Read bytes: $data');
4. Background Telemetry & Health π
Ideal for IoT or enterprise apps, log device health (battery drops, network changes) to a local file and sync it to your server automatically when WiFi is available.
// Start logging telemetry every 60 seconds
await sdk.health.startLogging('telemetry_log.csv', 60000);
// Enable Smart Sync to upload the log when it hits 1MB
await sdk.health.enableSmartSync(
uploadEndpointUrl: 'https://your-api.com/upload-telemetry',
rollLimitBytes: 1 * 1024 * 1024, // 1MB limit
requireWifi: true,
);
π Advanced Features (Pro)
- NFC Support: Read and write NDEF records instantly (
sdk.nfc.startNfcScan()). - Secure Storage: Store sensitive API keys in hardware-backed keystores (
sdk.secureStorage.writeSecureFile()). - Background Isolates: Offload heavy computations to a background thread to keep your UI running at 60 FPS (
BackgroundIsolateWrapper.compute()).
π Web & Desktop Support
Nexora SDK is designed to compile on all platforms.
Unlike many other plugins, Nexora actually provides native, fully-functional implementations for Web (via dart:js_interop and Browser APIs) and Desktop (via C++ and Swift).
Features like Camera, Audio FFT, Location, and Bluetooth LE work perfectly across Web, Windows, macOS, and Linux out-of-the-box! For any extremely platform-specific features (like NFC on Web), it gracefully returns NOT_SUPPORTED to ensure a single, crash-free codebase.
π License
This project is licensed under the MIT License - see the LICENSE file for details.
Libraries
- core/hardware_lifecycle
- ffi/nexora_ffi
- modules/audio/audio_module
- modules/biometric/biometric_module
- modules/bluetooth/bluetooth_module
- modules/camera/camera_module
- modules/connectivity/connectivity_module
- modules/device/device_module
- modules/feedback/feedback_module
- modules/health/health_module
- modules/location/location_module
- modules/native/native_module
- modules/nfc/nfc_module
- modules/permissions/permissions_module
- modules/sensor/sensor_module
- modules/storage/secure_storage_module
- modules/storage/storage_module
- modules/utility/utility_module
- nexora_sdk
- widgets/nexora_ar_view
- widgets/nexora_camera_preview