fix : captcha and username input type

This commit is contained in:
2025-05-18 10:21:50 +03:30
parent dcc333e302
commit 1b30dafafc
2 changed files with 38 additions and 39 deletions

View File

@@ -101,7 +101,7 @@ class AuthPage extends GetView<AuthLogic> {
maxLength: 11,
maxLines: 1,
controller: phoneController.value,
keyboardType: TextInputType.number,
keyboardType: TextInputType.text,
initText: phoneController.value.text,
onChanged: (value) {
phoneController.value.text = value;

View File

@@ -15,40 +15,37 @@ class CaptchaWidget extends GetView<CaptchaWidgetLogic> {
return Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 135,
height: 50,
clipBehavior: Clip.antiAliasWithSaveLayer,
decoration: BoxDecoration(
color: AppColor.whiteNormalHover,
border: Border.all(color: Colors.grey.shade300),
borderRadius: BorderRadius.circular(8),
),
child: controller.obx(
(state) => Image.memory(
base64Decode(state?.captchaImage ?? ''),
fit: BoxFit.cover,
),
onLoading: const Center(
child: CupertinoActivityIndicator(color: AppColor.blueNormal),
),
onError: (error) {
return const Center(
child: Text(
'خطا در بارگذاری کد امنیتی',
style: AppFonts.yekan13,
),
);
},
),
),
GestureDetector(
onTap: controller.getCaptcha,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 3),
child: Icon(CupertinoIcons.refresh, size: 20),
),
),
onTap: controller.getCaptcha,
child: Container(
width: 135,
height: 50,
clipBehavior: Clip.antiAliasWithSaveLayer,
decoration: BoxDecoration(
color: AppColor.whiteNormalHover,
border: Border.all(color: Colors.grey.shade300),
borderRadius: BorderRadius.circular(8),
),
child: controller.obx(
(state) =>
Image.memory(
base64Decode(state?.captchaImage ?? ''),
fit: BoxFit.cover,
),
onLoading: const Center(
child: CupertinoActivityIndicator(color: AppColor.blueNormal),
),
onError: (error) {
return const Center(
child: Text(
'خطا در بارگذاری کد امنیتی',
style: AppFonts.yekan13,
),
);
},
),
)),
const SizedBox(width: 8),
Expanded(
child: Form(
@@ -65,11 +62,13 @@ class CaptchaWidget extends GetView<CaptchaWidgetLogic> {
maxLines: 1,
maxLength: 6,
suffixIcon:
(data.value.text.trim().isNotEmpty ?? false)
? clearButton(
() => controller.textController.value.clear(),
)
: null,
(data.value.text
.trim()
.isNotEmpty ?? false)
? clearButton(
() => controller.textController.value.clear(),
)
: null,
onSubmitted: (data) {},
validator: (value) {