Refactor HomePage layout by simplifying padding and removing duplicate title widget

This commit is contained in:
Leon Bösche
2026-01-17 01:34:02 +01:00
parent 893526eeac
commit 6ee244b829

View File

@@ -411,11 +411,7 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
left: 0,
right: 0,
child: Padding(
padding: EdgeInsets.only(
top: MediaQuery.of(context).size.width < 600 ? 16 : 24,
left: 32,
right: 32,
),
padding: const EdgeInsets.symmetric(horizontal: 32),
child: Center(
child: Row(
mainAxisSize: MainAxisSize.min,
@@ -740,42 +736,6 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
},
),
),
// Removed duplicate title Positioned widget
Positioned(
top: MediaQuery.of(context).size.width < 600 ? 40 : 10,
right: 20,
child: BlocBuilder<AuthBloc, AuthState>(
builder: (context, state) {
final isLoggedIn = state is AuthAuthenticated;
if (!isLoggedIn) {
return const SizedBox.shrink();
}
return ScaleTransition(
scale: Tween<double>(begin: 0, end: 1).animate(
CurvedAnimation(
parent: _animationController,
curve: Curves.easeOutBack,
),
),
child: Row(
children: [
_buildNavButton('Drive', Icons.cloud),
const SizedBox(width: 16),
_buildNavButton('Mail', Icons.mail),
const SizedBox(width: 16),
_buildNavButton('Add', Icons.add),
const SizedBox(width: 16),
_buildNavButton(
'Profile',
Icons.person,
isAvatar: true,
),
],
),
);
},
),
),
],
),
),