ResponsiveFramework icon indicating copy to clipboard operation
ResponsiveFramework copied to clipboard

Doesn't work in conjunction with device_preview library

Open MenaRaafat opened this issue 3 years ago • 2 comments

Using Responsive Framework alongside device_preview library produces a distorted UI.

Device_preview library: https://pub.dev/packages/device_preview


void main() {
  // runApp(DevicePreview(
  //     enabled: true, //!kReleaseMode,
  //     plugins: [
  //       const ScreenshotPlugin(),
  //       const FileExplorerPlugin(),
  //       const SharedPreferencesExplorerPlugin(),
  //     ],
  //     builder: (context) => MyApp()));

  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Sizer(
      builder: (context, orientation, deviceType) {
        return MaterialApp(
          debugShowCheckedModeBanner: false,
          title: "MyAppTitle",
          color: Colors.yellow,
          home: Home(),
          builder: (context, widget) => ResponsiveWrapper.builder(
            BouncingScrollWrapper.builder(context, widget!),
            maxWidth: 2060,
            minWidth: 450,
            defaultScale: true,
            breakpoints: [
              ResponsiveBreakpoint.resize(450, name: MOBILE),
              ResponsiveBreakpoint.autoScale(800, name: TABLET),
              ResponsiveBreakpoint.autoScale(1000, name: TABLET),
            //  ResponsiveBreakpoint.resize(1200, name: DESKTOP),
            //  ResponsiveBreakpoint.autoScale(2460, name: "4K"),
            ],
          ),
        );
      },
    );
  }
}

MenaRaafat avatar Jul 27 '21 12:07 MenaRaafat

Uh oh, that's not good. This library was fully compatible with Device Preview.

Can you share a screenshot of the distortion?

rayliverified avatar Jul 28 '21 02:07 rayliverified

@searchy2

Commenting Device_preview library:

Screenshot_1627811501

Uncommenting Device_preview library:

Screenshot_1627811405

If I use the Device_preview library alone, it works just fine.

MenaRaafat avatar Aug 01 '21 09:08 MenaRaafat

@searchy2 you can view this error?

image

Happening here: https://github.com/felipecastrosales/fluttergram/tree/dev

felipecastrosales avatar Jan 09 '23 22:01 felipecastrosales

@searchy2 and @Codelessly news about this?

felipecastrosales avatar Jan 16 '23 22:01 felipecastrosales