visible property

bool get visible

Implementation

bool get visible => _visible;
  1. @Input()
set visible (bool value)

Visibility of the drawer.

Implementation

@Input()
set visible(bool value) {
  if (value == _visible) return;
  _visible = value;

  if (!_visible) {
    // Wait until after the animation to remove the content
    Timer(animationDuration, () {
      // Make sure we are still not visible in case the drawer was toggled
      // quickly before the animation was done.
      if (!_visible) _visibleChange.add(_visible);
    });
  } else {
    // Show the content right away when animating in
    _visibleChange.add(_visible);
  }
}