💄 Optimized call

This commit is contained in:
2025-06-22 01:40:10 +08:00
parent 006841cf82
commit d1506f10ef
8 changed files with 256 additions and 100 deletions

View File

@ -25,14 +25,22 @@ EdgeInsets getTabbedPadding(
double? top,
double? bottom,
}) {
final bottomPadding = bottom ?? MediaQuery.of(context).padding.bottom + 16;
if (isWideScreen(context)) {
return EdgeInsets.only(
left: left ?? horizontal ?? 0,
right: right ?? horizontal ?? 0,
top: top ?? vertical ?? 0,
bottom: bottom ?? vertical ?? 0,
);
}
final effectiveBottom = bottom ?? vertical;
return EdgeInsets.only(
left: left ?? horizontal ?? 0,
right: right ?? horizontal ?? 0,
top: top ?? vertical ?? 0,
bottom:
bottom != null
? bottomPadding
effectiveBottom != null
? effectiveBottom + MediaQuery.of(context).padding.bottom + 16
: MediaQuery.of(context).padding.bottom + 16,
);
}