mirror of
https://github.com/kuhyx/screen-locker.git
synced 2026-11-22 20:32:17 +01:00
Remove the run/walk toggle: every recording uses the 25 km/h running filter and writes a Running TCX; decodeTcx still reads walking files. Add the optional pace target (stepper, 30 s current pace, band, throttled cues, persisted). The idle map follows the user's fix; refused location shows only the red icon, no map and no start. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WzxdWZ9CKZsNxtD5Jr9bYD
28 lines
859 B
Dart
28 lines
859 B
Dart
/// A geolocator platform that answers from fields, for tests that build the
|
|
/// real run controller (and so the real position source) without a device.
|
|
library;
|
|
|
|
import 'package:geolocator/geolocator.dart';
|
|
|
|
/// Location on, permission granted, no positions.
|
|
class FakeGeolocator extends GeolocatorPlatform {
|
|
/// Whether the device's location switch is on.
|
|
bool serviceOn = true;
|
|
|
|
/// The permission [checkPermission] reports.
|
|
LocationPermission permission = LocationPermission.whileInUse;
|
|
|
|
@override
|
|
Future<bool> isLocationServiceEnabled() async => serviceOn;
|
|
|
|
@override
|
|
Future<LocationPermission> checkPermission() async => permission;
|
|
|
|
@override
|
|
Future<LocationPermission> requestPermission() async => permission;
|
|
|
|
@override
|
|
Stream<Position> getPositionStream({LocationSettings? locationSettings}) =>
|
|
const Stream.empty();
|
|
}
|