localSaveNotifier property
Listenable?
get
localSaveNotifier
- Trigger sync when
v
send notification - Start listening if not null
- Stop listening if null
Implementation
Listenable? get localSaveNotifier => _localSaveNotifier;
set
localSaveNotifier
(Listenable? v)
Implementation
set localSaveNotifier(Listenable? v) {
if (_localSaveNotifier != v) {
// 1. Clear current listener
_localSaveNotifier?.removeListener(() => sync());
// 2. Update notifier
_localSaveNotifier = v;
// 3. Enable new listener
_localSaveNotifier?.addListener(() => sync());
}
}