55 lines
1.7 KiB
Dart
55 lines
1.7 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:nekoya_flutter/screens/productcoba.dart';
|
|
import 'package:nekoya_flutter/components/details_screen.dart';
|
|
|
|
import '../utils/utils.dart';
|
|
import 'product_card.dart';
|
|
import 'section_title.dart';
|
|
|
|
class NewArrivalProducts extends StatelessWidget {
|
|
const NewArrivalProducts({
|
|
Key? key,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Column(
|
|
children: [
|
|
Padding(
|
|
padding: const EdgeInsets.symmetric(vertical: defaultPadding),
|
|
child: SectionTitle(
|
|
title: "New Arrival",
|
|
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: () {
|
|
Navigator.push(
|
|
context,
|
|
MaterialPageRoute(
|
|
builder: (context) =>
|
|
DetailsScreen(product: demoProduct[index]),
|
|
));
|
|
},
|
|
),
|
|
),
|
|
),
|
|
),
|
|
)
|
|
],
|
|
);
|
|
}
|
|
}
|