This commit is contained in:
Вячеслав Иванов 2024-09-18 13:37:08 +04:00
parent b56181b1c4
commit f618e7e0e5

View File

@ -42,6 +42,7 @@ class _MyHomePageState extends State<MyHomePage> {
padding: const EdgeInsets.all(20),
child: ListView.separated(
itemBuilder: (context, index) => GestureDetector(
child: CardWidget(name: "Pizza $index", price: 150.0),
onTap: () {
Navigator.push(
context,
@ -53,10 +54,9 @@ class _MyHomePageState extends State<MyHomePage> {
),
);
},
child: CardWidget(name: "Pizza $index", price: 150.0),
),
separatorBuilder: (context, index) => const SizedBox(height: 20),
itemCount: 5,
itemCount: 10,
)));
}
}
@ -91,7 +91,7 @@ class _CardWidgetState extends State<CardWidget> {
return Container(
padding: const EdgeInsets.all(4),
decoration: BoxDecoration(
border: Border.all(color: Colors.black12, width: 2),
border: Border.all(color: Colors.deepOrangeAccent, width: 2),
borderRadius: BorderRadius.circular(20),
),
child: Row(