#sprint-1
This commit is contained in:
parent
d487fc2e06
commit
a10de7e98d
@ -7,12 +7,10 @@ class PrimaryCard extends StatefulWidget {
|
|||||||
required this.title,
|
required this.title,
|
||||||
required this.category,
|
required this.category,
|
||||||
required this.price,
|
required this.price,
|
||||||
this.onChange,
|
|
||||||
});
|
});
|
||||||
final String title;
|
final String title;
|
||||||
final String category;
|
final String category;
|
||||||
final String price;
|
final String price;
|
||||||
final Function(bool value)? onChange;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<PrimaryCard> createState() => _PrimaryCardState();
|
State<PrimaryCard> createState() => _PrimaryCardState();
|
||||||
@ -39,7 +37,7 @@ class _PrimaryCardState extends State<PrimaryCard> {
|
|||||||
style: captionSemibold.copyWith(color: captionColor),
|
style: captionSemibold.copyWith(color: captionColor),
|
||||||
),
|
),
|
||||||
SizedBox(height: 4),
|
SizedBox(height: 4),
|
||||||
Text(widget.price, style: title3Semibold),
|
Text("${widget.price} ₽", style: title3Semibold),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
inCart
|
inCart
|
||||||
@ -47,7 +45,6 @@ class _PrimaryCardState extends State<PrimaryCard> {
|
|||||||
onPressed: () {
|
onPressed: () {
|
||||||
setState(() {
|
setState(() {
|
||||||
inCart = !inCart;
|
inCart = !inCart;
|
||||||
widget.onChange!(inCart);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
size: 'small',
|
size: 'small',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user