payment method
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../common/theme/theme.dart';
|
||||
import '../../../domain/payment_method/payment_method.dart';
|
||||
|
||||
class PaymentCard extends StatelessWidget {
|
||||
final PaymentMethod payment;
|
||||
final bool isSelected;
|
||||
final Function(bool)? onSelected;
|
||||
const PaymentCard({
|
||||
super.key,
|
||||
required this.payment,
|
||||
required this.isSelected,
|
||||
this.onSelected,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ChoiceChip(
|
||||
label: Text(payment.name),
|
||||
selected: isSelected,
|
||||
onSelected: onSelected,
|
||||
selectedColor: AppColor.primary,
|
||||
backgroundColor: AppColor.white,
|
||||
labelStyle: TextStyle(
|
||||
color: isSelected ? AppColor.white : AppColor.primary,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
checkmarkColor: AppColor.white,
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(color: AppColor.primary),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user