Skip to content
Türkçe
All snippets

A hydration dial that makes every glass count

Show daily water intake against a personal goal, with twelve glass-sized ticks and a one-tap logging control. A rounded-full gauge keeps the total readable while undo stays within reach.

  • WDiv
  • WText
  • WButton
  • WIcon
preview
a_hydration_dial_that_makes_every_glass_sy1uwq.dart
WDiv(
  className: '''
    w-full px-8 py-8
    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('Water today', className: '''
        text-base font-medium
        text-neutral-300 dark:text-neutral-300
      '''),
      WText('Your daily goal: 3 litres', className: 'text-sm text-neutral-400 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('1.75', className: '''
          text-6xl font-light
          text-white dark:text-white
        '''),
        WText('litres logged', className: 'text-sm text-neutral-400 dark:text-neutral-400'),
      ],
    ),
    WDiv(className: 'flex flex-col items-center gap-3', children: [
      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-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: '''
          w-1.5 h-6 rounded-full
          bg-neutral-700 dark:bg-neutral-700
        '''),
      ]),
      WText('7 of 12 glasses · 250 ml each', className: 'text-sm text-neutral-400 dark:text-neutral-400'),
    ]),
    WDiv(className: 'flex flex-row items-center gap-6', children: [
      WButton(
        onTap: () {},
        semanticLabel: 'Undo last glass',
        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-white dark:focus:ring-white
        ''',
        child: WIcon(Icons.undo, className: 'size-6 text-neutral-200 dark:text-neutral-200'),
      ),
      WButton(
        onTap: () {},
        semanticLabel: 'Log 250 ml of water',
        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-white dark:focus:ring-white
        ''',
        child: WIcon(Icons.add, className: 'size-6 text-neutral-950 dark:text-neutral-950'),
      ),
    ]),
  ],
)
  • A screen-time stop that meets you at your daily limit

    Make the daily scrolling limit a moment to act, not another report to ignore. A full-colour stop sign with four oversized lines and one clear exit, built with WButton.

    • WDiv
    • WIcon
    • WText
    • WButton
  • A repair tracker that makes warranty coverage clear

    Give a jacket repair a visible path from arrival to return, with the covered cost confirmed at the approval step. A tinted route and connected w-0.5 rail make the current stage easy to find without another support message.

    • WDiv
    • WText
  • A multisport calendar that makes the ride-to-run handoff clear

    Keep a brick workout in order with a seven-day strip and duration-sized session blocks. Today's ride, transition and run stay together on a tinted calendar, with grid-cols-7 keeping the week readable at phone width.

    • WDiv
    • WText
    • WButton