onExpandedChanged method

  1. @HostListener('expandedChange')
void onExpandedChanged(
  1. bool expand
)

Handles expanded status changes from the panel.

Implementation

@HostListener('expandedChange')
void onExpandedChanged(bool expand) {
  _clicksOutsideSubscription?.cancel();
  if (expand) {
    _clicksOutsideSubscription = _clicksOutsideController.stream
        .listen((e) => _expansionPanel.collapse(byUserAction: false));
  }
}