|
|
|
@ -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,10 +52,18 @@ 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: 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,
|
|
|
|
@ -70,12 +78,26 @@ class _PaymentMethodState extends State<PaymentMethod> {
|
|
|
|
|
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,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: InkWell(
|
|
|
|
@ -90,8 +112,16 @@ 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: 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),
|
|
|
|
@ -106,12 +136,25 @@ class _PaymentMethodState extends State<PaymentMethod> {
|
|
|
|
|
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,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: InkWell(
|
|
|
|
@ -126,8 +169,16 @@ 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: 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),
|
|
|
|
@ -142,12 +193,25 @@ class _PaymentMethodState extends State<PaymentMethod> {
|
|
|
|
|
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,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: InkWell(
|
|
|
|
@ -162,8 +226,16 @@ 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: 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),
|
|
|
|
@ -178,12 +250,25 @@ class _PaymentMethodState extends State<PaymentMethod> {
|
|
|
|
|
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,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Platform.isIOS
|
|
|
|
|
? Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
@ -199,8 +284,16 @@ 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: 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),
|
|
|
|
@ -215,11 +308,24 @@ class _PaymentMethodState extends State<PaymentMethod> {
|
|
|
|
|
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,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
// Container(
|
|
|
|
|
// margin: EdgeInsets.only(top: 25.0),
|
|
|
|
@ -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),
|
|
|
|
|