-
Notifications
You must be signed in to change notification settings - Fork 157
Closed
Description
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"),
],
),
);
},
);
}
}
Metadata
Metadata
Assignees
Labels
No labels