fix labs
This commit is contained in:
parent
b56181b1c4
commit
f618e7e0e5
@ -42,6 +42,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
|||||||
padding: const EdgeInsets.all(20),
|
padding: const EdgeInsets.all(20),
|
||||||
child: ListView.separated(
|
child: ListView.separated(
|
||||||
itemBuilder: (context, index) => GestureDetector(
|
itemBuilder: (context, index) => GestureDetector(
|
||||||
|
child: CardWidget(name: "Pizza $index", price: 150.0),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
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),
|
separatorBuilder: (context, index) => const SizedBox(height: 20),
|
||||||
itemCount: 5,
|
itemCount: 10,
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -91,7 +91,7 @@ class _CardWidgetState extends State<CardWidget> {
|
|||||||
return Container(
|
return Container(
|
||||||
padding: const EdgeInsets.all(4),
|
padding: const EdgeInsets.all(4),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(color: Colors.black12, width: 2),
|
border: Border.all(color: Colors.deepOrangeAccent, width: 2),
|
||||||
borderRadius: BorderRadius.circular(20),
|
borderRadius: BorderRadius.circular(20),
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
|
Loading…
Reference in New Issue
Block a user