Add Flutter project skeleton (Android-only MVP)
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>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
62d655fe8e
commit
346fcc2183
@@ -0,0 +1,19 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Markenfarben, uebernommen aus dem HTML-Demonstrator
|
||||
/// ("Drone Mission Control.html"), damit Flutter-UI und Prototyp konsistent
|
||||
/// bleiben.
|
||||
abstract final class DmcColors {
|
||||
static const setBlue = Color(0xFF4D9DFF);
|
||||
static const setBlueLight = Color(0xFF8FD0FF);
|
||||
static const liveGreen = Color(0xFF3ECF8E);
|
||||
static const warnRed = Color(0xFFE2574A);
|
||||
static const pafAmber = Color(0xFFF0C86E);
|
||||
static const editModeGreen = Color(0xFF50C878);
|
||||
static const flyModeRed = Color(0xFFE2574A);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Fly-Modus: Telemetrie, Draeder, Point-and-Fly-Fadenkreuz
|
||||
/// (Architektur-Doku 3.10/3.11). Platzhalter bis Telemetry-Service und
|
||||
/// FlightControllerLink verdrahtet sind.
|
||||
class FlyScreen extends StatelessWidget {
|
||||
const FlyScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const Scaffold(
|
||||
body: Center(child: Text('Fly')),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Missionsuebersicht (Architektur-Doku 3.5/7.5): Suche nach Name/Ort/Datum
|
||||
/// ueber Drift, sobald AppDatabase verdrahtet ist.
|
||||
class LibraryScreen extends StatelessWidget {
|
||||
const LibraryScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: const Text('Missions')),
|
||||
body: const Center(child: Text('Library')),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Missionsplanung: Karte + Wegpunktliste (Architektur-Doku 3.6/3.7).
|
||||
/// Kartenintegration (flutter_map) und Fillet-Geometrie folgen als naechster
|
||||
/// Schritt - dies ist bewusst nur der Screen-Platzhalter.
|
||||
class PlanScreen extends StatelessWidget {
|
||||
const PlanScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const Scaffold(
|
||||
body: Center(child: Text('Plan')),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Drohnen-Profile: FC-Typ, Flugleistungsdaten, Standardprofil T1 Ranger
|
||||
/// (Architektur-Doku 3.5).
|
||||
class SettingsScreen extends StatelessWidget {
|
||||
const SettingsScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: const Text('Drone Profiles')),
|
||||
body: const Center(child: Text('Settings')),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user