Five-layer architecture per DMC_Architektur_und_Design.md: FlightControllerLink abstraction (Mock + MSP stub), protocol-neutral mission domain layer, App-Mode state machine with Ready-to-Fly gate, Drift persistence schema, and placeholder UI screens wired via go_router. App icon generated from design/Y2_pink_dark.svg. Verified with flutter analyze and flutter test. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
20 lines
688 B
Dart
20 lines
688 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
|
|
import '../app_mode/app_mode_cubit.dart';
|
|
import 'screens/fly/fly_screen.dart';
|
|
import 'screens/plan/plan_screen.dart';
|
|
|
|
/// Schaltet zwischen Plan- und Fly-Screen um, gesteuert von der
|
|
/// App-Mode State Machine (Architektur-Doku 2.2). Connect/Upload sind
|
|
/// Uebergangszustaende innerhalb des Plan-Screens (Handover-Prozess).
|
|
class AppShell extends StatelessWidget {
|
|
const AppShell({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final mode = context.select((AppModeCubit c) => c.state.mode);
|
|
return mode == AppMode.fly ? const FlyScreen() : const PlanScreen();
|
|
}
|
|
}
|