dispose method

  1. @mustCallSuper
Element<E>? dispose({
  1. String? tag,
})

Implementation

@mustCallSuper
Element<E>? dispose({String? tag}) {
  if (mounted(tag: tag)) {
    final key = getKey(tag);
    final element = containerElements[key]!;
    // ignore: invalid_use_of_protected_member
    element.ref.dispose();

    return containerElements.remove(key) as Element<E>;
  }
  return null;
}