A sleep timer that lets the chapter finish
Give bedtime listeners a clear stopping point: the current chapter ends before playback does. A quiet countdown, twelve progress ticks and two WButton controls keep the active timer easy to read and cancel.
WDiv(
className: '''
w-full px-8 py-10
flex flex-col items-center gap-6
bg-neutral-950 dark:bg-neutral-950
''',
children: [
WDiv(className: 'flex flex-col items-center gap-1', children: [
WText('Sleep timer', className: '''
text-base font-medium
text-neutral-300 dark:text-neutral-300
'''),
WText('Stops at the end of chapter 7', className: '''
text-sm
text-neutral-500 dark:text-neutral-400
'''),
]),
WDiv(
className: '''
size-64 rounded-full border-8
border-cyan-400 dark:border-cyan-400
flex flex-col items-center justify-center
''',
children: [
WText('08:24', className: '''
text-6xl font-light
text-white dark:text-white
'''),
WText('minutes left', className: 'text-sm text-neutral-400 dark:text-neutral-400'),
],
),
WDiv(className: 'flex flex-row items-end gap-2', children: [
WDiv(className: '''
w-1.5 h-6 rounded-full
bg-cyan-400 dark:bg-cyan-400
'''),
WDiv(className: '''
w-1.5 h-6 rounded-full
bg-cyan-400 dark:bg-cyan-400
'''),
WDiv(className: '''
w-1.5 h-6 rounded-full
bg-cyan-400 dark:bg-cyan-400
'''),
WDiv(className: '''
w-1.5 h-6 rounded-full
bg-cyan-400 dark:bg-cyan-400
'''),
WDiv(className: '''
w-1.5 h-6 rounded-full
bg-cyan-400 dark:bg-cyan-400
'''),
WDiv(className: '''
w-1.5 h-6 rounded-full
bg-cyan-400 dark:bg-cyan-400
'''),
WDiv(className: '''
w-1.5 h-6 rounded-full
bg-cyan-400 dark:bg-cyan-400
'''),
WDiv(className: '''
w-1.5 h-6 rounded-full
bg-cyan-400 dark:bg-cyan-400
'''),
WDiv(className: '''
w-1.5 h-6 rounded-full
bg-neutral-700 dark:bg-neutral-700
'''),
WDiv(className: '''
w-1.5 h-6 rounded-full
bg-neutral-700 dark:bg-neutral-700
'''),
WDiv(className: '''
w-1.5 h-6 rounded-full
bg-neutral-700 dark:bg-neutral-700
'''),
WDiv(className: '''
w-1.5 h-6 rounded-full
bg-neutral-700 dark:bg-neutral-700
'''),
]),
WDiv(className: 'flex flex-col items-center gap-1', children: [
WText('The Lantern Coast', className: '''
text-base font-medium
text-neutral-200 dark:text-neutral-200
'''),
WText('Chapter 7 of 18 · 1.0x speed', className: 'text-sm text-neutral-500 dark:text-neutral-400'),
]),
WDiv(className: 'flex flex-row items-center gap-6', children: [
WButton(
onTap: () {}, semanticLabel: 'Turn off sleep timer',
className: '''
size-14 rounded-full
flex items-center justify-center
bg-neutral-800 dark:bg-neutral-800
hover:bg-neutral-700 dark:hover:bg-neutral-700
focus:ring-2 focus:ring-cyan-400 dark:focus:ring-cyan-400
''',
child: WIcon(Icons.close, className: 'size-6 text-neutral-200 dark:text-neutral-200'),
),
WButton(
onTap: () {}, semanticLabel: 'Pause playback',
className: '''
size-14 rounded-full
flex items-center justify-center
bg-cyan-400 dark:bg-cyan-400
hover:bg-cyan-300 dark:hover:bg-cyan-300
focus:ring-2 focus:ring-cyan-200 dark:focus:ring-cyan-200
''',
child: WIcon(Icons.pause, className: 'size-6 text-neutral-950 dark:text-neutral-950'),
),
]),
],
)
More like this
-
A spare-change receipt that shows how everyday spending becomes savings
Make automatic savings easy to trust with an itemised spare-change receipt: three purchases, their round-ups and the exact amount moved to a travel fund. Paper styling and a heavy
h-1total rule keep every cent readable. -
A photo access receipt that makes limited permissions feel clear
Show people exactly what an app can see, not a wall of switches. A bold limited-access summary, readable permission states and real
WButtonactions make privacy tangible before the next upload. -
Live location sharing with a clear off switch
Make sharing feel safe: a bold expiry countdown, named recipients and a visible stop action put control first. A copy-ready location session card with
rounded-3xlsurfaces and paired light and dark tokens.