The method '/' was called on null.
这个是因为在初始化flutter_screenutil之前,调用了flutter_screenutil设置宽高导致的,解决办法即调用 flutter_screenutil 之前加上下面的代码就好了
注意要加在使用flutter_screenutil 的开头
ScreenUtil.instance = ScreenUtil(width: 750, height: 1334)..init(context);
ScreenUtil.instance = ScreenUtil(width: 750, height: 1334)..init(context);