Why 100.sp != (50.sp)*2
q876625596 opened this issue · comments
I set the width to 50.sp and then to 100.sp and found that they are not 2x
Hi @q876625596 , 50.sp * 2
is not equal to 100.sp
because of the way .sp
is calculated:
double get sp =>
this * ((Device height + Device width) + Device pixelRatio * Device aspectRatio) / 2.08) / 100;
^<----------------------------------------
| |
The this here is the number (50.sp will make this = 50)
I hope this clarifies your question :)