stop method
Implementation
Future stop() {
if (_timer == null) {
throw Exception('Polling not started.');
}
_timer!.cancel();
final future = _controller!.close();
_timer = null;
_controller = null;
return future;
}
Future stop() {
if (_timer == null) {
throw Exception('Polling not started.');
}
_timer!.cancel();
final future = _controller!.close();
_timer = null;
_controller = null;
return future;
}