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, maxLength: 11,
maxLines: 1, maxLines: 1,
controller: phoneController.value, controller: phoneController.value,
keyboardType: TextInputType.number, keyboardType: TextInputType.text,
initText: phoneController.value.text, initText: phoneController.value.text,
onChanged: (value) { onChanged: (value) {
phoneController.value.text = value; phoneController.value.text = value;

View File

@@ -15,7 +15,9 @@ class CaptchaWidget extends GetView<CaptchaWidgetLogic> {
return Row( return Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( GestureDetector(
onTap: controller.getCaptcha,
child: Container(
width: 135, width: 135,
height: 50, height: 50,
clipBehavior: Clip.antiAliasWithSaveLayer, clipBehavior: Clip.antiAliasWithSaveLayer,
@@ -25,7 +27,8 @@ class CaptchaWidget extends GetView<CaptchaWidgetLogic> {
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
), ),
child: controller.obx( child: controller.obx(
(state) => Image.memory( (state) =>
Image.memory(
base64Decode(state?.captchaImage ?? ''), base64Decode(state?.captchaImage ?? ''),
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
@@ -41,14 +44,8 @@ class CaptchaWidget extends GetView<CaptchaWidgetLogic> {
); );
}, },
), ),
), )),
GestureDetector(
onTap: controller.getCaptcha,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 3),
child: Icon(CupertinoIcons.refresh, size: 20),
),
),
const SizedBox(width: 8), const SizedBox(width: 8),
Expanded( Expanded(
child: Form( child: Form(
@@ -65,7 +62,9 @@ class CaptchaWidget extends GetView<CaptchaWidgetLogic> {
maxLines: 1, maxLines: 1,
maxLength: 6, maxLength: 6,
suffixIcon: suffixIcon:
(data.value.text.trim().isNotEmpty ?? false) (data.value.text
.trim()
.isNotEmpty ?? false)
? clearButton( ? clearButton(
() => controller.textController.value.clear(), () => controller.textController.value.clear(),
) )