Add API Server (Go/PocketBase), Web App (Go BFF + Vue), Fly App (Flutter/DJI MSDK), Adobe Plugin, and Docker/Docker AIO deployment configs. Design assets and build artifacts are gitignored. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
33 lines
916 B
Dart
33 lines
916 B
Dart
import 'package:flutter/foundation.dart';
|
|
|
|
import 'uploader.dart';
|
|
|
|
enum RegistrationState { idle, registering, success, failed }
|
|
|
|
/// Live aircraft/session state, shared by the Go Fly launch screen and the
|
|
/// Flight Control overlay. [_HomePageState] owns the DJI/uploader plumbing and
|
|
/// pushes updates here; the screens observe it via [AnimatedBuilder].
|
|
class FlightModel extends ChangeNotifier {
|
|
String sdkVersion = '…';
|
|
RegistrationState registration = RegistrationState.idle;
|
|
String? registrationError;
|
|
|
|
bool connected = false;
|
|
String? model;
|
|
|
|
int? satellites;
|
|
bool? isFlying;
|
|
String? flightMode;
|
|
double? altitude;
|
|
double? latitude;
|
|
double? longitude;
|
|
int? batteryPercent;
|
|
|
|
UploadStatus upload = UploadStatus.disabled;
|
|
|
|
bool get registered => registration == RegistrationState.success;
|
|
|
|
/// Notify observers after a batch of field writes.
|
|
void bump() => notifyListeners();
|
|
}
|