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( 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: () { Navigator.push( context, MaterialPageRoute( builder: (context) => DetailsScreen(product: demo_product[index]), )); }, ), ), ), ), ) ], ); } }