feat : new auth in chicken

This commit is contained in:
2025-08-02 15:09:06 +03:30
parent fae6703d8d
commit 8b698a8498
27 changed files with 1115 additions and 109 deletions

View File

@@ -5,7 +5,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:rasadyar_core/core.dart';
import 'package:rasadyar_inspection/presentation/pages/auth/logic.dart';
import 'package:rasadyar_inspection/presentation/widget/clear_button.dart';
import 'logic.dart';
@@ -29,7 +29,8 @@ class CaptchaWidget extends GetView<CaptchaWidgetLogic> {
borderRadius: BorderRadius.circular(8),
),
child: controller.obx(
(state) => Image.memory(base64Decode(state?.captchaImage ?? ''), fit: BoxFit.cover),
(state) =>
Image.memory(base64Decode(state?.captchaImage ?? ''), fit: BoxFit.cover),
onLoading: const Center(
child: CupertinoActivityIndicator(color: AppColor.blueNormal),
),
@@ -57,7 +58,9 @@ class CaptchaWidget extends GetView<CaptchaWidgetLogic> {
keyboardType: TextInputType.numberWithOptions(decimal: false, signed: false),
maxLines: 1,
maxLength: 6,
suffixIcon: (controller.textController.text.trim().isNotEmpty ?? false)
suffixIcon: (controller.textController.text
.trim()
.isNotEmpty ?? false)
? clearButton(() => controller.textController.clear())
: null,
@@ -70,7 +73,10 @@ class CaptchaWidget extends GetView<CaptchaWidgetLogic> {
onChanged: (pass) {
if (pass.length == 6) {
if (controller.formKey.currentState?.validate() ?? false) {
Get.find<AuthLogic>().isDisabled.value = false;
Get
.find<AuthLogic>()
.isDisabled
.value = false;
}
}
},