feat: app 端 ui 设计完成
This commit is contained in:
29
wei_ai_app/lib/widgets/tab_content_layout.dart
Normal file
29
wei_ai_app/lib/widgets/tab_content_layout.dart
Normal file
@@ -0,0 +1,29 @@
|
||||
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,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user