loadingDependsOn method

  1. @protected
void loadingDependsOn(
  1. TaskViewModel other, {
  2. String? childTag,
  3. String? tag,
})

Implementation

@protected
void loadingDependsOn(TaskViewModel other, {String? childTag, String? tag}) {
  assert(() {
    _debugCheckDependency(other);
    return true;
  }(), '');
  final loading = childTag == null ? other.loading : other.loadingWithTag(childTag);
  final task = TaskInfo._(identityHashCode(other).toString(), tag ?? 'vm-${other.runtimeType}', const {});
  other._parent[this] = loading.observeForever((value) => value ? _addTask(task) : _removeTask(task));
}