fixes to scrubbing and offline issues
This commit is contained in:
parent
5bf85a5f44
commit
d558aba246
31 changed files with 296 additions and 33 deletions
|
|
@ -84,6 +84,26 @@ class _NowPlayingScreenState extends ConsumerState<NowPlayingScreen> {
|
|||
style: TextStyle(color: TimbreColors.dimmed, fontSize: 11),
|
||||
),
|
||||
),
|
||||
if (state.error == PlaybackError.offline)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: TimbreSpacing.sm),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Flexible(
|
||||
child: Text(
|
||||
"Can't reach the server — playback paused.",
|
||||
style: TextStyle(color: Color(0xFFE06C75), fontSize: 11),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: TimbreSpacing.sm),
|
||||
TextButton(
|
||||
onPressed: () => ref.read(playbackProvider.notifier).retry(),
|
||||
child: Text('Retry', style: TextStyle(color: accent)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
];
|
||||
|
||||
const padding = EdgeInsets.fromLTRB(
|
||||
|
|
@ -533,7 +553,8 @@ class _NowPlayingProgress extends ConsumerWidget {
|
|||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final position = ref.watch(playbackProvider.select((s) => s.position));
|
||||
final duration = ref.watch(playbackProvider.select((s) => s.duration));
|
||||
final duration =
|
||||
ref.watch(playbackProvider.select((s) => s.effectiveDuration));
|
||||
final progress = ref.watch(playbackProvider.select((s) => s.progress));
|
||||
return Row(
|
||||
children: [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue