From b80e2ea16e90bfdd0c8e90deeaf763ff2830e898 Mon Sep 17 00:00:00 2001 From: "Mirza.Shafique" Date: Sun, 3 Oct 2021 17:51:41 +0300 Subject: [PATCH] Covid New Design 2 --- lib/pages/ToDoList/payment_method_select.dart | 228 ++++++++++-------- 1 file changed, 130 insertions(+), 98 deletions(-) diff --git a/lib/pages/ToDoList/payment_method_select.dart b/lib/pages/ToDoList/payment_method_select.dart index b3ada181..39dc7624 100644 --- a/lib/pages/ToDoList/payment_method_select.dart +++ b/lib/pages/ToDoList/payment_method_select.dart @@ -2,6 +2,7 @@ import 'dart:io'; import 'package:diplomaticquarterapp/theme/colors.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:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -36,115 +37,146 @@ class _PaymentMethodState extends State { child: Text(TranslationBase.of(context).selectPaymentOption, style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold)), ), Container( - margin: EdgeInsets.only(top: 25.0), - child: Flex( - direction: Axis.horizontal, - children: [ - Expanded( - child: Container( - child: InkWell( - onTap: () { - updateSelectedPaymentMethod("MADA"); - }, - 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 == "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"), - ), - ), - ), - ), + width: double.infinity, + child: InkWell( + onTap: () { + updateSelectedPaymentMethod("MADA"); + }, + 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 == "MADA" ? BorderSide(color: Colors.green, width: 5.0) : BorderSide(color: Colors.transparent, width: 0.0), ), - Expanded( - child: Container( - child: InkWell( - onTap: () { - updateSelectedPaymentMethod("VISA"); - }, - 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 == "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"), - ), - ), + child: Row( + children: [ + Container( + height: 60.0, + width:60, + padding: EdgeInsets.all(7.0), + child: Image.asset("assets/images/new-design/mada.png"), ), - ), + mWidth(12), + Text( + "MADA", + style: TextStyle( + color: Colors.black, + fontSize: 14, + fontWeight: FontWeight.bold, + ), + ) + ], ), - ], + ), ), ), Container( - margin: EdgeInsets.only(top: 25.0), - child: Flex( - direction: Axis.horizontal, - children: [ - Expanded( - child: Container( - child: InkWell( - onTap: () { - updateSelectedPaymentMethod("MASTERCARD"); - }, - 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 == "MASTERCARD" ? 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/mastercard.png"), - ), - ), + width: double.infinity, + child: InkWell( + onTap: () { + updateSelectedPaymentMethod("VISA"); + }, + 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 == "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-design/visa.png"), ), - ), + mWidth(12),Text( + "VISA", + style: TextStyle( + color: Colors.black, + fontSize: 14, + fontWeight: FontWeight.bold, + ), + ) + ], ), - Expanded( - child: Container( - 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: Container( - height: 120.0, - padding: EdgeInsets.all(7.0), - width: MediaQuery.of(context).size.width * 0.45, - child: Image.asset("assets/images/new-design/installment.png"), - ), + ), + ), + ), + Container( + width: double.infinity, + child: InkWell( + onTap: () { + updateSelectedPaymentMethod("MASTERCARD"); + }, + 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 == "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-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