showToolbar static method

void showToolbar(
  1. BuildContext context, {
  2. bool enablePreview = true,
})

Make the toolbar visible to the user.

If enablePreview is set to true, then the device preview is also enabled when appearing.

Implementation

static void showToolbar(
  BuildContext context, {
  bool enablePreview = true,
}) {
  final store = Provider.of<DevicePreviewStore>(context);
  store.data = store.data.copyWith(
    isToolbarVisible: true,
    isEnabled: enablePreview,
  );
}