feat:verify phone number page ui done
This commit is contained in:
@@ -105,7 +105,7 @@ class _WLoginBodyState extends State<WLoginBody> {
|
||||
alignment: AlignmentGeometry.centerRight,
|
||||
child: TextButton(
|
||||
onPressed: () {
|
||||
context.push(Routes.forgotPassword);
|
||||
context.push(Routes.verifyPhoneNumber, extra: false);
|
||||
},
|
||||
child: Text(
|
||||
context.loc.forgot_password,
|
||||
@@ -148,7 +148,10 @@ class _WLoginBodyState extends State<WLoginBody> {
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
context.pushReplacement(Routes.register);
|
||||
context.push(
|
||||
Routes.verifyPhoneNumber,
|
||||
extra: true,
|
||||
);
|
||||
},
|
||||
child: Text(
|
||||
context.loc.sign_up,
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
import 'package:food_delivery_client/feature/auth/presentation/widgets/w_auth_background.dart';
|
||||
|
||||
import '../../../../../food_delivery_client.dart';
|
||||
|
||||
class ResetPasswordPage extends StatelessWidget {
|
||||
const ResetPasswordPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return WLayout(
|
||||
top: false,
|
||||
child: Scaffold(
|
||||
body: WAuthBackground(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import 'package:food_delivery_client/feature/auth/presentation/widgets/w_auth_background.dart';
|
||||
|
||||
import '../../../../../food_delivery_client.dart';
|
||||
|
||||
class VerifyOtpCodePage extends StatelessWidget {
|
||||
const VerifyOtpCodePage({super.key, required this.isRegister});
|
||||
|
||||
final bool isRegister;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return WLayout(
|
||||
top: false,
|
||||
child: Scaffold(body: WAuthBackground(child: Column())),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
import 'package:food_delivery_client/core/helpers/formatters.dart';
|
||||
import 'package:food_delivery_client/core/helpers/validator_helpers.dart';
|
||||
import 'package:food_delivery_client/feature/auth/presentation/widgets/w_auth_background.dart';
|
||||
|
||||
import '../../../../../food_delivery_client.dart';
|
||||
|
||||
class VerifyPhoneNumberPage extends StatefulWidget {
|
||||
const VerifyPhoneNumberPage({super.key, required this.isRegister});
|
||||
|
||||
final bool isRegister;
|
||||
|
||||
@override
|
||||
State<VerifyPhoneNumberPage> createState() => _VerifyPhoneNumberPageState();
|
||||
}
|
||||
|
||||
class _VerifyPhoneNumberPageState extends State<VerifyPhoneNumberPage> {
|
||||
late TextEditingController _phoneNumberController;
|
||||
final _formKey = GlobalKey<FormState>();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
_phoneNumberController = TextEditingController();
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_phoneNumberController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Form(
|
||||
key: _formKey,
|
||||
child: WLayout(
|
||||
top: false,
|
||||
child: Scaffold(
|
||||
body: WAuthBackground(
|
||||
child: SizedBox(
|
||||
width: context.w,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
50.verticalSpace,
|
||||
Text(
|
||||
context.loc.enter_phone_number,
|
||||
style: AppTextStyles.size20Medium,
|
||||
),
|
||||
20.verticalSpace,
|
||||
AppTextFormField(
|
||||
controller: _phoneNumberController,
|
||||
borderRadius: AppUtils.kBorderRadius8,
|
||||
hintText: context.loc.phone_number,
|
||||
keyBoardType: TextInputType.phone,
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.digitsOnly,
|
||||
Formatters.phoneFormatter,
|
||||
LengthLimitingTextInputFormatter(12),
|
||||
],
|
||||
|
||||
prefixIcon: Text(
|
||||
"+ 998",
|
||||
style: AppTextStyles.size16Regular,
|
||||
),
|
||||
validator: (value) {
|
||||
return Validators.validatePhoneNumber(
|
||||
_phoneNumberController.text.trim(),
|
||||
);
|
||||
},
|
||||
),
|
||||
25.verticalSpace,
|
||||
AppButton(
|
||||
onPressed: () {
|
||||
if (_formKey.currentState?.validate() ?? false) {}
|
||||
},
|
||||
name: context.loc.continue_str,
|
||||
borderRadius: 15,
|
||||
backgroundColor: AppColors.c34A853,
|
||||
),
|
||||
10.verticalSpace,
|
||||
Text(
|
||||
context.loc.consent_message("Felix Eats"),
|
||||
style: AppTextStyles.size12Medium.copyWith(
|
||||
color: AppColors.c888888,
|
||||
),
|
||||
),
|
||||
],
|
||||
).paddingSymmetric(horizontal: 16),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user