Por favor, defina a largura e altura do protótipo de design antes de usar (em pixels).
Certifique-se de definir as dimensões na paginal inicial do MaterialApp (ou seja, no arquivo de entrada, defina apenas uma vez) para garantir que o tamanho de ajuste seja o mesmo antes de cada uso:
The first way:
```dart
voidmain()=>runApp(MyApp());
classMyAppextendsStatelessWidget{
@override
Widgetbuild(BuildContextcontext){
//Preencha o tamanho da tela do dispositivo no protótipo de design , in dp
//Set the fit size (fill in the screen size of the device in the design,in dp)
returnScreenUtilInit(
designSize:Size(360,690),
allowFontScaling:false,
...
...
@@ -61,6 +62,24 @@ class MyApp extends StatelessWidget {
}
}
```
The second way:
```
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
//Set the fit size (fill in the screen size of the device in the design) If the design is based on the size of the 360*690