|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
class _MergingListenable : ChangeNotifier { |
|
|
|
class _MergingListenable : Listenable { |
|
|
|
|
|
|
|
foreach (Listenable child in _children) { |
|
|
|
if (child != null) { |
|
|
|
child.addListener(this.notifyListeners); |
|
|
|
} |
|
|
|
} |
|
|
|
public override void dispose() { |
|
|
|
public void addListener(VoidCallback listener) { |
|
|
|
if (child != null) { |
|
|
|
child.removeListener(this.notifyListeners); |
|
|
|
} |
|
|
|
child?.addListener(listener); |
|
|
|
} |
|
|
|
base.dispose(); |
|
|
|
public void removeListener(VoidCallback listener) { |
|
|
|
foreach (Listenable child in this._children) { |
|
|
|
child?.removeListener(listener); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public override string ToString() { |
|
|
|