subscribe<T> method
dynamic
subscribe<T>(
- LiveData<
T> ? liveData, - void onData(
- T value
Implementation
subscribe<T>(
fld.LiveData<T>? liveData,
void Function(T value) onData,
) {
if (liveData == null) return;
if (attr.isInitializingState) {
debugPrint('call [subscribe] inside method onInit (initState) cause abnormal behavior when Hot-Reload'
' --> '
'move code to onCreate');
}
return _subscribeLifeCycleEvent.call(liveData, onData);
}