2022-05-13 06:02:53 +02:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:nekoya_flutter/screens/productcoba.dart';
|
|
|
|
|
2022-05-13 06:31:37 +02:00
|
|
|
import '../utils/utils.dart';
|
2022-05-13 06:02:53 +02:00
|
|
|
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(
|
|
|
|
demo_product.length,
|
|
|
|
(index) => Padding(
|
|
|
|
padding: const EdgeInsets.only(right: defaultPadding),
|
|
|
|
child: ProductCard(
|
|
|
|
title: demo_product[index].title,
|
|
|
|
image: demo_product[index].image,
|
|
|
|
price: demo_product[index].price,
|
|
|
|
bgColor: demo_product[index].bgColor,
|
|
|
|
press: () {},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|