why sizer dealing with padding value as a hight?

241 Views Asked by At

I am using sizer library, but i am wondering why padding value is assigned as a height top:5.h instead of weight top:5.w?.

The code in the Sizer documentation is:

 Padding(
      padding: EdgeInsets.symmetric(vertical: 5.h, horizontal: 3.h),
      child: Container(),
    );
1

There are 1 best solutions below

0
Tom Rivoire On BEST ANSWER

This looks more logical

Padding(
      padding: EdgeInsets.symmetric(vertical: 5.h, horizontal: 3.w),
      child: Container(),
    );

It creates :
A vertical padding of 5% of the screen height
An horizontal padding of 3% of the screen width

It might be a mistake in the doc, you could suggest an edit on the repo