我正在尝试对屏幕尺寸颤振应用程序进行响应,但是屏幕尺寸溢出了。
我从 figma 设计中下载了函数 12 的代码,我做了一些更改,但我不知道如何根据设备获得基本宽度,因此 fem 计算正确。非常感谢。
class _ScheduleState extends State<Schedule> {
@override
Widget build(BuildContext context) {
double baseWidth = 380;
double fem = MediaQuery.of(context).size.width / baseWidth;
double ffem = fem * 0.97;