setSp method
fontSize
传入fontSize 返回 适配后的fontSize
Implementation
@override
double setSp(num fontSize, {bool? allowFontScaling}) {
if (allowFontScaling == null) {
if (this.allowFontScaling == false)
return fontSize *
min(screenWidth! / this.width, screenHeight! / this.height);
return fontSize *
min(screenWidth! / this.width, screenHeight! / this.height) *
textScaleFactor!;
}
if (allowFontScaling == false)
return fontSize *
min(screenWidth! / this.width, screenHeight! / this.height);
return fontSize *
min(screenWidth! / this.width, screenHeight! / this.height) *
textScaleFactor!;
}