setWidth method

num setWidth(
  1. num width
)

设置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

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