feat : new auth in chicken
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
|
||||
Widget clearButton(VoidCallback onTap) {
|
||||
return GestureDetector(
|
||||
onTap: onTap,
|
||||
child: Icon(CupertinoIcons.multiply_circle, size: 20),
|
||||
);
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class LogoWidget extends StatelessWidget {
|
||||
const LogoWidget({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
Row(),
|
||||
Assets.images.innerSplash.image(
|
||||
width: 120.w,
|
||||
height: 120.h,
|
||||
),
|
||||
Text(
|
||||
'سامانه رصدیار',
|
||||
style: AppFonts.yekan16.copyWith(color: AppColor.darkGreyNormal),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user