visible property

ValueNotifier<bool> visible

A ValueNotifier representing the current state of the capture UI. Use this to change your app's configuration when the user is in the process of taking a screenshot of your app - e.g. hiding sensitive information or disabling specific widgets.

The Confidential widget can automatically hide sensitive widgets from being recorded in a feedback screenshot.

Implementation

ValueNotifier<bool> get visible {
  const openStates = [
    WiredashBackdropStatus.centered,
    WiredashBackdropStatus.openingCentered,
    WiredashBackdropStatus.closingCentered,
  ];
  return _model.services.backdropController
      .asValueNotifier((c) => openStates.contains(c.backdropStatus));
}