46 lines
1.2 KiB
Dart
46 lines
1.2 KiB
Dart
import 'package:flutter/material.dart';
|
||
import 'package:flutter_svg/svg.dart';
|
||
import 'package:ui_kit/ui_kit.dart';
|
||
|
||
class CartButton extends StatefulWidget {
|
||
const CartButton({super.key, required this.fullPrice});
|
||
final String fullPrice;
|
||
|
||
@override
|
||
State<CartButton> createState() => _CartButtonState();
|
||
}
|
||
|
||
class _CartButtonState extends State<CartButton> {
|
||
@override
|
||
Widget build(BuildContext context) {
|
||
return Container(
|
||
decoration: BoxDecoration(
|
||
color: primaryColor,
|
||
borderRadius: BorderRadius.circular(10),
|
||
),
|
||
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
||
child: Row(
|
||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||
children: [
|
||
Expanded(
|
||
child: Row(
|
||
children: [
|
||
SvgPicture.asset('assets/cart.svg'),
|
||
SizedBox(width: 16),
|
||
Text(
|
||
'В корзину',
|
||
style: title3Semibold.copyWith(color: whiteColor),
|
||
),
|
||
],
|
||
),
|
||
),
|
||
Text(
|
||
'${widget.fullPrice} ₽',
|
||
style: title3Semibold.copyWith(color: whiteColor),
|
||
),
|
||
],
|
||
),
|
||
);
|
||
}
|
||
}
|