bug fixed

This commit is contained in:
nutchayut
2025-01-09 23:50:38 +07:00
parent 783d240879
commit b9ec3e6104
17 changed files with 279 additions and 305 deletions

View File

@@ -9,6 +9,7 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:google_fonts/google_fonts.dart';
import '../api/api.dart';
import '../utils/color_custom.dart';
class ForgotPassword extends StatefulWidget {
const ForgotPassword({Key? key}) : super(key: key);
@@ -70,141 +71,140 @@ class _LoginValidateState extends State<ForgotPassword> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Padding(
padding: const EdgeInsets.all(20.0),
child: Column(
children: [
Row(children: [
IconButton(
onPressed: () {
Navigator.of(context).pop();
},
icon: Icon(
Icons.arrow_back_ios,
color: Colors.black,
)),
Text(
"Forgot Password".tr(),
style: TextStyle(
color: Color(0xff050505),
fontSize: 20,
body: SafeArea(
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Column(
children: [
Row(children: [
IconButton(
onPressed: () {
Navigator.of(context).pop();
},
icon: Icon(
Icons.arrow_back_ios,
color: Colors.black,
)),
Text(
"Forgot Password".tr(),
style: TextStyle(
color: Color(0xff050505),
fontSize: 20,
),
),
]),
SizedBox(
height: 50,
),
]),
SizedBox(
height: 50,
),
Container(
height: 48,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100),
color: Color(0xfff2f2f2),
),
child: Row(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
SizedBox(
width: 10,
),
Center(
child: FaIcon(
FontAwesomeIcons.addressCard,
color: Color(0xff65676b),
)),
Expanded(
child: TextField(
keyboardType: TextInputType.emailAddress,
// inputFormatters: [
// FilteringTextInputFormatter.allow(RegExp(r'[0-9]')),
// ],
controller: email,
decoration: InputDecoration(
hintText: 'Email',
border: InputBorder.none,
contentPadding: EdgeInsets.symmetric(horizontal: 16),
),
),
),
],
),
),
/* SizedBox(
height: 10,
),
Container(
height: 48,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100),
color: Color(0xfff2f2f2),
),
child: Row(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
SizedBox(
width: 10,
),
Center(
child: FaIcon(
FontAwesomeIcons.phone,
color: Color(0xff65676b),
)),
Expanded(
child: TextField(
keyboardType: TextInputType.phone,
// inputFormatters: [
// FilteringTextInputFormatter.allow(RegExp(r'[0-9]')),
// ],
controller: phone,
decoration: InputDecoration(
hintText: 'เบอร์มือถือ',
border: InputBorder.none,
contentPadding: EdgeInsets.symmetric(horizontal: 16),
),
),
),
],
),
),*/
SizedBox(
height: 60,
),
InkWell(
onTap: () {
authen(context);
},
child: Container(
width: 374,
Container(
height: 48,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100),
color: Color(0xff9d001b),
color: Color(0xfff2f2f2),
),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
"ยืนยัน",
textAlign: TextAlign.center,
style: GoogleFonts.kanit(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.w500,
SizedBox(
width: 10,
),
Center(
child: FaIcon(
FontAwesomeIcons.addressCard,
color: Color(0xff65676b),
)),
Expanded(
child: TextField(
keyboardType: TextInputType.emailAddress,
// inputFormatters: [
// FilteringTextInputFormatter.allow(RegExp(r'[0-9]')),
// ],
controller: email,
decoration: InputDecoration(
hintText: 'อีเมล'.tr(),
border: InputBorder.none,
contentPadding: EdgeInsets.symmetric(horizontal: 16),
),
),
),
],
),
),
),
SizedBox(
height: 20,
),
],
/* SizedBox(
height: 10,
),
Container(
height: 48,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100),
color: Color(0xfff2f2f2),
),
child: Row(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
SizedBox(
width: 10,
),
Center(
child: FaIcon(
FontAwesomeIcons.phone,
color: Color(0xff65676b),
)),
Expanded(
child: TextField(
keyboardType: TextInputType.phone,
// inputFormatters: [
// FilteringTextInputFormatter.allow(RegExp(r'[0-9]')),
// ],
controller: phone,
decoration: InputDecoration(
hintText: 'เบอร์มือถือ',
border: InputBorder.none,
contentPadding: EdgeInsets.symmetric(horizontal: 16),
),
),
),
],
),
),*/
SizedBox(
height: 60,
),
InkWell(
onTap: () {
authen(context);
},
child: SizedBox(
width: double.infinity,
child: Card(
color: Colors.white,
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,
),
),
),
),
)
),
SizedBox(
height: 20,
),
],
),
),
),
);