feat(todo): pick a place on a map, for quick add and a task's Where (ADR 0033, D32)

The location picker searches by city or district and name through
PlaceSearchGateway, its results a list and pins on Train's OpenFreeMap map,
or takes a pin placed by hand; recent places, and None, Arrive or Leave.
TodoDependencies.places is the seam for the instance's search; until then
komoot's public Photon, in a debug build asked for it alone. Quick add has
`+` suggestions, an entry in its + menu and a pin button; the task sheet a
Where box; a task's row the place's name.

ReminderScheduler plans the places to watch into LocationReminderGateway,
a no-op off Android, which TodoPerson.dispose clears, and Settings' Reminders
says while the device may not watch them.

Whats-New: Tasks can have locations: type + or use the + menu, search by city and name or pick on the map, and be reminded on arriving or leaving (Android).
Whats-New-De: Aufgaben können Orte haben: Tippe + oder nutze das +-Menü, suche nach Stadt und Name oder wähle auf der Karte, und lass dich beim Ankommen oder Verlassen erinnern (Android).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-11-05 15:23:53 +01:00
commit 77d6a5528c
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -0,0 +1,41 @@
import 'package:halkyon_todo_flutter/src/feature/location/data/location_reminder_gateway.dart';
import 'package:halkyon_todo_flutter/src/feature/location/model/location_plan.dart';
/// The device's watching of places, in memory, as a test can read it.
class MemoryLocationGateway() implements LocationReminderGateway {
/// The places watched now.
List<LocationWatch> watched = const [];
/// What the device allows.
LocationAccess allowed = LocationAccess.always;
/// How often the places were handed over.
int replaced = 0;
@override
bool get available => true;
@override
Future<void> replace(
List<LocationWatch> watches, {
required String channel,
}) async {
watched = watches;
replaced++;
}
@override
Future<LocationAccess> access() async => allowed;
@override
Future<LocationAccess> askWhileInUse() async => allowed;
@override
Future<LocationAccess> askAlways() async => allowed;
@override
Future<void> openSettings() async {}
@override
Future<LatLon?> lastKnown() async => null;
}