Covid New Design 2

merge-requests/400/merge
Mirza.Shafique 4 years ago
parent 5b330b2a25
commit b80e2ea16e

@ -2,6 +2,7 @@ import 'dart:io';
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
@ -36,115 +37,146 @@ class _PaymentMethodState extends State<PaymentMethod> {
child: Text(TranslationBase.of(context).selectPaymentOption, style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold)), child: Text(TranslationBase.of(context).selectPaymentOption, style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 25.0), width: double.infinity,
child: Flex( child: InkWell(
direction: Axis.horizontal, onTap: () {
children: <Widget>[ updateSelectedPaymentMethod("MADA");
Expanded( },
child: Container( child: Card(
child: InkWell( elevation: 3.0,
onTap: () { margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
updateSelectedPaymentMethod("MADA"); color: Colors.white,
}, shape: RoundedRectangleBorder(
child: Card( borderRadius: BorderRadius.circular(10),
elevation: 3.0, side: selectedPaymentMethod == "MADA" ? BorderSide(color: Colors.green, width: 5.0) : BorderSide(color: Colors.transparent, width: 0.0),
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
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),
),
child: Container(
height: 120.0,
padding: EdgeInsets.all(7.0),
width: MediaQuery.of(context).size.width * 0.45,
child: Image.asset("assets/images/new-design/mada.png"),
),
),
),
),
), ),
Expanded( child: Row(
child: Container( children: [
child: InkWell( Container(
onTap: () { height: 60.0,
updateSelectedPaymentMethod("VISA"); width:60,
}, padding: EdgeInsets.all(7.0),
child: Card( child: Image.asset("assets/images/new-design/mada.png"),
elevation: 3.0,
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
side: selectedPaymentMethod == "VISA" ? BorderSide(color: Colors.green, width: 5.0) : BorderSide(color: Colors.transparent, width: 0.0),
),
child: Container(
height: 120.0,
padding: EdgeInsets.all(7.0),
width: MediaQuery.of(context).size.width * 0.45,
child: Image.asset("assets/images/new-design/visa.png"),
),
),
), ),
), mWidth(12),
Text(
"MADA",
style: TextStyle(
color: Colors.black,
fontSize: 14,
fontWeight: FontWeight.bold,
),
)
],
), ),
], ),
), ),
), ),
Container( Container(
margin: EdgeInsets.only(top: 25.0), width: double.infinity,
child: Flex( child: InkWell(
direction: Axis.horizontal, onTap: () {
children: <Widget>[ updateSelectedPaymentMethod("VISA");
Expanded( },
child: Container( child: Card(
child: InkWell( elevation: 3.0,
onTap: () { margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
updateSelectedPaymentMethod("MASTERCARD"); color: Colors.white,
}, shape: RoundedRectangleBorder(
child: Card( borderRadius: BorderRadius.circular(10),
elevation: 3.0, side: selectedPaymentMethod == "VISA" ? BorderSide(color: Colors.green, width: 5.0) : BorderSide(color: Colors.transparent, width: 0.0),
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0), ),
color: Colors.white, child: Row(
shape: RoundedRectangleBorder( children: [
borderRadius: BorderRadius.circular(10), Container(
side: selectedPaymentMethod == "MASTERCARD" ? BorderSide(color: Colors.green, width: 5.0) : BorderSide(color: Colors.transparent, width: 0.0), height: 60.0,
), padding: EdgeInsets.all(7.0),
child: Container( width: 60,
height: 120.0, child: Image.asset("assets/images/new-design/visa.png"),
padding: EdgeInsets.all(7.0),
width: MediaQuery.of(context).size.width * 0.45,
child: Image.asset("assets/images/new-design/mastercard.png"),
),
),
), ),
), mWidth(12),Text(
"VISA",
style: TextStyle(
color: Colors.black,
fontSize: 14,
fontWeight: FontWeight.bold,
),
)
],
), ),
Expanded( ),
child: Container( ),
child: InkWell( ),
onTap: () { Container(
updateSelectedPaymentMethod("Installment"); width: double.infinity,
}, child: InkWell(
child: Card( onTap: () {
elevation: 3.0, updateSelectedPaymentMethod("MASTERCARD");
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0), },
color: Colors.white, child: Card(
shape: RoundedRectangleBorder( elevation: 3.0,
borderRadius: BorderRadius.circular(10), margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
side: selectedPaymentMethod == "Installment" ? BorderSide(color: Colors.green, width: 5.0) : BorderSide(color: Colors.transparent, width: 0.0), color: Colors.white,
), shape: RoundedRectangleBorder(
child: Container( borderRadius: BorderRadius.circular(10),
height: 120.0, side: selectedPaymentMethod == "MASTERCARD" ? BorderSide(color: Colors.green, width: 5.0) : BorderSide(color: Colors.transparent, width: 0.0),
padding: EdgeInsets.all(7.0), ),
width: MediaQuery.of(context).size.width * 0.45, child: Row(
child: Image.asset("assets/images/new-design/installment.png"), children: [
), Container(
height: 60.0,
padding: EdgeInsets.all(7.0),
width: 60,
child: Image.asset("assets/images/new-design/mastercard.png"),
),
mWidth(12),
Text(
"MATER CARD",
style: TextStyle(
color: Colors.black,
fontSize: 14,
fontWeight: FontWeight.bold,
), ),
)
],
),
),
),
),
Container(
width: double.infinity,
child: InkWell(
onTap: () {
updateSelectedPaymentMethod("Installment");
},
child: Card(
elevation: 3.0,
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
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-design/installment.png"),
), ),
), mWidth(12),
Text(
"INSTALLMENT",
style: TextStyle(
color: Colors.black,
fontSize: 14,
fontWeight: FontWeight.bold,
),
)
],
), ),
], ),
), ),
), ),
Platform.isIOS Platform.isIOS

Loading…
Cancel
Save