hideToolbar static method
Hide the toolbar.
If disablePreview
is set to false
, then the device preview stays active even
if the toolbar is not visible anymore.
Implementation
static void hideToolbar(
BuildContext context, {
bool disablePreview = true,
}) {
final store = Provider.of<DevicePreviewStore>(context);
store.data = store.data.copyWith(
isToolbarVisible: false,
isEnabled: !disablePreview,
);
}