issues
search
OpenFlutter
/
flutter_screenutil
Flutter screen adaptation, font adaptation, get screen information
https://pub.dartlang.org/packages/flutter_screenutil
Apache License 2.0
3.88k
stars
494
forks
source link
flutter_screenutil使得字体在flutter web html下 宽度计算变短
#357
Closed
vecharm
closed
2 years ago
vecharm
commented
2 years ago
这是canvaskit render
这是html render 已经重叠了 从背景色可以看的 宽度有问题
```dart Row(mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ Container(color: Colors.redAccent, child: Text(widget.title, style: Colors.white.withOpacity(0.5).fontSize(12))), 4.horizontalSpace, Icon(Icons.error_outline_rounded, color: Colors.white.withOpacity(0.5), size: 14.sp), ], ) ``` Colors.white.withOpacity(0.5).fontSize(12) 里面调用了 TextStyle(fontSize:12.sp) , 一开始我以为是flutter那边的bug,后面我去掉flutter_screenutil 他是正常的。
这是canvaskit render
这是html render 已经重叠了 从背景色可以看的 宽度有问题