DistinctSignal<T> constructor
- Signal<
T> source, { - String? debugLabel,
- bool equals(
- T a,
- T b
- T guard(
- T current,
- T next
- VoidCallback? onListen,
- VoidCallback? onCancel,
Implementation
DistinctSignal(
this.source, {
String? debugLabel,
super.equals,
super.guard,
super.onListen,
super.onCancel,
}) : super(source.val, debugLabel: debugLabel) {
_subscription = source.stream.listen((value) {
if (val != value) {
emit(value);
}
});
}