Enhance audio file handling with improved error logging and UI adjustments for audio player bar positioning

This commit is contained in:
Leon Bösche
2026-01-17 02:31:33 +01:00
parent 979091f975
commit d9a651b375
4 changed files with 54 additions and 37 deletions

View File

@@ -440,6 +440,24 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
},
),
),
// Audio player bar (positioned to the right of title)
if (_showAudioBar &&
_audioFileName != null &&
_audioFileUrl != null)
Positioned(
right: -200, // adjust to position next to title
child: SlideTransition(
position: _audioBarOffset,
child: AudioPlayerBar(
fileName: _audioFileName!,
fileUrl: _audioFileUrl!,
onClose: () {
_audioBarController.reverse();
setState(() => _showAudioBar = false);
},
),
),
),
// Right: nav buttons
Align(
alignment: Alignment.centerRight,
@@ -473,28 +491,6 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
),
),
),
// Audio player bar (absolute, below title)
if (_showAudioBar &&
_audioFileName != null &&
_audioFileUrl != null)
Positioned(
top: 56, // adjust as needed for spacing below top bar
left: 0,
right: 0,
child: SlideTransition(
position: _audioBarOffset,
child: Center(
child: AudioPlayerBar(
fileName: _audioFileName!,
fileUrl: _audioFileUrl!,
onClose: () {
_audioBarController.reverse();
setState(() => _showAudioBar = false);
},
),
),
),
),
Center(
child: BlocBuilder<AuthBloc, AuthState>(
builder: (context, state) {