This commit is contained in:
Manasit.K
2024-12-12 10:12:19 +07:00
parent 43c32ef6cf
commit ed510b00d1
52 changed files with 1256 additions and 1027 deletions

View File

@@ -1,9 +1,11 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:google_fonts/google_fonts.dart';
import '../PinCodeVadidate.dart';
import '../utils/color_custom.dart';
import 'TransferCathayPayDialog.dart';
class TransferCathayPay extends StatefulWidget {
@@ -18,7 +20,7 @@ class _TransferCathayPayState extends State<TransferCathayPay> {
@override
Widget build(BuildContext context) {
return Container(
return Scaffold(body: SingleChildScrollView(
child: Column(
children: [
Row(
@@ -32,7 +34,7 @@ class _TransferCathayPayState extends State<TransferCathayPay> {
color: Colors.black,
)),
Text(
"โอนเงินให้สมาชิก NEO PAY",
"โอนเงินให้สมาชิก NEO PAY".tr(),
style: TextStyle(
color: Color(0xff050505),
fontSize: 20,
@@ -40,7 +42,7 @@ class _TransferCathayPayState extends State<TransferCathayPay> {
)
],
),
Spacer(),
SizedBox(height: 20,),
Container(
child: TextField(
keyboardType: TextInputType.number,
@@ -49,7 +51,7 @@ class _TransferCathayPayState extends State<TransferCathayPay> {
],
controller: _phone,
decoration: InputDecoration(
hintText: 'เบอร์โทรศัพท์ผู้รับ',
hintText: 'เบอร์โทรศัพท์ผู้รับ'.tr(),
border: InputBorder.none,
contentPadding: EdgeInsets.symmetric(horizontal: 16),
),
@@ -61,7 +63,7 @@ class _TransferCathayPayState extends State<TransferCathayPay> {
color: Color(0xfff2f2f2),
),
),
Spacer(),
SizedBox(height: 20,),
InkWell(
onTap: () async {
showModalBottomSheet<void>(
@@ -78,36 +80,24 @@ class _TransferCathayPayState extends State<TransferCathayPay> {
});
},
child: Container(
margin: EdgeInsets.only(left: 20, right: 20),
width: MediaQuery.of(context).size.width,
height: 51,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(40),
color: Color(0xff9d001b),
),
padding: const EdgeInsets.symmetric(
horizontal: 10,
vertical: 12,
),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
width: 106,
height: 32,
child: Text(
"ต่อไป",
textAlign: TextAlign.center,
style: GoogleFonts.kanit(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.w500,
),
width: double.infinity,
margin: const EdgeInsets.symmetric(horizontal: 15),
child: Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(40),
),
child: Container(
padding: EdgeInsets.all(10),
child: Text(
"Next".tr(),
textAlign: TextAlign.center,
style: GoogleFonts.kanit(
color: ColorCustom.greyBorder,
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
],
),
),
),
),
@@ -116,7 +106,7 @@ class _TransferCathayPayState extends State<TransferCathayPay> {
)
],
),
);
),);
}
}
@@ -151,7 +141,7 @@ class _TransferCathayPayDetailState extends State<TransferCathayPayDetail> {
],
elevation: 0,
title: Text(
"โอนเงิน",
"Transfer Money".tr(),
textAlign: TextAlign.center,
style: GoogleFonts.kanit(
color: Colors.black,
@@ -168,7 +158,7 @@ class _TransferCathayPayDetailState extends State<TransferCathayPayDetail> {
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
"ชื่อ",
"ชื่อ".tr(),
style: TextStyle(
color: Color(0xff65676b),
fontSize: 16,
@@ -188,7 +178,7 @@ class _TransferCathayPayDetailState extends State<TransferCathayPayDetail> {
children: [
Spacer(),
Text(
"กมลรวี กอสัมพันธ์",
"",
textAlign: TextAlign.right,
style: TextStyle(
color: Color(0xff65676b),
@@ -207,7 +197,7 @@ class _TransferCathayPayDetailState extends State<TransferCathayPayDetail> {
Row(
children: [
Text(
"เบอร์โทรศัพท์",
"เบอร์โทรศัพท์".tr(),
style: TextStyle(
color: Color(0xff65676b),
fontSize: 14,
@@ -216,7 +206,7 @@ class _TransferCathayPayDetailState extends State<TransferCathayPayDetail> {
),
Spacer(),
Text(
"089 - 108 - 0891",
"",
textAlign: TextAlign.right,
style: TextStyle(
color: Color(0xff65676b),
@@ -229,7 +219,7 @@ class _TransferCathayPayDetailState extends State<TransferCathayPayDetail> {
height: 10,
),
Text(
"จำนวนเงินที่โอน / จ่าย",
"จำนวนเงินที่โอน / จ่าย".tr(),
style: TextStyle(
color: Color(0xff65676b),
fontSize: 16,
@@ -249,7 +239,7 @@ class _TransferCathayPayDetailState extends State<TransferCathayPayDetail> {
children: [
Spacer(),
Text(
"5,000.00",
"",
textAlign: TextAlign.right,
style: TextStyle(
color: Color(0xff65676b),
@@ -266,7 +256,7 @@ class _TransferCathayPayDetailState extends State<TransferCathayPayDetail> {
height: 10,
),
Text(
"ใช้แต้ม NEO PAY แทนเงินสด",
"ใช้แต้ม NEO PAY แทนเงินสด".tr(),
style: TextStyle(
color: Color(0xff65676b),
fontSize: 16,
@@ -274,7 +264,7 @@ class _TransferCathayPayDetailState extends State<TransferCathayPayDetail> {
),
),
Text(
"คะแนนของคุณ : 12,000 แต้ม",
"${"คะแนนของคุณ".tr()} : 12,000 ${"แต้ม".tr()}",
style: TextStyle(
color: Color(0xff9d001b),
fontSize: 14,
@@ -284,7 +274,6 @@ class _TransferCathayPayDetailState extends State<TransferCathayPayDetail> {
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Container(
width: 161,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100),
color: Color(0xfff2f2f2),
@@ -299,7 +288,7 @@ class _TransferCathayPayDetailState extends State<TransferCathayPayDetail> {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
"10 แต้ม",
"10 ${"แต้ม".tr()}",
textAlign: TextAlign.right,
style: TextStyle(
color: Color(0xff65676b),
@@ -332,7 +321,7 @@ class _TransferCathayPayDetailState extends State<TransferCathayPayDetail> {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
"100 บาท",
"100 ${"Baht".tr()}",
textAlign: TextAlign.right,
style: TextStyle(
color: Colors.white,
@@ -345,7 +334,7 @@ class _TransferCathayPayDetailState extends State<TransferCathayPayDetail> {
),
Center(
child: Text(
"1 แต้ม = 10 สตางค์",
"1 แต้ม = 10 สตางค์".tr(),
textAlign: TextAlign.center,
style: TextStyle(
color: Color(0xff65676b),
@@ -355,6 +344,8 @@ class _TransferCathayPayDetailState extends State<TransferCathayPayDetail> {
),
),
Container(
height: 136,
color: Colors.transparent,
child: Column(
children: [
SizedBox(
@@ -363,7 +354,7 @@ class _TransferCathayPayDetailState extends State<TransferCathayPayDetail> {
Row(
children: [
Text(
"ยอดเงินทั้งหมด",
"ยอดเงินทั้งหมด".tr(),
style: TextStyle(
color: Color(0xff65676b),
fontSize: 16,
@@ -371,7 +362,7 @@ class _TransferCathayPayDetailState extends State<TransferCathayPayDetail> {
),
Spacer(),
Text(
"4.990.00",
"",
textAlign: TextAlign.right,
style: TextStyle(
color: Color(0xff9d001b),
@@ -380,7 +371,7 @@ class _TransferCathayPayDetailState extends State<TransferCathayPayDetail> {
),
),
Text(
" บาท",
" ${"Baht".tr()}",
textAlign: TextAlign.right,
style: TextStyle(
color: Color(0xff65676b),
@@ -406,36 +397,24 @@ class _TransferCathayPayDetailState extends State<TransferCathayPayDetail> {
});
}
},
child: Container(
width: MediaQuery.of(context).size.width,
height: 51,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(40),
color: Color(0xff9d001b),
),
padding: const EdgeInsets.symmetric(
horizontal: 10,
vertical: 12,
),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
width: 106,
height: 32,
child: Text(
"ยืนยัน",
textAlign: TextAlign.center,
style: GoogleFonts.kanit(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.w500,
),
child: SizedBox(
width: double.infinity,
child: Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(40),
),
child: Container(
padding: EdgeInsets.all(10),
child: Text(
"Confirm".tr(),
textAlign: TextAlign.center,
style: GoogleFonts.kanit(
color: ColorCustom.greyBorder,
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
],
),
),
),
),
@@ -444,8 +423,6 @@ class _TransferCathayPayDetailState extends State<TransferCathayPayDetail> {
),
],
),
height: 136,
color: Colors.transparent,
),
SizedBox(
height: 10,

View File

@@ -147,6 +147,7 @@ class _TransferMoneyMenuPageState extends State<TransferMoneyMenuPage> {
InkWell(
onTap: () {
showModalBottomSheet<void>(
useSafeArea: true,
context: context,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(
@@ -158,31 +159,6 @@ class _TransferMoneyMenuPageState extends State<TransferMoneyMenuPage> {
});
},
child: Container(
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
width: 20,
),
Text(
"สมาชิก NEO PAY",
style: TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
Spacer(),
Icon(
Icons.wallet,
color: Colors.white,
),
SizedBox(
width: 20,
),
],
),
height: 48,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100),
@@ -193,7 +169,32 @@ class _TransferMoneyMenuPageState extends State<TransferMoneyMenuPage> {
offset: Offset(0.75, 1.50),
),
],
color: Color(0xffd0315a),
color: Color(0xfffbfbfb),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
width: 20,
),
Text(
"สมาชิก NEO PAY".tr(),
style: TextStyle(
color: Color(0xff65676b),
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
Spacer(),
Icon(
Icons.wallet,
color: Colors.black,
),
SizedBox(
width: 20,
),
],
),
),
),
@@ -216,6 +217,18 @@ class _TransferMoneyMenuPageState extends State<TransferMoneyMenuPage> {
// });
},
child: Container(
height: 48,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100),
boxShadow: [
BoxShadow(
color: Color(0x26000000),
blurRadius: 2,
offset: Offset(0.75, 1.50),
),
],
color: Colors.grey,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
@@ -224,7 +237,7 @@ class _TransferMoneyMenuPageState extends State<TransferMoneyMenuPage> {
width: 20,
),
Text(
"บัญชีธนาคาร",
"บัญชีธนาคาร".tr(),
style: TextStyle(
color: Color(0xff65676b),
fontSize: 20,
@@ -241,18 +254,6 @@ class _TransferMoneyMenuPageState extends State<TransferMoneyMenuPage> {
),
],
),
height: 48,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100),
boxShadow: [
BoxShadow(
color: Color(0x26000000),
blurRadius: 2,
offset: Offset(0.75, 1.50),
),
],
color: Colors.grey,
),
),
),
SizedBox(
@@ -588,7 +589,7 @@ class _TransferMoneyMenuPageState extends State<TransferMoneyMenuPage> {
),
Expanded(
child: Text(
"สแกน QR Code CATHAY PAY".tr(),
"สแกน QR Code NEO PAY".tr(),
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(

View File

@@ -11,6 +11,7 @@ import 'package:google_fonts/google_fonts.dart';
import 'package:mask_text_input_formatter/mask_text_input_formatter.dart';
import '../api/api.dart';
import '../utils/color_custom.dart';
import 'TransferPromtptPayDialog.dart';
class TransferPromptPay extends StatefulWidget {
@@ -96,36 +97,24 @@ class _TransferPromptPayState extends State<TransferPromptPay> {
});
},
child: Container(
margin: EdgeInsets.only(left: 20, right: 20),
width: MediaQuery.of(context).size.width,
height: 51,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(40),
color: Color(0xff9d001b),
),
padding: const EdgeInsets.symmetric(
horizontal: 10,
vertical: 12,
),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
width: 106,
height: 32,
child: Text(
"Next".tr(),
textAlign: TextAlign.center,
style: GoogleFonts.kanit(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.w500,
),
width: double.infinity,
margin: const EdgeInsets.symmetric(horizontal: 15),
child: Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(40),
),
child: Container(
padding: EdgeInsets.all(10),
child: Text(
"Next".tr(),
textAlign: TextAlign.center,
style: GoogleFonts.kanit(
color: ColorCustom.greyBorder,
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
],
),
),
),
),
@@ -418,36 +407,24 @@ class _TransferPromptPayDetailState extends State<TransferPromptPayDetail> {
onTap: () async {
initPromptPay(context);
},
child: Container(
width: MediaQuery.of(context).size.width,
height: 51,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(40),
color: Color(0xff9d001b),
),
padding: const EdgeInsets.symmetric(
horizontal: 10,
vertical: 12,
),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
width: 106,
height: 32,
child: Text(
"Confirm".tr(),
textAlign: TextAlign.center,
style: GoogleFonts.kanit(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.w500,
),
child: SizedBox(
width: double.infinity,
child: Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(40),
),
child: Container(
padding: EdgeInsets.all(10),
child: Text(
"Confirm".tr(),
textAlign: TextAlign.center,
style: GoogleFonts.kanit(
color: ColorCustom.greyBorder,
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
],
),
),
),
),