void main() => runApp(
DevicePreview(
enabled: !kReleaseMode,
builder: (context) => MyApp(), // Wrap your app
),
);
class MyApp extends StatelessWidget {
final botToastBuilder = BotToastInit();
@override
Widget build(BuildContext context) {
return GetMaterialApp.router(
useInheritedMediaQuery: true,
locale: DevicePreview.locale(context),
builder: (context, child) {
child = DevicePreview.appBuilder(context, child);
child = botToastBuilder(context, child);
return child;
},
theme: ThemeData.light(),
darkTheme: ThemeData.dark(),
home: const HomePage(),
);
}
}