Refactor HomePage layout to improve audio bar integration and navigation button arrangement
This commit is contained in:
@@ -412,15 +412,23 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
|
|||||||
right: 0,
|
right: 0,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 32),
|
padding: const EdgeInsets.symmetric(horizontal: 32),
|
||||||
child: Center(
|
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
// Title
|
// Left spacer
|
||||||
|
const Expanded(child: SizedBox()),
|
||||||
|
// Center: title and audio bar
|
||||||
|
Expanded(
|
||||||
|
flex: 2,
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
Builder(
|
Builder(
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
final screenWidth = MediaQuery.of(context).size.width;
|
final screenWidth = MediaQuery.of(
|
||||||
|
context,
|
||||||
|
).size.width;
|
||||||
final fontSize = screenWidth < 600 ? 24.0 : 48.0;
|
final fontSize = screenWidth < 600 ? 24.0 : 48.0;
|
||||||
return Text(
|
return Text(
|
||||||
'b0esche.cloud',
|
'b0esche.cloud',
|
||||||
@@ -430,19 +438,18 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
|
|||||||
color: AppTheme.primaryText,
|
color: AppTheme.primaryText,
|
||||||
decoration: TextDecoration.underline,
|
decoration: TextDecoration.underline,
|
||||||
decorationColor: AppTheme.primaryText,
|
decorationColor: AppTheme.primaryText,
|
||||||
fontFeatures: const [FontFeature.slashedZero()],
|
fontFeatures: const [
|
||||||
|
FontFeature.slashedZero(),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
// Audio player (if visible)
|
|
||||||
if (_showAudioBar &&
|
if (_showAudioBar &&
|
||||||
_audioFileName != null &&
|
_audioFileName != null &&
|
||||||
_audioFileUrl != null) ...[
|
_audioFileUrl != null) ...[
|
||||||
const SizedBox(width: 32),
|
const SizedBox(width: 24),
|
||||||
FractionallySizedBox(
|
SlideTransition(
|
||||||
widthFactor: 0.5,
|
|
||||||
child: SlideTransition(
|
|
||||||
position: _audioBarOffset,
|
position: _audioBarOffset,
|
||||||
child: AudioPlayerBar(
|
child: AudioPlayerBar(
|
||||||
fileName: _audioFileName!,
|
fileName: _audioFileName!,
|
||||||
@@ -453,11 +460,15 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
const SizedBox(width: 32),
|
],
|
||||||
// Navigation buttons
|
),
|
||||||
BlocBuilder<AuthBloc, AuthState>(
|
),
|
||||||
|
// Right: nav buttons
|
||||||
|
Expanded(
|
||||||
|
child: Align(
|
||||||
|
alignment: Alignment.centerRight,
|
||||||
|
child: BlocBuilder<AuthBloc, AuthState>(
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
final isLoggedIn = state is AuthAuthenticated;
|
final isLoggedIn = state is AuthAuthenticated;
|
||||||
if (!isLoggedIn) {
|
if (!isLoggedIn) {
|
||||||
@@ -481,9 +492,10 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Center(
|
Center(
|
||||||
|
|||||||
Reference in New Issue
Block a user