Flutter Purchase Order Card with Indented BOM Tree
A procurement card whose body is a real three-level bill of materials: parent assemblies, indented children, and connector rules drawn with left borders, each line carrying its quantity pill and rolled-up cost. Flags the short-stock part and totals at the foot, styled with Wind utility classes and full dark-mode pairs.
main.dart
WDiv(
className: 'max-w-sm rounded-3xl bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-800 p-6 shadow-xl',
children: [
WDiv(
className: 'flex flex-row items-center justify-between w-full',
children: [
WDiv(
className: 'flex flex-row items-center',
children: [
WDiv(
className: 'flex flex-row items-center justify-center w-11 h-11 rounded-2xl bg-slate-700 dark:bg-slate-600',
child: WIcon(
Icons.shopping_bag,
className: 'text-white text-xl'
),
),
WDiv(
className: 'flex flex-col ml-3',
children: [
WText(
'PO 4471 draft',
className: 'text-base font-bold text-gray-900 dark:text-white'
),
WText(
'Cart Frame Assembly | Rev C',
className: 'text-xs text-gray-500 dark:text-gray-400 mt-0.5'
),
],
),
],
),
WDiv(
className: 'rounded-full bg-amber-100 dark:bg-amber-500 px-2.5 py-1',
child: WText(
'Unapproved',
className: 'text-[11px] font-bold text-amber-700 dark:text-gray-900'
),
),
],
),
WDiv(
className: 'flex flex-row items-center justify-between w-full mt-6',
children: [
WText(
'BILL OF MATERIALS',
className: 'text-[10px] font-bold tracking-wide text-gray-400 dark:text-gray-500'
),
WText(
'3 levels | 6 lines',
className: 'text-[10px] font-semibold text-gray-500 dark:text-gray-400'
),
],
),
WDiv(
className: 'flex flex-row items-center justify-between w-full mt-2.5',
children: [
WDiv(
className: 'flex flex-row items-center',
children: [
WIcon(
Icons.expand_more,
className: 'text-gray-400 dark:text-gray-500 text-base'
),
WText(
'Cart Frame Assembly',
className: 'text-sm font-bold text-gray-900 dark:text-white ml-1'
),
],
),
WDiv(
className: 'rounded bg-slate-700 dark:bg-slate-600 px-1.5 py-0.5',
child: WText(
'x1',
className: 'text-[10px] font-bold text-white dark:text-white'
),
),
],
),
WDiv(
className: 'flex flex-col w-full border-l-2 border-gray-200 dark:border-gray-700 ml-2 pl-3 mt-1',
children: [
WDiv(
className: 'flex flex-row items-center justify-between w-full py-1.5',
children: [
WDiv(
className: 'flex flex-row items-center',
children: [
WIcon(
Icons.expand_more,
className: 'text-gray-400 dark:text-gray-500 text-sm'
),
WText(
'Steel Frame Weldment',
className: 'text-xs font-semibold text-gray-900 dark:text-white ml-1'
),
],
),
WDiv(
className: 'flex flex-row items-center',
children: [
WDiv(
className: 'rounded bg-gray-100 dark:bg-gray-800 px-1.5 py-0.5',
child: WText(
'x1',
className: 'text-[10px] font-bold text-gray-600 dark:text-gray-300'
),
),
WDiv(
className: 'ml-2',
child: WText(
'$61.40',
className: 'text-xs font-bold text-gray-900 dark:text-white'
),
),
],
),
],
),
WDiv(
className: 'flex flex-col w-full border-l-2 border-gray-200 dark:border-gray-700 ml-2 pl-3',
children: [
WDiv(
className: 'flex flex-row items-center justify-between w-full py-1.5',
children: [
WDiv(
className: 'flex flex-row items-center',
children: [
WDiv(
className: 'w-1.5 h-1.5 rounded-full bg-gray-300 dark:bg-gray-600'
),
WText(
'Steel Tube 25mm',
className: 'text-xs text-gray-700 dark:text-gray-300 ml-2'
),
],
),
WDiv(
className: 'flex flex-row items-center',
children: [
WDiv(
className: 'rounded bg-gray-100 dark:bg-gray-800 px-1.5 py-0.5',
child: WText(
'x4',
className: 'text-[10px] font-bold text-gray-600 dark:text-gray-300'
),
),
WDiv(
className: 'ml-2',
child: WText(
'$12.80',
className: 'text-xs font-semibold text-gray-600 dark:text-gray-300'
),
),
],
),
],
),
WDiv(
className: 'flex flex-row items-center justify-between w-full py-1.5',
children: [
WDiv(
className: 'flex flex-row items-center',
children: [
WDiv(
className: 'w-1.5 h-1.5 rounded-full bg-amber-400 dark:bg-amber-400'
),
WText(
'Corner Bracket 4mm',
className: 'text-xs text-gray-700 dark:text-gray-300 ml-2'
),
],
),
WDiv(
className: 'flex flex-row items-center',
children: [
WDiv(
className: 'rounded bg-amber-100 dark:bg-amber-600 px-1.5 py-0.5',
child: WText(
'x8',
className: 'text-[10px] font-bold text-amber-700 dark:text-white'
),
),
WDiv(
className: 'ml-2',
child: WText(
'$6.80',
className: 'text-xs font-semibold text-gray-600 dark:text-gray-300'
),
),
],
),
],
),
],
),
WDiv(
className: 'flex flex-row items-center justify-between w-full py-1.5',
children: [
WDiv(
className: 'flex flex-row items-center',
children: [
WDiv(
className: 'w-1.5 h-1.5 rounded-full bg-gray-300 dark:bg-gray-600'
),
WText(
'Caster Wheel Kit 75mm',
className: 'text-xs text-gray-700 dark:text-gray-300 ml-2'
),
],
),
WDiv(
className: 'flex flex-row items-center',
children: [
WDiv(
className: 'rounded bg-gray-100 dark:bg-gray-800 px-1.5 py-0.5',
child: WText(
'x4',
className: 'text-[10px] font-bold text-gray-600 dark:text-gray-300'
),
),
WDiv(
className: 'ml-2',
child: WText(
'$25.60',
className: 'text-xs font-semibold text-gray-600 dark:text-gray-300'
),
),
],
),
],
),
WDiv(
className: 'flex flex-row items-center justify-between w-full py-1.5',
children: [
WDiv(
className: 'flex flex-row items-center',
children: [
WDiv(
className: 'w-1.5 h-1.5 rounded-full bg-gray-300 dark:bg-gray-600'
),
WText(
'Fastener Pack M8',
className: 'text-xs text-gray-700 dark:text-gray-300 ml-2'
),
],
),
WDiv(
className: 'flex flex-row items-center',
children: [
WDiv(
className: 'rounded bg-gray-100 dark:bg-gray-800 px-1.5 py-0.5',
child: WText(
'x1',
className: 'text-[10px] font-bold text-gray-600 dark:text-gray-300'
),
),
WDiv(
className: 'ml-2',
child: WText(
'$11.90',
className: 'text-xs font-semibold text-gray-600 dark:text-gray-300'
),
),
],
),
],
),
],
),
WDiv(
className: 'flex flex-row items-center w-full rounded-2xl bg-amber-50 dark:bg-gray-800 border border-amber-200 dark:border-amber-500 p-3 mt-4',
children: [
WDiv(
className: 'flex flex-row items-center justify-center w-9 h-9 rounded-full bg-white dark:bg-gray-900',
child: WIcon(
Icons.warning,
className: 'text-amber-500 dark:text-amber-400 text-sm'
),
),
WDiv(
className: 'flex flex-col ml-3',
children: [
WText(
'Corner Bracket: 6 of 8 in stock',
className: 'text-xs font-semibold text-gray-900 dark:text-white'
),
WText(
'Lead time 9 days from VK-12',
className: 'text-[11px] text-gray-500 dark:text-gray-400 mt-0.5'
),
],
),
],
),
WDiv(
className: 'w-full border-t border-gray-200 dark:border-gray-700 mt-4'
),
WDiv(
className: 'flex flex-row items-center justify-between w-full mt-3',
children: [
WText(
'Rolled up cost',
className: 'text-xs font-semibold text-gray-500 dark:text-gray-400'
),
WText(
'$98.90',
className: 'text-lg font-bold text-gray-900 dark:text-white'
),
],
),
WDiv(
className: 'w-full mt-4',
child: WButton(
className: 'flex flex-row items-center justify-center w-full rounded-2xl bg-slate-700 dark:bg-slate-600 py-3.5',
child: WText(
'Generate Purchase Order',
className: 'text-sm font-bold text-white dark:text-white'
),
),
),
WDiv(
className: 'flex flex-row items-center justify-center w-full mt-3',
child: WText(
'Vendor VK-12 Nordmetall | Needed Aug 22',
className: 'text-[11px] text-gray-400 dark:text-gray-500'
),
),
],
)
Stats
- Views
- 67
- Stars
- 0
- Revisions
- 1
- Size
- 11,216 chars
- Created
- Aug 5, 2026