cancel method
- bool shouldRemove = true,
Cancels the subscription, so the underlying listener to the device's status will no longer be called.
If shouldRemove is true, this subscription will also be removed from
the associated PendingExerciseNotifier.
Implementation
void cancel({bool shouldRemove = true}) {
timer.cancel();
subscription.close();
if (shouldRemove) {
notifier._notifyRemoved(deviceId);
}
}