Persistent mini-player over the profile navigator (route-aware suppression, bottom-bar inset), slide-up now-playing screen with mobile/desktop/TV layouts (blurred-art background, pause shape morphs, dpad seek chain), queue sheet with reorder/remove/jump, synced lyrics view, TV rail now-playing item, sleep timer, and audio playlist playback. Adds download affordances on music surfaces.
26 lines
986 B
Dart
26 lines
986 B
Dart
import 'package:flutter/widgets.dart';
|
|
import 'package:material_symbols_icons/symbols.dart';
|
|
|
|
import '../../i18n/strings.g.dart';
|
|
import '../../services/music/music_playback_service.dart';
|
|
|
|
/// Shared repeat-mode presentation for the now-playing transport row and the
|
|
/// queue sheet header: icon, accessibility label, and the off→all→one cycle.
|
|
IconData repeatModeIcon(MusicRepeatMode mode) => switch (mode) {
|
|
MusicRepeatMode.off => Symbols.repeat_rounded,
|
|
MusicRepeatMode.all => Symbols.repeat_on_rounded,
|
|
MusicRepeatMode.one => Symbols.repeat_one_on_rounded,
|
|
};
|
|
|
|
String repeatModeLabel(MusicRepeatMode mode) => switch (mode) {
|
|
MusicRepeatMode.off => t.music.repeat,
|
|
MusicRepeatMode.all => t.music.repeatAll,
|
|
MusicRepeatMode.one => t.music.repeatOne,
|
|
};
|
|
|
|
MusicRepeatMode nextRepeatMode(MusicRepeatMode mode) => switch (mode) {
|
|
MusicRepeatMode.off => MusicRepeatMode.all,
|
|
MusicRepeatMode.all => MusicRepeatMode.one,
|
|
MusicRepeatMode.one => MusicRepeatMode.off,
|
|
};
|