fix : title
This commit is contained in:
@@ -35,7 +35,7 @@ class AuthPage extends GetView<AuthLogic> {
|
|||||||
spacing: 12,
|
spacing: 12,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'به سامانه رصدیار خوش آمدید!',
|
'به سامانه رصدطیور خوش آمدید!',
|
||||||
textAlign: TextAlign.right,
|
textAlign: TextAlign.right,
|
||||||
style: AppFonts.yekan25Bold.copyWith(color: Colors.white),
|
style: AppFonts.yekan25Bold.copyWith(color: Colors.white),
|
||||||
),
|
),
|
||||||
@@ -70,7 +70,9 @@ class AuthPage extends GetView<AuthLogic> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(height: 50.h),
|
SizedBox(height: 50.h),
|
||||||
LogoWidget(),
|
LogoWidget(
|
||||||
|
title: 'سامانه رصدطیور',
|
||||||
|
),
|
||||||
SizedBox(height: 20.h),
|
SizedBox(height: 20.h),
|
||||||
useAndPassFrom(),
|
useAndPassFrom(),
|
||||||
SizedBox(height: 24.h),
|
SizedBox(height: 24.h),
|
||||||
@@ -340,239 +342,4 @@ class AuthPage extends GetView<AuthLogic> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
Widget sendCodeForm() {
|
|
||||||
return ObxValue((data) {
|
|
||||||
return Form(
|
|
||||||
key: data.value,
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 30, vertical: 50),
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
SizedBox(height: 26),
|
|
||||||
ObxValue((phoneController) {
|
|
||||||
return TextFormField(
|
|
||||||
controller: phoneController.value,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
border: OutlineInputBorder(
|
|
||||||
borderRadius: BorderRadius.circular(8),
|
|
||||||
gapPadding: 11,
|
|
||||||
),
|
|
||||||
labelText: 'شماره موبایل',
|
|
||||||
labelStyle: AppFonts.yekan13,
|
|
||||||
errorStyle: AppFonts.yekan13.copyWith(
|
|
||||||
color: AppColor.redNormal,
|
|
||||||
),
|
|
||||||
prefixIconConstraints: BoxConstraints(
|
|
||||||
maxHeight: 40,
|
|
||||||
minHeight: 40,
|
|
||||||
maxWidth: 40,
|
|
||||||
minWidth: 40,
|
|
||||||
),
|
|
||||||
prefixIcon: Padding(
|
|
||||||
padding: const EdgeInsets.fromLTRB(0, 8, 6, 8),
|
|
||||||
child: vecWidget(Assets.vecCallSvg),
|
|
||||||
),
|
|
||||||
suffix:
|
|
||||||
phoneController.value.text.trim().isNotEmpty
|
|
||||||
? clearButton(() {
|
|
||||||
phoneController.value.clear();
|
|
||||||
phoneController.refresh();
|
|
||||||
})
|
|
||||||
: null,
|
|
||||||
counterText: '',
|
|
||||||
),
|
|
||||||
keyboardType: TextInputType.numberWithOptions(
|
|
||||||
decimal: false,
|
|
||||||
signed: false,
|
|
||||||
),
|
|
||||||
maxLines: 1,
|
|
||||||
maxLength: 11,
|
|
||||||
onChanged: (value) {
|
|
||||||
if (controller.isOnError.value) {
|
|
||||||
controller.isOnError.value = !controller.isOnError.value;
|
|
||||||
data.value.currentState?.reset();
|
|
||||||
data.refresh();
|
|
||||||
phoneController.value.text = value;
|
|
||||||
}
|
|
||||||
phoneController.refresh();
|
|
||||||
},
|
|
||||||
textInputAction: TextInputAction.next,
|
|
||||||
validator: (value) {
|
|
||||||
if (value == null) {
|
|
||||||
return '⚠️ شماره موبایل را وارد کنید';
|
|
||||||
} else if (value.length < 11) {
|
|
||||||
return '⚠️ شماره موبایل باید 11 رقم باشد';
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
style: AppFonts.yekan13,
|
|
||||||
);
|
|
||||||
}, controller.phoneOtpNumberController),
|
|
||||||
|
|
||||||
SizedBox(height: 26),
|
|
||||||
|
|
||||||
CaptchaWidget(),
|
|
||||||
|
|
||||||
SizedBox(height: 23),
|
|
||||||
RElevated(
|
|
||||||
text: 'ارسال رمز یکبار مصرف',
|
|
||||||
onPressed: () {
|
|
||||||
if (data.value.currentState?.validate() == true) {
|
|
||||||
controller.otpStatus.value = OtpStatus.sent;
|
|
||||||
controller.startTimer();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
width: Get.width,
|
|
||||||
height: 48,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}, controller.formKeyOtp);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget confirmCodeForm() {
|
|
||||||
return ObxValue((data) {
|
|
||||||
return Form(
|
|
||||||
key: data.value,
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 30, vertical: 50),
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
SizedBox(height: 26),
|
|
||||||
|
|
||||||
ObxValue((passwordController) {
|
|
||||||
return TextFormField(
|
|
||||||
controller: passwordController.value,
|
|
||||||
obscureText: controller.hidePassword.value,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
border: OutlineInputBorder(
|
|
||||||
borderRadius: BorderRadius.circular(8),
|
|
||||||
gapPadding: 11,
|
|
||||||
),
|
|
||||||
labelText: 'رمز عبور',
|
|
||||||
labelStyle: AppFonts.yekan13,
|
|
||||||
errorStyle: AppFonts.yekan13.copyWith(
|
|
||||||
color: AppColor.redNormal,
|
|
||||||
),
|
|
||||||
|
|
||||||
prefixIconConstraints: BoxConstraints(
|
|
||||||
maxHeight: 34,
|
|
||||||
minHeight: 34,
|
|
||||||
maxWidth: 34,
|
|
||||||
minWidth: 34,
|
|
||||||
),
|
|
||||||
prefixIcon: Padding(
|
|
||||||
padding: const EdgeInsets.fromLTRB(0, 8, 8, 8),
|
|
||||||
child: vecWidget(Assets.vecKeySvg),
|
|
||||||
),
|
|
||||||
suffix:
|
|
||||||
passwordController.value.text.trim().isNotEmpty
|
|
||||||
? GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
controller.hidePassword.value =
|
|
||||||
!controller.hidePassword.value;
|
|
||||||
},
|
|
||||||
child: Icon(
|
|
||||||
controller.hidePassword.value
|
|
||||||
? CupertinoIcons.eye
|
|
||||||
: CupertinoIcons.eye_slash,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
: null,
|
|
||||||
counterText: '',
|
|
||||||
),
|
|
||||||
textInputAction: TextInputAction.done,
|
|
||||||
keyboardType: TextInputType.visiblePassword,
|
|
||||||
maxLines: 1,
|
|
||||||
onChanged: (value) {
|
|
||||||
if (controller.isOnError.value) {
|
|
||||||
controller.isOnError.value = !controller.isOnError.value;
|
|
||||||
data.value.currentState?.reset();
|
|
||||||
passwordController.value.text = value;
|
|
||||||
}
|
|
||||||
passwordController.refresh();
|
|
||||||
},
|
|
||||||
validator: (value) {
|
|
||||||
if (value == null || value.isEmpty) {
|
|
||||||
return '⚠️ رمز عبور را وارد کنید'; // "Please enter the password"
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
style: AppFonts.yekan13,
|
|
||||||
);
|
|
||||||
}, controller.passwordController),
|
|
||||||
|
|
||||||
SizedBox(height: 23),
|
|
||||||
|
|
||||||
ObxValue((timer) {
|
|
||||||
if (timer.value == 0) {
|
|
||||||
return TextButton(
|
|
||||||
onPressed: () {
|
|
||||||
controller.otpStatus.value = OtpStatus.reSend;
|
|
||||||
controller.startTimer();
|
|
||||||
},
|
|
||||||
child: Text(
|
|
||||||
style: AppFonts.yekan13.copyWith(
|
|
||||||
color: AppColor.blueNormal,
|
|
||||||
),
|
|
||||||
'ارسال مجدد کد یکبار مصرف',
|
|
||||||
),
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
return Text(
|
|
||||||
'اعتبار رمز ارسال شده ${controller.timeFormatted}',
|
|
||||||
style: AppFonts.yekan13,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}, controller.secondsRemaining),
|
|
||||||
|
|
||||||
RichText(
|
|
||||||
text: TextSpan(
|
|
||||||
children: [
|
|
||||||
TextSpan(
|
|
||||||
text: ' کد ارسال شده به شماره ',
|
|
||||||
style: AppFonts.yekan14.copyWith(
|
|
||||||
color: AppColor.darkGreyDark,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
TextSpan(
|
|
||||||
text: controller.phoneOtpNumberController.value.text,
|
|
||||||
style: AppFonts.yekan13Bold.copyWith(
|
|
||||||
color: AppColor.darkGreyDark,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
TextSpan(
|
|
||||||
recognizer:
|
|
||||||
TapGestureRecognizer()
|
|
||||||
..onTap = () {
|
|
||||||
controller.otpStatus.value = OtpStatus.init;
|
|
||||||
},
|
|
||||||
text: ' ویرایش',
|
|
||||||
style: AppFonts.yekan14.copyWith(
|
|
||||||
color: AppColor.blueNormal,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
SizedBox(height: 23),
|
|
||||||
RElevated(
|
|
||||||
text: 'ورود',
|
|
||||||
onPressed: () {
|
|
||||||
if (controller.formKeyOtp.value.currentState?.validate() ==
|
|
||||||
true) {}
|
|
||||||
},
|
|
||||||
width: Get.width,
|
|
||||||
height: 48,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}, controller.formKeySentOtp);
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user