flutter_device_preview
flutter_device_preview copied to clipboard
The getter 'appBuilder' isn't defined for the type 'DevicePreview'.
I can't run normally according to the example on the official website
Try without this line builder: DevicePreview.appBuilder
:
import 'package:device_preview/device_preview.dart';
void main() => runApp(
DevicePreview(
enabled: !kReleaseMode,
builder: (context) => MyApp(), // Wrap your app
),
);
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
useInheritedMediaQuery: true,// Set to true
locale: DevicePreview.locale(context), // Add the locale here
home: HomePage(),
);
}
}
Just published 1.0.0!
Tell me if it is now fine on your side.
install all the Dependencies then they working great