getGap method
Implementation
EdgeInsetsGeometry getGap() {
EdgeInsetsGeometry gapBottom = iGapBottom;
EdgeInsetsGeometry gapRight = iGapRight;
EdgeInsetsGeometry gapWrap = const EdgeInsets.only(bottom: iSizeUnit * 2, right: iSizeUnit * 2);
switch (size) {
case AntdSpaceSize.small:
gapBottom = iGapBottomSmall;
gapRight = iGapRightSmall;
gapWrap = const EdgeInsets.only(bottom: iSizeUnit, right: iSizeUnit);
break;
case AntdSpaceSize.middle:
gapBottom = iGapBottomMiddle;
gapRight = iGapRightMiddle;
gapWrap = const EdgeInsets.only(bottom: iSizeUnit * 3, right: iSizeUnit * 3);
break;
case AntdSpaceSize.larger:
gapBottom = iGapBottomLarger;
gapRight = iGapRightLarger;
gapWrap = const EdgeInsets.only(bottom: iSizeUnit * 4, right: iSizeUnit * 4);
break;
default:
break;
}
bool isVertical = direction == AntdSpaceDirection.vertical;
return isVertical
? gapBottom
: wrap != null && wrap!
? gapWrap
: gapRight;
}