Refactor HomePage layout by simplifying padding and removing duplicate title widget
This commit is contained in:
@@ -411,11 +411,7 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
|
|||||||
left: 0,
|
left: 0,
|
||||||
right: 0,
|
right: 0,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.only(
|
padding: const EdgeInsets.symmetric(horizontal: 32),
|
||||||
top: MediaQuery.of(context).size.width < 600 ? 16 : 24,
|
|
||||||
left: 32,
|
|
||||||
right: 32,
|
|
||||||
),
|
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
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,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user