Refactor HomePage layout for improved audio player visibility and navigation button arrangement
This commit is contained in:
@@ -405,7 +405,7 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
|
|||||||
backgroundColor: AppTheme.primaryBackground,
|
backgroundColor: AppTheme.primaryBackground,
|
||||||
body: Stack(
|
body: Stack(
|
||||||
children: [
|
children: [
|
||||||
// Title and audio bar row
|
// Top bar: title, audio bar (if visible), nav buttons, all in a centered row
|
||||||
Positioned(
|
Positioned(
|
||||||
top: 0,
|
top: 0,
|
||||||
left: 0,
|
left: 0,
|
||||||
@@ -416,7 +416,9 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
|
|||||||
left: 32,
|
left: 32,
|
||||||
right: 32,
|
right: 32,
|
||||||
),
|
),
|
||||||
|
child: Center(
|
||||||
child: Row(
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
// Title
|
// Title
|
||||||
@@ -437,18 +439,13 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
const SizedBox(width: 32),
|
// Audio player (if visible)
|
||||||
// Audio bar (centered between title and nav buttons)
|
if (_showAudioBar &&
|
||||||
Expanded(
|
|
||||||
child: AnimatedBuilder(
|
|
||||||
animation: _audioBarController,
|
|
||||||
builder: (context, child) {
|
|
||||||
return (_showAudioBar &&
|
|
||||||
_audioFileName != null &&
|
_audioFileName != null &&
|
||||||
_audioFileUrl != null)
|
_audioFileUrl != null) ...[
|
||||||
? Center(
|
const SizedBox(width: 32),
|
||||||
child: FractionallySizedBox(
|
FractionallySizedBox(
|
||||||
widthFactor: 0.7,
|
widthFactor: 0.5,
|
||||||
child: SlideTransition(
|
child: SlideTransition(
|
||||||
position: _audioBarOffset,
|
position: _audioBarOffset,
|
||||||
child: AudioPlayerBar(
|
child: AudioPlayerBar(
|
||||||
@@ -461,13 +458,9 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
],
|
||||||
: const SizedBox.shrink();
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(width: 32),
|
const SizedBox(width: 32),
|
||||||
// Navigation buttons (Drive, Mail, Add, Profile)
|
// Navigation buttons
|
||||||
BlocBuilder<AuthBloc, AuthState>(
|
BlocBuilder<AuthBloc, AuthState>(
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
final isLoggedIn = state is AuthAuthenticated;
|
final isLoggedIn = state is AuthAuthenticated;
|
||||||
@@ -496,6 +489,7 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
Center(
|
Center(
|
||||||
child: BlocBuilder<AuthBloc, AuthState>(
|
child: BlocBuilder<AuthBloc, AuthState>(
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
|
|||||||
Reference in New Issue
Block a user