Files
PilotVault/Fly Agent App/lib/services.dart
T
tajniak81andClaude Opus 5.5 3dd31b257a Add the Fly Agent App, a Remote ID companion to DJI Fly
A Flutter app that runs next to DJI Fly without the DJI SDK. It receives the
aircraft's Remote ID (Bluetooth, BT5, Wi-Fi NaN and Beacon) in a foreground
service, streams the paired aircraft to the hub over /ws/device, and turns
take-off to landing into a logbook entry filed through /api/flights, queued
when offline. Covers phases A0-A3 of the Fly Agent plan; needs no server change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 19:25:52 +02:00

33 lines
854 B
Dart

import 'package:flutter/widgets.dart';
import 'api/api.dart';
import 'pilot_location.dart';
import 'rid/rid_service.dart';
import 'session/session_controller.dart';
import 'uplink/uplink.dart';
/// The app's long-lived services, created once in `main()` and reached from
/// any widget with `Services.of(context)`.
class Services extends InheritedWidget {
const Services({
super.key,
required this.api,
required this.rid,
required this.pilot,
required this.uplink,
required this.sessions,
required super.child,
});
final Api api;
final RidService rid;
final PilotLocation pilot;
final Uplink uplink;
final SessionController sessions;
static Services of(BuildContext context) => context.dependOnInheritedWidgetOfExactType<Services>()!;
@override
bool updateShouldNotify(Services oldWidget) => false;
}