Flutter Product Card for E-commerce Grids
An e-commerce product card with a discount badge, name, price, star rating, and an add-to-cart button. Styled entirely with Wind UI utility classes and dark mode ready.
WDiv(
className: 'mx-auto max-w-xs flex flex-col rounded-2xl border bg-white border-gray-200 shadow-lg overflow-hidden dark:bg-gray-900 dark:border-gray-800',
children: [
WDiv(
className: 'relative h-40 w-full bg-gradient-to-br from-amber-200 to-orange-300 dark:from-amber-700 dark:to-orange-800',
children: [
WDiv(
className: 'flex items-center justify-center w-full h-40',
child: WIcon(
Icons.shopping_bag,
className: 'text-white text-6xl'
)
),
WDiv(
className: 'absolute top-3 left-3 rounded-full px-2.5 py-1 bg-rose-500 dark:bg-rose-600',
child: WText(
'-20%',
className: 'text-xs font-bold text-white'
)
),
],
),
WDiv(
className: 'flex flex-col gap-2 p-4',
children: [
WText(
'Wireless Headphones',
className: 'text-base font-semibold text-gray-900 dark:text-white'
),
WDiv(
className: 'flex flex-row items-center gap-1',
children: [
WIcon(
Icons.star_rate,
className: 'text-amber-400 text-sm'
),
WText(
'4.8',
className: 'text-sm font-medium text-gray-700 dark:text-gray-300'
),
WText(
'(214)',
className: 'text-xs text-gray-400 dark:text-gray-500'
),
],
),
WDiv(
className: 'flex flex-row items-center justify-between pt-1',
children: [
WDiv(
className: 'flex flex-row items-end gap-2',
children: [
WText(
'$79',
className: 'text-xl font-extrabold text-gray-900 dark:text-white'
),
WText(
'$99',
className: 'text-sm font-medium line-through text-gray-400 dark:text-gray-500'
)
]
),
WButton(
className: 'rounded-xl p-2.5 bg-indigo-600 hover:bg-indigo-500 dark:bg-indigo-500 dark:hover:bg-indigo-400',
child: WIcon(
Icons.shopping_cart,
className: 'text-white text-lg'
)
),
],
),
],
),
],
)
Benzer örnekler
-
Flutter Grocery List Card with Quantity Pills and Running Total
A shared shopping list where checked items strike through, each row carries a quantity pill and a price, and the footer tracks the running total against the weekly budget. Wind line-through and pill utilities, no state package required.
-
Flutter Cafe Loyalty Stamp Card with Reward Progress
A digital coffee-shop loyalty card built with Wind for Flutter: a fill-the-grid stamp collection, a stamps-earned counter chip, and a redeem call to action. Shows how to build retail rewards UI with Tailwind-style className utilities and dark-mode-ready color pairs.
-
Flutter Real Estate Property Listing Card with Photo Header
A real estate property listing card with a gradient photo header, price overlay, location, beds, baths, and area stats, plus a details call to action. Responsive Wind layout with dark mode.