app/lib/components/popular_products.dart
2022-05-14 23:44:03 +07:00

47 lines
1.3 KiB
Dart

import 'package:flutter/material.dart';
import 'package:nekoya_flutter/screens/productcoba.dart';
import '../utils/utils.dart';
import 'product_card.dart';
import 'section_title.dart';
class PopularProducts extends StatelessWidget {
const PopularProducts({
Key? key,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Column(
children: [
Padding(
padding: const EdgeInsets.symmetric(vertical: defaultPadding),
child: SectionTitle(
title: "Popular",
pressSeeAll: () {},
),
),
SingleChildScrollView(
physics: const BouncingScrollPhysics(
parent: AlwaysScrollableScrollPhysics()),
scrollDirection: Axis.horizontal,
child: Row(
children: List.generate(
demoProduct.length,
(index) => Padding(
padding: const EdgeInsets.only(right: defaultPadding),
child: ProductCard(
title: demoProduct[index].title,
image: demoProduct[index].image,
price: demoProduct[index].price,
bgColor: demoProduct[index].bgColor,
press: () {},
),
),
),
),
)
],
);
}
}