changes method
Implementation
@override
Stream<void> changes() {
// https://github.com/dart-lang/linter/issues/1381
// ignore: close_sinks
late StreamController<void> controller;
SemanticsHandle? handle;
void onStart() {
handle = _pipelineOwner.ensureSemantics(
listener: () => controller.add(null),
);
}
void onStop() {
handle?.dispose();
handle = null;
}
controller = StreamController<void>(
onListen: onStart,
onPause: onStop,
onResume: onStart,
onCancel: onStop,
);
return controller.stream;
}