ResponsiveFramework
ResponsiveFramework copied to clipboard
Doesn't work in conjunction with device_preview library
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"),
],
),
);
},
);
}
}
Uh oh, that's not good. This library was fully compatible with Device Preview.
Can you share a screenshot of the distortion?
@searchy2
Commenting Device_preview library:
Uncommenting Device_preview library:
If I use the Device_preview library alone, it works just fine.
@searchy2 you can view this error?
Happening here: https://github.com/felipecastrosales/fluttergram/tree/dev
@searchy2 and @Codelessly news about this?