addListener method
StreamxxListener_c<T>
addListener(
- void onActive(
- T value,
- bool? hasModify
), {
- bool hasModify(
- T oldData,
- T newData
)?,
- bool onlyNotifyWhenModify = true,
})
Implementation
StreamxxListener_c<T> addListener(
void Function(T value, bool? hasModify) onActive, {
bool Function(T oldData, T newData)? hasModify,
bool onlyNotifyWhenModify = true,
}) {
final item = StreamxxListener_c<T>(
id: _useId++,
onActive: onActive,
hasModify: hasModify,
onlyNotifyWhenModify: onlyNotifyWhenModify,
stream: this,
);
_listeners.add(item);
return item;
}