onSchedule static method
Subscribes to schedule events.
Implementation
static StreamSubscription<Location> onSchedule(
void Function(Location) callback, {
Function? onError,
}) {
return events
.where((event) => event.type == EventType.schedule)
.map((event) => event.data)
.where((data) => data is Location)
.cast<Location>()
.listen(callback, onError: onError);
}