сдано
This commit is contained in:
parent
f1d002f7dc
commit
6bbfbf2586
@ -39,11 +39,11 @@ class _MyHomePageState extends State<MyHomePage> {
|
|||||||
title: Text(widget.title),
|
title: Text(widget.title),
|
||||||
),
|
),
|
||||||
body: Padding(
|
body: Padding(
|
||||||
padding: EdgeInsets.all(30),
|
padding: const EdgeInsets.all(30),
|
||||||
child: ListView.separated(
|
child: ListView.separated(
|
||||||
itemBuilder: (context, index) =>
|
itemBuilder: (context, index) =>
|
||||||
Card(name: "test $index", price: 11.0),
|
Card(name: "test $index", price: 11.0),
|
||||||
separatorBuilder: (context, index) => SizedBox(height: 20),
|
separatorBuilder: (context, index) => const SizedBox(height: 20),
|
||||||
itemCount: 2,
|
itemCount: 2,
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
@ -73,7 +73,7 @@ class _CardState extends State<Card> {
|
|||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.only(top: 50, bottom: 15, left: 40, right: 40),
|
padding: const EdgeInsets.only(top: 50, bottom: 15, left: 40, right: 40),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(color: Colors.black12, width: 2),
|
border: Border.all(color: Colors.black12, width: 2),
|
||||||
borderRadius: BorderRadius.circular(20)),
|
borderRadius: BorderRadius.circular(20)),
|
||||||
@ -90,7 +90,7 @@ class _CardState extends State<Card> {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(widget.name, style: TextStyle(fontSize: 17)),
|
Text(widget.name, style: TextStyle(fontSize: 17)),
|
||||||
Text(widget.price.toString() + " Руб",
|
Text("${widget.price} Руб",
|
||||||
style: TextStyle(fontSize: 17, color: Colors.orange))
|
style: TextStyle(fontSize: 17, color: Colors.orange))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -105,8 +105,9 @@ class _CardState extends State<Card> {
|
|||||||
icon: Icon(_isFavourite ? Icons.favorite : Icons.favorite_border),
|
icon: Icon(_isFavourite ? Icons.favorite : Icons.favorite_border),
|
||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
onPressed: toggleIsFavourite,
|
onPressed: toggleIsFavourite,
|
||||||
))
|
)
|
||||||
|
)
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user