SyntheticTrackingRoute.walking constructor
SyntheticTrackingRoute.walking(
{ - int pointCount = 20,
- DateTime? startedAt,
})
Implementation
factory SyntheticTrackingRoute.walking({
int pointCount = 20,
DateTime? startedAt,
}) {
final start = (startedAt ?? DateTime.utc(2026)).toUtc();
return SyntheticTrackingRoute(
List<LocationSample>.generate(
pointCount,
(index) => LocationSample(
latitude: index * 0.00001,
longitude: index * 0.00001,
horizontalAccuracy: 5,
capturedAt: start.add(Duration(seconds: index * 5)),
provider: 'synthetic',
eventId: 'synthetic-$index',
mockDetectionAvailable: false,
),
growable: false,
),
<ActivitySnapshot>[
ActivitySnapshot(
type: TrackingActivityType.walking,
confidence: 90,
recordedAt: start,
),
],
);
}