Retire the classic flight screen and stop the start-up location grant being dropped

MainActivity now makes the app's only start-up permission request and tells
Dart when it finishes; the phone-location stream waits for that instead of
asking in parallel, which made Android drop the location grant.

The P3 simulator run passed, so the pre-P2 FlightControlPage, the pages only
it used and its Settings toggle are gone. The app smoke test checks the home
screen again instead of the login gate removed in July.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
tajniak81andClaude Opus 5.5 committed 2026-10-21 20:36:17 +02:00
1 parent 63acacced7
commit 2db557a3b4
11 files changed
+50 -1088

No files matched your search

+8 -4
View File
@@ -1,13 +1,17 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:pilotvault_fly/main.dart';
void main() {
testWidgets('Shows the login screen when signed out',
(WidgetTester tester) async {
testWidgets('Opens on the home screen with no aircraft connected', (WidgetTester tester) async {
SharedPreferences.setMockInitialValues(<String, Object>{});
await tester.pumpWidget(const DjiSampleApp());
await tester.pump();
expect(find.text('Sign in'), findsWidgets);
expect(find.text('Sign in to continue'), findsOneWidget);
expect(find.text('No aircraft connected'), findsOneWidget);
expect(find.text('Connect aircraft'), findsOneWidget);
expect(find.byType(MaterialApp), findsOneWidget);
});
}