Flutter Medication Schedule Card with Dose Reminders

A daily medication adherence card built with Wind for Flutter: an adherence progress bar, a taken-count chip, and per-drug rows showing a category color dot, name and dose, and a state chip (taken with time, missed, or upcoming) above a log-dose button. A clinical prescription tracker using Tailwind-style className utilities with dark-mode pairs.

Anılcan Çakır by Anılcan Çakır 4 views 0 stars 1 day ago Rev 1
Flutter Medication Schedule Card with Dose Reminders preview
main.dart
WDiv(
  className: 'max-w-sm w-full rounded-3xl bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-800 shadow-xl p-6',
  children: [
    WDiv(
      className: 'flex flex-row items-center justify-between w-full',
      children: [
        WDiv(
          className: 'flex flex-col',
          children: [
            WText(
              'Medication Schedule',
              className: 'text-lg font-bold text-gray-900 dark:text-white'
            ),
            WText(
              'Thursday, July 24',
              className: 'text-xs text-gray-500 dark:text-gray-400'
            ),
          ],
        ),
        WDiv(
          className: 'px-3 py-1 rounded-full bg-emerald-100 dark:bg-emerald-800',
          child: WText(
            '3 of 5 taken',
            className: 'text-xs font-semibold text-emerald-700 dark:text-emerald-100'
          ),
        ),
      ],
    ),
    WDiv(
      className: 'flex flex-row items-center w-full h-2 rounded-full bg-gray-200 dark:bg-gray-700 mt-4',
      child: WDiv(
        className: 'h-2 w-[202px] rounded-full bg-emerald-500 dark:bg-emerald-400'
      ),
    ),
    WDiv(
      className: 'flex flex-col gap-4 w-full mt-6',
      children: [
        WDiv(
          className: 'flex flex-row items-center justify-between w-full',
          children: [
            WDiv(
              className: 'flex flex-row items-center',
              children: [
                WDiv(
                  className: 'w-2.5 h-2.5 rounded-full bg-blue-500 dark:bg-blue-400'
                ),
                WDiv(
                  className: 'flex flex-col ml-3',
                  children: [
                    WText(
                      'Metformin',
                      className: 'text-sm font-semibold text-gray-900 dark:text-white'
                    ),
                    WText(
                      '500 mg  |  with breakfast',
                      className: 'text-xs text-gray-400 dark:text-gray-500'
                    ),
                  ],
                ),
              ],
            ),
            WDiv(
              className: 'flex flex-row items-center px-2.5 py-1 rounded-full bg-emerald-100 dark:bg-emerald-800',
              children: [
                WIcon(
                  Icons.check_circle,
                  className: 'text-emerald-600 dark:text-emerald-300 text-sm'
                ),
                WText(
                  '08:00',
                  className: 'text-xs font-semibold text-emerald-700 dark:text-emerald-100 ml-1'
                ),
              ],
            ),
          ],
        ),
        WDiv(
          className: 'flex flex-row items-center justify-between w-full',
          children: [
            WDiv(
              className: 'flex flex-row items-center',
              children: [
                WDiv(
                  className: 'w-2.5 h-2.5 rounded-full bg-violet-500 dark:bg-violet-400'
                ),
                WDiv(
                  className: 'flex flex-col ml-3',
                  children: [
                    WText(
                      'Lisinopril',
                      className: 'text-sm font-semibold text-gray-900 dark:text-white'
                    ),
                    WText(
                      '10 mg  |  morning',
                      className: 'text-xs text-gray-400 dark:text-gray-500'
                    ),
                  ],
                ),
              ],
            ),
            WDiv(
              className: 'flex flex-row items-center px-2.5 py-1 rounded-full bg-emerald-100 dark:bg-emerald-800',
              children: [
                WIcon(
                  Icons.check_circle,
                  className: 'text-emerald-600 dark:text-emerald-300 text-sm'
                ),
                WText(
                  '08:00',
                  className: 'text-xs font-semibold text-emerald-700 dark:text-emerald-100 ml-1'
                ),
              ],
            ),
          ],
        ),
        WDiv(
          className: 'flex flex-row items-center justify-between w-full',
          children: [
            WDiv(
              className: 'flex flex-row items-center',
              children: [
                WDiv(
                  className: 'w-2.5 h-2.5 rounded-full bg-amber-500 dark:bg-amber-400'
                ),
                WDiv(
                  className: 'flex flex-col ml-3',
                  children: [
                    WText(
                      'Vitamin D',
                      className: 'text-sm font-semibold text-gray-900 dark:text-white'
                    ),
                    WText(
                      '2000 IU  |  with lunch',
                      className: 'text-xs text-gray-400 dark:text-gray-500'
                    ),
                  ],
                ),
              ],
            ),
            WDiv(
              className: 'flex flex-row items-center px-2.5 py-1 rounded-full bg-emerald-100 dark:bg-emerald-800',
              children: [
                WIcon(
                  Icons.check_circle,
                  className: 'text-emerald-600 dark:text-emerald-300 text-sm'
                ),
                WText(
                  '13:00',
                  className: 'text-xs font-semibold text-emerald-700 dark:text-emerald-100 ml-1'
                ),
              ],
            ),
          ],
        ),
        WDiv(
          className: 'flex flex-row items-center justify-between w-full',
          children: [
            WDiv(
              className: 'flex flex-row items-center',
              children: [
                WDiv(
                  className: 'w-2.5 h-2.5 rounded-full bg-rose-500 dark:bg-rose-400'
                ),
                WDiv(
                  className: 'flex flex-col ml-3',
                  children: [
                    WText(
                      'Atorvastatin',
                      className: 'text-sm font-semibold text-gray-900 dark:text-white'
                    ),
                    WText(
                      '20 mg  |  with lunch',
                      className: 'text-xs text-gray-400 dark:text-gray-500'
                    ),
                  ],
                ),
              ],
            ),
            WDiv(
              className: 'flex flex-row items-center px-2.5 py-1 rounded-full bg-rose-100 dark:bg-rose-900',
              children: [
                WIcon(
                  Icons.bolt,
                  className: 'text-rose-600 dark:text-rose-300 text-sm'
                ),
                WText(
                  'Missed',
                  className: 'text-xs font-semibold text-rose-700 dark:text-rose-200 ml-1'
                ),
              ],
            ),
          ],
        ),
        WDiv(
          className: 'flex flex-row items-center justify-between w-full',
          children: [
            WDiv(
              className: 'flex flex-row items-center',
              children: [
                WDiv(
                  className: 'w-2.5 h-2.5 rounded-full bg-indigo-500 dark:bg-indigo-400'
                ),
                WDiv(
                  className: 'flex flex-col ml-3',
                  children: [
                    WText(
                      'Melatonin',
                      className: 'text-sm font-semibold text-gray-900 dark:text-white'
                    ),
                    WText(
                      '5 mg  |  bedtime',
                      className: 'text-xs text-gray-400 dark:text-gray-500'
                    ),
                  ],
                ),
              ],
            ),
            WDiv(
              className: 'flex flex-row items-center px-2.5 py-1 rounded-full bg-gray-100 dark:bg-gray-800',
              children: [
                WIcon(
                  Icons.schedule,
                  className: 'text-gray-500 dark:text-gray-400 text-sm'
                ),
                WText(
                  '22:30',
                  className: 'text-xs font-semibold text-gray-600 dark:text-gray-300 ml-1'
                ),
              ],
            ),
          ],
        ),
      ],
    ),
    WButton(
      className: 'w-full mt-6 rounded-2xl bg-emerald-600 dark:bg-emerald-500 py-3',
      child: WText(
        'Log Next Dose',
        className: 'text-white text-center font-semibold text-sm'
      ),
    ),
  ],
)
Stats
Views
4
Stars
0
Revisions
1
Size
8,392 chars
Created
Jul 24, 2026