Skip to content

尺寸问题 #606

@chasonHgg

Description

@chasonHgg
runApp(
    ScreenUtilInit(
      designSize: const Size(375, 812),
      minTextAdapt: true,
      splitScreenMode: true,
      builder: (context, child) {
        ScreenUtil.init(context);
        return const MyApp();
      },
    ),
  );

 Text(
    //ScreenUtil().screenWidth = 430
    '屏幕宽度: ${ScreenUtil().screenWidth}',
    style: TextStyle(fontSize: 14.sp),
  ),
  BetterButton(
    text: '375.w = ${375.w}',
    type: BetterButtonType.primary,
    loadingText: "加载中...".tr,
    height: 44.w,
    width: 375.w,
  ),

当我设置375x812的时候,且我的屏幕宽度是430,但我设置375.w的时候,375.w = 447.91666 , 正确不是应该375.w=430才对吗

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions