bug fixed

This commit is contained in:
nutchayut
2025-01-07 15:02:31 +07:00
parent f16e5f491a
commit 4f344e5e00
2634 changed files with 46314 additions and 9884 deletions

View File

@@ -0,0 +1,157 @@
import 'package:cathaypay_mobile/Home/all_menu.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:cathaypay_mobile/PinCode.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/cupertino.dart';
import 'dart:convert';
import 'dart:io';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import '../utils/color_custom.dart';
TextEditingController _current_email = TextEditingController();
TextEditingController _new_email = TextEditingController();
class ChangeEmailPage extends StatefulWidget {
const ChangeEmailPage({super.key});
@override
State<ChangeEmailPage> createState() => _ChangeEmailPageState();
}
class _ChangeEmailPageState extends State<ChangeEmailPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
// extendBodyBehindAppBar: true,
appBar: AppBar(
backgroundColor: Colors.white,
leading: CupertinoButton(
onPressed: () {
Navigator.pop(context);
},
child: const Icon(
Icons.arrow_back,
color: Colors.black54,
),
),
elevation: 0,
centerTitle: true,
title: Text(
"เปลี่ยนอีเมล".tr(),
textAlign: TextAlign.center,
style: GoogleFonts.kanit(
color: Colors.black,
fontSize: 20,
),
),
),
body: SafeArea(
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Container(height: MediaQuery.of(context).size.height,
child: Column(mainAxisSize: MainAxisSize.max, crossAxisAlignment: CrossAxisAlignment.start, children: [
SizedBox(
height: 10,
),
Text(
"อีเมลปัจจุบัน".tr(),
style: GoogleFonts.kanit(
color: Color(0xff565656),
fontSize: 15,
),
),
SizedBox(
height: 10,
),
Container(
child: TextField(
keyboardType: TextInputType.emailAddress,
// inputFormatters: [
// FilteringTextInputFormatter.allow(RegExp(r'[0-9]')),
// ],
controller: _current_email,
decoration: InputDecoration(
// hintText: 'อีเมลปัจจุบัน'.tr(),
border: InputBorder.none,
contentPadding: EdgeInsets.symmetric(horizontal: 16),
),
),
// margin: EdgeInsets.symmetric(horizontal: 20),
height: 48,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100),
color: Color(0xfff2f2f2),
),
),
SizedBox(
height: 10,
),
Text(
"อีเมลใหม่".tr(),
style: GoogleFonts.kanit(
color: Color(0xff565656),
fontSize: 15,
),
),
SizedBox(
height: 10,
),
Container(
child: TextField(
keyboardType: TextInputType.emailAddress,
// inputFormatters: [
// FilteringTextInputFormatter.allow(RegExp(r'[0-9]')),
// ],
controller: _new_email,
decoration: InputDecoration(
// hintText: 'อีเมลปัจจุบัน'.tr(),
border: InputBorder.none,
contentPadding: EdgeInsets.symmetric(horizontal: 16),
),
),
// margin: EdgeInsets.symmetric(horizontal: 20),
height: 48,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100),
color: Color(0xfff2f2f2),
),
),
Spacer(),
// Expanded(child: Container()),
InkWell(
onTap: () async {
// initPromptPay(context);
},
child: Container(
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,
),
),
),
),
),
)
]),
))));
}
}