2026-10-01 19:56:29 +02:00
|
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
|
|
|
import 'package:halkyon_learn_flutter/src/feature/geo_map/data/geo_map_repository.dart';
|
|
|
|
|
|
|
|
|
|
/// The bundled maps, read already: reading an asset is real input, which a
|
|
|
|
|
/// widget test's fake clock never lets finish, so it happens outside it and
|
|
|
|
|
/// the app gets this repository (`testDependencies(maps: ...)`).
|
|
|
|
|
Future<GeoMapRepository> loadedMaps(WidgetTester tester) async {
|
|
|
|
|
final maps = GeoMapRepository();
|
|
|
|
|
await tester.runAsync(() async {
|
feat(map): one map, Japan's prefectures within Japan
A map question is picked on one map: the world's countries in layers
(Europe, East Asia, ...), and within Japan its prefectures, in layers too
(Kantō, Kansai, ...); Back goes up one. The composer's choice between two
maps is gone. A card still names the map its answer is a region of
(`japan`, `world`), as versions up to v0.11.0 did, so they still show it.
In the composer a tap on Japan picks the country, and the "Prefectures"
chip opens its prefectures. Studying, the card decides: a prefecture's
question opens Japan at a tap, a country's picks it.
The map opens on the deepest layer the map questions share (studying, the
round's; writing, the studyset's): Japan for prefectures all over it,
Kantō for Tokyo and Chiba, Europe for European countries.
A tap no longer zooms in when it could mean several regions: it picks the
ring it is on (the nearest of several), else the region under it, else the
nearest ring or outline within reach. Zooming is pinching, or Ctrl (⌘ on a
Mac) and the wheel, as maps on web pages do; the wheel alone scrolls the
page, and a note over the map says how to zoom.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MMm7usAo6q9ZZRoPkWjoxi
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-10-12 12:19:03 +02:00
|
|
|
await maps.atlas();
|
2026-10-01 19:56:29 +02:00
|
|
|
});
|
|
|
|
|
return maps;
|
|
|
|
|
}
|