getApp method

Widget getApp(
  1. Widget app, {
  2. bool devicePreview = false,
})

Implementation

Widget getApp(Widget app, {bool devicePreview = false}) {
  if (devicePreview) {
    return DevicePreview(
        tools: const [
          ...DevicePreview.defaultTools,
          DevicePreviewScreenshot(),
        ],
        enabled: devicePreview,
        builder: (context) =>
            Sizer(builder: (context, orientation, deviceType) {
              return app;
            }));
  } else {
    return Sizer(builder: (context, orientation, deviceType) {
      return app;
    });
  }
}