It seems a bug, when you use sp in some special devices such as iPad.
Descriptions: In general, a textview with 22sp text content, may be 30dp height in screen. But, when you put the textview into a constraint container which is 30dp height, the textview will be overflow.
It means, the value return of sp() function may be bigger in pads.
Devices:
Some abnormal screen rate devices, especially iPad.

Configs:
ScreenUtil.init(context, width: 375, height: 812, allowFontScaling: false);
Suggestions: Further, i have a suggestion. Could you please give a public api such as getRadius(). We want to use it in some special cases, such as square widgets, or other round widgets.
A common scenario as i say, here is a square widget with a 16 side length. If i set ScreenUtil().setWidth(16) to the widget width, and in turn, i set ScreenUtil().setHeight(16) to the widget height. When the widget displayed on ipad screens, it will not be a square widget no more. It will become a rectangle widget because of the difference of height & width.
The implementation of getRadius() may be easy, you can get it from the min of adapted height and adapted width.
static num radius(num r) => min(ScreenUtil().setWidth(r), ScreenUtil().setHeight(r));
The use of px for adaptation may indeed cause the problem you mentioned. In fact, I have considered using dp as the unit, but the size of the design draft can be set to dp, and px is more versatile, and some do not support dp, so I Delayed the plan.
My current experience is to try not to limit the size of the text, it may be helpful
Regarding your suggestion, I actually said: If you want a square, it is recommended to use setWidth for both width and height. Do you still think you need radius? Or is there any other necessity to increase it
The use of px for adaptation may indeed cause the problem you mentioned. In fact, I have considered using dp as the unit, but the size of the design draft can be set to dp, and px is more versatile, and some do not support dp, so I Delayed the plan.
My current experience is to try not to limit the size of the text, it may be helpful
Regarding your suggestion, I actually said: If you want a square, it is recommended to use setWidth for both width and height. Do you still think you need radius? Or is there any other necessity to increase it
Emmm... I wanna to get a perfect solution of sp() .
I've already implemented the function getRadius(). And I think, we should use the min of adapted height and adapted width, otherwise, it'll be overflowed on some devices.
you can try that:
v4.0.1 Two lines of text
Container(
height: 32.h,
child: Text(
'My font size is 16sp on the design draft and will not change with the system.',
style: TextStyle(
color: Colors.black,
fontSize: 16.sp,
),
),
),
and I will add radius method on 4.0.2