|
|
|
@ -33,11 +33,11 @@ class _PaymentMethodState extends State<PaymentMethod> {
|
|
|
|
|
child: Container(
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.fromLTRB(0.0, 15.0, 0.0, 0.0),
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
margin: EdgeInsets.fromLTRB(4, 15.0, 4, 0.0),
|
|
|
|
|
|
|
|
|
|
child: Text(TranslationBase.of(context).selectPaymentOption, style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold)),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
@ -52,26 +52,48 @@ class _PaymentMethodState extends State<PaymentMethod> {
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
side: selectedPaymentMethod == "MADA" ? BorderSide(color: Colors.green, width: 5.0) : BorderSide(color: Colors.transparent, width: 0.0),
|
|
|
|
|
side: selectedPaymentMethod == "MADA" ? BorderSide(color: Colors.green, width: 2.0) : BorderSide(color: Colors.transparent, width: 0.0),
|
|
|
|
|
),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
height: 60.0,
|
|
|
|
|
width: 60,
|
|
|
|
|
padding: EdgeInsets.all(7.0),
|
|
|
|
|
child: Image.asset("assets/images/new/payment/Mada.png"),
|
|
|
|
|
),
|
|
|
|
|
mWidth(12),
|
|
|
|
|
Text(
|
|
|
|
|
"Mada",
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.all(12.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
width: 24,
|
|
|
|
|
height: 24,
|
|
|
|
|
decoration: containerColorRadiusBorderWidth(selectedPaymentMethod == "MADA" ? CustomColors.accentColor : Colors.transparent, 100, Colors.grey, 0.5),
|
|
|
|
|
),
|
|
|
|
|
mWidth(12),
|
|
|
|
|
Container(
|
|
|
|
|
height: 60.0,
|
|
|
|
|
width: 60,
|
|
|
|
|
padding: EdgeInsets.all(7.0),
|
|
|
|
|
child: Image.asset("assets/images/new/payment/Mada.png"),
|
|
|
|
|
),
|
|
|
|
|
mWidth(12),
|
|
|
|
|
Text(
|
|
|
|
|
"Mada",
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
mFlex(1),
|
|
|
|
|
if (selectedPaymentMethod == "MADA")
|
|
|
|
|
Container(
|
|
|
|
|
decoration: containerRadius(CustomColors.green, 200),
|
|
|
|
|
padding: EdgeInsets.only(top: 6, bottom: 6, left: 12, right: 12),
|
|
|
|
|
child: Text(
|
|
|
|
|
"Selected",
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: 11,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
@ -90,24 +112,45 @@ class _PaymentMethodState extends State<PaymentMethod> {
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
side: selectedPaymentMethod == "VISA" ? BorderSide(color: Colors.green, width: 5.0) : BorderSide(color: Colors.transparent, width: 0.0),
|
|
|
|
|
),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
height: 60.0,
|
|
|
|
|
padding: EdgeInsets.all(7.0),
|
|
|
|
|
width: 60,
|
|
|
|
|
child: Image.asset("assets/images/new/payment/visa.png"),
|
|
|
|
|
),
|
|
|
|
|
mWidth(12),
|
|
|
|
|
Text(
|
|
|
|
|
"VISA",
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.all(12.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
width: 24,
|
|
|
|
|
height: 24,
|
|
|
|
|
decoration: containerColorRadiusBorderWidth(selectedPaymentMethod == "VISA" ? CustomColors.accentColor : Colors.transparent, 100, Colors.grey, 0.5),
|
|
|
|
|
),
|
|
|
|
|
mWidth(12),
|
|
|
|
|
Container(
|
|
|
|
|
height: 60.0,
|
|
|
|
|
padding: EdgeInsets.all(7.0),
|
|
|
|
|
width: 60,
|
|
|
|
|
child: Image.asset("assets/images/new/payment/visa.png"),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
mWidth(12),
|
|
|
|
|
Text(
|
|
|
|
|
"VISA",
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
), mFlex(1),
|
|
|
|
|
if (selectedPaymentMethod == "VISA")
|
|
|
|
|
Container(
|
|
|
|
|
decoration: containerRadius(CustomColors.green, 200),
|
|
|
|
|
padding: EdgeInsets.only(top: 6, bottom: 6, left: 12, right: 12),
|
|
|
|
|
child: Text(
|
|
|
|
|
"Selected",
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: 11,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
@ -126,24 +169,45 @@ class _PaymentMethodState extends State<PaymentMethod> {
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
side: selectedPaymentMethod == "MASTERCARD" ? BorderSide(color: Colors.green, width: 5.0) : BorderSide(color: Colors.transparent, width: 0.0),
|
|
|
|
|
),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
height: 60.0,
|
|
|
|
|
padding: EdgeInsets.all(7.0),
|
|
|
|
|
width: 60,
|
|
|
|
|
child: Image.asset("assets/images/new/payment/Mastercard.png"),
|
|
|
|
|
),
|
|
|
|
|
mWidth(12),
|
|
|
|
|
Text(
|
|
|
|
|
"MasterCard",
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.all(12.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
width: 24,
|
|
|
|
|
height: 24,
|
|
|
|
|
decoration: containerColorRadiusBorderWidth(selectedPaymentMethod == "MASTERCARD" ? CustomColors.accentColor : Colors.transparent, 100, Colors.grey, 0.5),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
mWidth(12),
|
|
|
|
|
Container(
|
|
|
|
|
height: 60.0,
|
|
|
|
|
padding: EdgeInsets.all(7.0),
|
|
|
|
|
width: 60,
|
|
|
|
|
child: Image.asset("assets/images/new/payment/Mastercard.png"),
|
|
|
|
|
),
|
|
|
|
|
mWidth(12),
|
|
|
|
|
Text(
|
|
|
|
|
"MasterCard",
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
), mFlex(1),
|
|
|
|
|
if (selectedPaymentMethod == "MASTERCARD")
|
|
|
|
|
Container(
|
|
|
|
|
decoration: containerRadius(CustomColors.green, 200),
|
|
|
|
|
padding: EdgeInsets.only(top: 6, bottom: 6, left: 12, right: 12),
|
|
|
|
|
child: Text(
|
|
|
|
|
"Selected",
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: 11,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
@ -162,24 +226,45 @@ class _PaymentMethodState extends State<PaymentMethod> {
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
side: selectedPaymentMethod == "Installment" ? BorderSide(color: Colors.green, width: 5.0) : BorderSide(color: Colors.transparent, width: 0.0),
|
|
|
|
|
),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
height: 60.0,
|
|
|
|
|
padding: EdgeInsets.all(7.0),
|
|
|
|
|
width: 60,
|
|
|
|
|
child: Image.asset("assets/images/new/payment/installments.png"),
|
|
|
|
|
),
|
|
|
|
|
mWidth(12),
|
|
|
|
|
Text(
|
|
|
|
|
"Installments",
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.all(12.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
width: 24,
|
|
|
|
|
height: 24,
|
|
|
|
|
decoration: containerColorRadiusBorderWidth(selectedPaymentMethod == "Installment" ? CustomColors.accentColor : Colors.transparent, 100, Colors.grey, 0.5),
|
|
|
|
|
),
|
|
|
|
|
mWidth(12),
|
|
|
|
|
Container(
|
|
|
|
|
height: 60.0,
|
|
|
|
|
padding: EdgeInsets.all(7.0),
|
|
|
|
|
width: 60,
|
|
|
|
|
child: Image.asset("assets/images/new/payment/installments.png"),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
mWidth(12),
|
|
|
|
|
Text(
|
|
|
|
|
"Installments",
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
), mFlex(1),
|
|
|
|
|
if (selectedPaymentMethod == "Installment")
|
|
|
|
|
Container(
|
|
|
|
|
decoration: containerRadius(CustomColors.green, 200),
|
|
|
|
|
padding: EdgeInsets.only(top: 6, bottom: 6, left: 12, right: 12),
|
|
|
|
|
child: Text(
|
|
|
|
|
"Selected",
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: 11,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
@ -199,24 +284,45 @@ class _PaymentMethodState extends State<PaymentMethod> {
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
side: selectedPaymentMethod == "ApplePay" ? BorderSide(color: Colors.green, width: 5.0) : BorderSide(color: Colors.transparent, width: 0.0),
|
|
|
|
|
),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
height: 60.0,
|
|
|
|
|
padding: EdgeInsets.all(7.0),
|
|
|
|
|
width: 60,
|
|
|
|
|
child: Image.asset("assets/images/new/payment/Apple_Pay.png"),
|
|
|
|
|
),
|
|
|
|
|
mWidth(12),
|
|
|
|
|
Text(
|
|
|
|
|
"Apple Pay",
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.all(12.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
width: 24,
|
|
|
|
|
height: 24,
|
|
|
|
|
decoration: containerColorRadiusBorderWidth(selectedPaymentMethod == "ApplePay" ? CustomColors.accentColor : Colors.transparent, 100, Colors.grey, 0.5),
|
|
|
|
|
),
|
|
|
|
|
mWidth(12),
|
|
|
|
|
Container(
|
|
|
|
|
height: 60.0,
|
|
|
|
|
padding: EdgeInsets.all(7.0),
|
|
|
|
|
width: 60,
|
|
|
|
|
child: Image.asset("assets/images/new/payment/Apple_Pay.png"),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
mWidth(12),
|
|
|
|
|
Text(
|
|
|
|
|
"Apple Pay",
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
), mFlex(1),
|
|
|
|
|
if (selectedPaymentMethod == "ApplePay")
|
|
|
|
|
Container(
|
|
|
|
|
decoration: containerRadius(CustomColors.green, 200),
|
|
|
|
|
padding: EdgeInsets.only(top: 6, bottom: 6, left: 12, right: 12),
|
|
|
|
|
child: Text(
|
|
|
|
|
"Selected",
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontSize: 11,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
@ -279,7 +385,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
|
|
|
|
|
minWidth: MediaQuery.of(context).size.height * 0.1,
|
|
|
|
|
height: 45.0,
|
|
|
|
|
child: RaisedButton(
|
|
|
|
|
color: CustomColors.accentColor,
|
|
|
|
|
color: CustomColors.green,
|
|
|
|
|
textColor: Colors.white,
|
|
|
|
|
disabledTextColor: Colors.white,
|
|
|
|
|
disabledColor: new Color(0xFFbcc2c4),
|
|
|
|
|