music library

Music widgets built on sheen: covers, the mini player, a seek bar, transport controls, song rows, shelves, synced lyrics, a reorderable queue, equaliser bands, and the controls of long audio (books, podcasts): skip buttons, speed, chapters and a resume card.

Import it next to package:sheen/sheen.dart.

Classes

SheenArtwork Music
A song's or album's cover: a square image clipped to radius, or a music glyph on a quiet ground when there is no image or it fails to load. A hairline edge keeps a dark cover apart from a dark page.
SheenArtworkGlow Music
The ground of a player or an album page: the cover, blurred and saturated into a soft glow, fading into the page's background, so the glass above takes the song's colours.
SheenArtworkTile Music
A cover with one or two lines under it, for a shelf of albums, mixes or artists. Artists are round and centred.
SheenBandSlider Music
One band of an equaliser: a vertical slider in decibels with its centre at 0 dB, the value above and the band's name below. The fill grows from the centre up (boost) or down (cut). A screen reader moves it 1 dB at a time.
SheenChapter Music
One chapter of a long recording: its title and where it starts.
SheenChapterList Music
The chapters of a long recording as rows: the title and its start time, the chapter playing in the accent colour, the ones already heard dimmed. A tap picks a chapter.
SheenLyricsLine Music
One timed line of lyrics.
SheenLyricsView Music
Synced lyrics: large lines, the one being sung bright and the rest dim, scrolling by themselves to keep the current line in the upper third. A tap on a line jumps the song there. With no timed lines, plain lyrics show as text.
SheenMiniPlayer Music
The glass bar above the tab bar that shows what plays: the cover, title and artist, play/pause and next, and a thin progress line along its foot.
SheenMusicScope Music
Provides SheenMusicStrings to the music widgets below it.
SheenMusicStrings Music
The words the music widgets show or announce when you give them none.
SheenPlayingBars Music
Three small bars that rise and fall while a song plays, in the accent colour, as the playing row of a list shows.
SheenReorderList<T> Music
A list whose rows can be dragged by a handle into a new order and swiped away, as a queue or a playlist is edited.
SheenResumeCard Music
The "Continue listening" card of long audio: the cover, the title, what is left, a progress line and a play button. Show it while a book or episode is unfinished.
SheenSeekBar Music
The seek line of a player: a thin track that thickens under the finger, the played part in the text colour, the buffered part fainter, and the time played and the time left under it in tabular figures.
SheenShelf Music
A titled row of tiles that scrolls sideways, with an optional "See all" link, as on a music home page.
SheenSkipButton Music
A "back 15" or "forward 30" button for long audio: a circular arrow with the number of seconds inside.
SheenSpeedPicker Music
The playback speed choice of long audio: one row of equal buttons, the chosen one filled.
SheenTag Music
One small label of a SheenTagRow; its tone picks the text colour (neutral by default).
SheenTagRow Music
Small facts under a row, as rounded labels that wrap: "Whole book · Ukrainian · 2 parts joined".
SheenTrackRow Music
One song in a list: its cover, title, artist and a short fact ("4.1M plays", "3:56"), with a save button and a menu button at the end.
SheenTransportControls Music
The row of a player's controls: shuffle, previous, play/pause on a large glass circle, next and repeat.

Enums

SheenRepeatMode Music
What repeats.
SheenTrackSave Music
Whether a song can be stored on the device, is being stored, or is stored.

Functions

currentSheenChapter(List<SheenChapter> chapters, Duration position) → int Music
The index of the chapter that holds position in chapters (sorted by start), or -1 when there are none or position is before the first.
formatSheenDuration(Duration d) → String Music
A time as a player shows it: 1:30, 0:05, 1:02:03, or -2:27 for time left.
formatSheenSpeed(double speed) → String Music
A playback speed as a player shows it: 1×, 1.25×, 0.8×.