isEnabled static method

bool isEnabled(
  1. BuildContext context
)

Indicates whether the device preview is currently enabled.

Implementation

static bool isEnabled(BuildContext context) {
  if (_isEnabled(context)) {
    return context.select(
      (DevicePreviewStore store) => store.state.maybeMap(
        initialized: (initialized) => initialized.data.isEnabled,
        orElse: () => false,
      ),
    );
  }
  return false;
}