Files
app/wei_ai_app/lib/widgets/tab_content_layout.dart
2026-01-28 19:10:19 +08:00

30 lines
942 B
Dart

import 'package:flutter/material.dart';
class TabContentLayout extends StatelessWidget {
final Widget child;
final bool applyTopPadding;
final bool applyBottomPadding;
const TabContentLayout({
super.key,
required this.child,
this.applyTopPadding = true,
this.applyBottomPadding = false, // Usually managed solely by the glass nav height inside the list, but let's see.
});
@override
Widget build(BuildContext context) {
// Since extendBodyBehindAppBar is true, we don't need extra padding
// The body naturally starts from top, but we just need minimal spacing
return Padding(
padding: EdgeInsets.only(
top: 0, // Content starts naturally below AppBar
// We don't necessarily pad bottom here if we want content to scroll behind bottom nav,
// but for fixed elements (like Discovery Filter bar), we might need structure.
),
child: child,
);
}
}