fix : captcha and username input type
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -15,40 +15,37 @@ class CaptchaWidget extends GetView<CaptchaWidgetLogic> {
|
|||||||
return Row(
|
return Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
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(
|
GestureDetector(
|
||||||
onTap: controller.getCaptcha,
|
onTap: controller.getCaptcha,
|
||||||
child: Padding(
|
child: Container(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 3),
|
width: 135,
|
||||||
child: Icon(CupertinoIcons.refresh, size: 20),
|
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),
|
const SizedBox(width: 8),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Form(
|
child: Form(
|
||||||
@@ -65,11 +62,13 @@ class CaptchaWidget extends GetView<CaptchaWidgetLogic> {
|
|||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
maxLength: 6,
|
maxLength: 6,
|
||||||
suffixIcon:
|
suffixIcon:
|
||||||
(data.value.text.trim().isNotEmpty ?? false)
|
(data.value.text
|
||||||
? clearButton(
|
.trim()
|
||||||
() => controller.textController.value.clear(),
|
.isNotEmpty ?? false)
|
||||||
)
|
? clearButton(
|
||||||
: null,
|
() => controller.textController.value.clear(),
|
||||||
|
)
|
||||||
|
: null,
|
||||||
|
|
||||||
onSubmitted: (data) {},
|
onSubmitted: (data) {},
|
||||||
validator: (value) {
|
validator: (value) {
|
||||||
|
|||||||
Reference in New Issue
Block a user