getPadding method
EdgeInsets
getPadding({
- required bool toLeft,
- required TodayTableCellType type,
- bool large = false,
- bool isChild = false,
Implementation
EdgeInsets getPadding({
required bool toLeft,
required TodayTableCellType type,
bool large = false,
bool isChild = false,
}) {
TodaySpacing baseSide = TodaySpacing.tdsSpace4;
if (!large &&
[
TodayTableCellType.input,
TodayTableCellType.more,
TodayTableCellType.select,
].contains(type)) {
baseSide = TodaySpacing.tdsSpace3;
}
if (toLeft && type == TodayTableCellType.more) {
return EdgeInsets.only(
right: baseSide.spacing,
top: baseSide.spacing,
bottom: baseSide.spacing,
);
}
if (type == TodayTableCellType.more) {
return EdgeInsets.only(
left: TodaySpacing.tdsSpace1.spacing,
right: baseSide.spacing,
top: baseSide.spacing,
bottom: baseSide.spacing,
);
}
if (isChild) {
return EdgeInsets.symmetric(
horizontal: TodaySpacing.tdsSpace4.spacing,
vertical: 0,
);
}
return EdgeInsets.all(
baseSide.spacing,
);
}