ViewModel<T> constructor
ViewModel<T> (
- T _data
Implementation
ViewModel(this._data) {
if (kFlutterMemoryAllocationsEnabled) {
ChangeNotifier.maybeDispatchObjectCreation(this);
}
_safeInitialization();
/// Yes and only if it is changed to true when the entire initialization process is finished.
hasInitializedListenerExecution = true;
assert(() {
log('''
🔧 ViewModel<${T.toString()}> created
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ID: $_instanceId
Location: ${_getCreationLocation()}
Initial state hash: ${_data.hashCode}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
''', level: 10);
return true;
}());
}