detach<P, C> function

LiveData<C>? detach<P, C>(
  1. LiveData<P> parent,
  2. C child
)

Implementation

LiveData<C>? detach<P, C>(LiveData<P> parent, C child) {
  for (var item in parent.attachedItems.keys) {
    if (identical(item, child)) {
      return parent.attachedItems.containsKey(child) ? parent.attachedItems[child] : null;
    }
  }
  return null;
}