- Lock orientation to landscape (sensorLandscape in the manifest, SystemChrome.setPreferredOrientations in main.dart) and enable immersive fullscreen, matching the prototype's full-bleed map UI (doc 7.7). - Add MissionMap widget: flutter_map + standard OSM raster tiles, same default center/zoom as the HTML prototype (Amsterdam, zoom 16), OSM attribution bottom-left. PlanScreen now renders it full-screen instead of the placeholder text. - Add the release-manifest INTERNET permission (previously only present in the debug manifest, which would have silently broken tile loading and any future network calls in release builds). - Update the smoke test to check for the FlutterMap widget instead of the removed placeholder text. Verified with flutter analyze, flutter test, and a real run on the Pixel_10a emulator (fullscreen landscape confirmed, tiles loading). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
27 lines
859 B
Dart
27 lines
859 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
import 'package:flutter_map/flutter_map.dart';
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
|
|
import 'package:dmc_app/app_mode/app_mode_cubit.dart';
|
|
import 'package:dmc_app/ui/app_shell.dart';
|
|
|
|
void main() {
|
|
testWidgets('AppShell zeigt die Karte im Plan-Startzustand', (tester) async {
|
|
await tester.pumpWidget(
|
|
ProviderScope(
|
|
child: BlocProvider(
|
|
create: (_) => AppModeCubit(),
|
|
child: const MaterialApp(home: AppShell()),
|
|
),
|
|
),
|
|
);
|
|
// Nur ein Frame pumpen statt pumpAndSettle: TileLayer laedt echte
|
|
// Netzwerk-Kacheln, die in der Testumgebung nie ankommen.
|
|
await tester.pump();
|
|
|
|
expect(find.byType(FlutterMap), findsOneWidget);
|
|
});
|
|
}
|