I have a question about using flutter_screenutil package.
the package has two methods for setting widths and heights,
first one when using ScreenUtil().setWidth(540) or ScreenUtil().setHeight(540)
and the second one when using extensions like 540.w or 540.h
I am confused about which method should i use.
so can you help me please?
2
Answers
If your dart sdk>=2.6, you can use extension functions:
example:
instead of :
you can use it like this:
you can use any one method , both methods will give you same result