addDisposeHandler method

void addDisposeHandler(
  1. VComponent vComponent,
  2. void handler()
)

Implementation

void addDisposeHandler(VComponent vComponent, void Function() handler) {
  (vComponent.onDispose ??= []).add(handler);
}