isEnabled static method
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;
}