V3-04: live map on the recording screen
Feeds RideMap from watchPointsForTrip/watchSegmentsForTrip via autoDispose.family providers. RecordingEngine stays map-free (enforced by architecture_test.dart). RideMap gained lifecycle-aware tile teardown and follow-mode, both shared with the trip-detail map.
This commit is contained in:
15
test/architecture_test.dart
Normal file
15
test/architecture_test.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
/// A structural invariant from V3-04, checked directly rather than trusted: rendering
|
||||
/// belongs to a visible screen's widget lifecycle, never to the recording engine. If this
|
||||
/// ever starts failing, a map reference has leaked into code that keeps running while the
|
||||
/// phone is pocketed and the screen is off.
|
||||
void main() {
|
||||
test('RecordingEngine never imports the map', () {
|
||||
final source = File('lib/src/recording/recording_engine.dart').readAsStringSync();
|
||||
expect(source.contains('ride_map'), isFalse);
|
||||
expect(source.contains('flutter_map'), isFalse);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user