setWidth method

double setWidth(
  1. num width
)

根据UI设计的设备宽度适配 高度也可以根据这个来做适配可以保证不变形,比如你想要一个正方形的时候. Adapted to the device width of the UI Design. Height can also be adapted according to this to ensure no deformation , if you want a square

Implementation

double setWidth(num width) => width * scaleWidth;