OpenFlutter / flutter_screenutil

Flutter screen adaptation, font adaptation, get screen information
https://pub.dartlang.org/packages/flutter_screenutil
Apache License 2.0
3.83k stars 485 forks source link

5.9.0 oppo colorOS 14.0 Android14列表item有时会空白 #561

Closed Bter closed 2 months ago

Bter commented 2 months ago

![有问题的时候]

![正常的时候]

Bter commented 2 months ago

问题同 #529

Bter commented 2 months ago

解决方案 https://github.com/OpenFlutter/flutter_screenutil/issues/558#issuecomment-2047043378

lizhuoyuan commented 2 months ago

试试 final designSize = const Size(412, 892);

ScreenUtilInit( designSize: designSize, fontSizeResolver: (fontSize, instance) { final display = View.of(context).display; final screenSize = display.size / display.devicePixelRatio; final scaleWidth = screenSize.width / designSize.width;

        return fontSize * scaleWidth;
      },
      builder: (context, _) {
          return MaterialApp.....

})