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