flutter報錯:The method '/' was called on null.

 出現這個bug是因爲沒有初始化 flutter_screenutil 加上下面的代碼就好了

注意要加在使用flutter_screenutil 的開頭

ScreenUtil.instance = ScreenUtil(width: 750, height: 1334)..init(context);

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章