Flutter Smart Home Device Control Card with Toggles
A smart home control card listing room devices with colored icon tiles, status labels, and on/off toggle switches. Built with Wind utility classes and dark-mode pairs.
main.dart
WDiv(
className: 'max-w-sm w-full mx-auto p-5 rounded-3xl bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-800 shadow-xl',
children: [
WDiv(
className: 'flex flex-row items-center justify-between w-full mb-4',
children: [
WDiv(
className: 'flex flex-col',
children: [
WText(
'Living Room',
className: 'text-gray-900 dark:text-white text-lg font-bold'
),
WText(
'3 devices active',
className: 'text-gray-400 dark:text-gray-500 text-xs'
),
],
),
WButton(
className: 'w-9 h-9 rounded-full bg-indigo-50 dark:bg-indigo-950 flex flex-row items-center justify-center',
child: WIcon(
Icons.home,
className: 'text-indigo-600 dark:text-indigo-400 text-base'
),
),
],
),
WDiv(
className: 'flex flex-row items-center justify-between w-full py-2',
children: [
WDiv(
className: 'flex flex-row items-center',
children: [
WDiv(
className: 'w-10 h-10 rounded-xl bg-amber-100 dark:bg-amber-950 flex flex-row items-center justify-center mr-3',
child: WIcon(
Icons.flash_on,
className: 'text-amber-600 dark:text-amber-400 text-lg'
),
),
WDiv(
className: 'flex flex-col',
children: [
WText(
'Ceiling Lights',
className: 'text-gray-900 dark:text-white text-sm font-semibold'
),
WText(
'Warm white, 80%',
className: 'text-gray-400 dark:text-gray-500 text-xs'
),
],
),
],
),
WButton(
className: 'w-12 h-7 rounded-full bg-indigo-600 dark:bg-indigo-500',
child: WDiv(
className: 'flex flex-row items-center justify-end w-full h-full px-1',
child: WDiv(
className: 'w-5 h-5 rounded-full bg-white dark:bg-white',
children: []
),
),
),
],
),
WDiv(
className: 'h-px w-full bg-gray-100 dark:bg-gray-800',
children: []
),
WDiv(
className: 'flex flex-row items-center justify-between w-full py-2',
children: [
WDiv(
className: 'flex flex-row items-center',
children: [
WDiv(
className: 'w-10 h-10 rounded-xl bg-sky-100 dark:bg-sky-950 flex flex-row items-center justify-center mr-3',
child: WIcon(
Icons.air,
className: 'text-sky-600 dark:text-sky-400 text-lg'
),
),
WDiv(
className: 'flex flex-col',
children: [
WText(
'Air Purifier',
className: 'text-gray-900 dark:text-white text-sm font-semibold'
),
WText(
'Auto mode',
className: 'text-gray-400 dark:text-gray-500 text-xs'
),
],
),
],
),
WButton(
className: 'w-12 h-7 rounded-full bg-indigo-600 dark:bg-indigo-500',
child: WDiv(
className: 'flex flex-row items-center justify-end w-full h-full px-1',
child: WDiv(
className: 'w-5 h-5 rounded-full bg-white dark:bg-white',
children: []
),
),
),
],
),
WDiv(
className: 'h-px w-full bg-gray-100 dark:bg-gray-800',
children: []
),
WDiv(
className: 'flex flex-row items-center justify-between w-full py-2',
children: [
WDiv(
className: 'flex flex-row items-center',
children: [
WDiv(
className: 'w-10 h-10 rounded-xl bg-gray-100 dark:bg-gray-800 flex flex-row items-center justify-center mr-3',
child: WIcon(
Icons.volume_up,
className: 'text-gray-500 dark:text-gray-400 text-lg'
),
),
WDiv(
className: 'flex flex-col',
children: [
WText(
'Smart Speaker',
className: 'text-gray-500 dark:text-gray-400 text-sm font-semibold'
),
WText(
'Off',
className: 'text-gray-400 dark:text-gray-500 text-xs'
),
],
),
],
),
WButton(
className: 'w-12 h-7 rounded-full bg-gray-300 dark:bg-gray-700',
child: WDiv(
className: 'flex flex-row items-center justify-start w-full h-full px-1',
child: WDiv(
className: 'w-5 h-5 rounded-full bg-white dark:bg-white',
children: []
),
),
),
],
),
],
)
Stats
- Views
- 2
- Stars
- 0
- Revisions
- 2
- Size
- 5,096 chars
- Created
- Jun 24, 2026
Revisions