addResizeListener method

void addResizeListener(
  1. ResizeChangeCallback callback
)

Implementation

void addResizeListener(ResizeChangeCallback callback) {
  // Init things
  _listeners ??= List.empty(growable: true);
  // Avoid same listener added twice.
  if (!_listeners!.contains(callback)) {
    _listeners!.add(callback);
  }
}