BASE: Fix Buttons Radiuses.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'package:customer/screen_ui/auth_screens/sign_up_screen.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:pin_code_fields/pin_code_fields.dart';
|
||||
import '../../constant/assets.dart';
|
||||
@@ -25,7 +26,11 @@ class OtpVerificationScreen extends StatelessWidget {
|
||||
elevation: 0,
|
||||
automaticallyImplyLeading: false,
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back, size: 20, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500),
|
||||
icon: Icon(
|
||||
Icons.arrow_back,
|
||||
size: 20,
|
||||
color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500,
|
||||
),
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
},
|
||||
@@ -35,14 +40,33 @@ class OtpVerificationScreen extends StatelessWidget {
|
||||
onPressed: () {
|
||||
// Handle skip action
|
||||
},
|
||||
style: TextButton.styleFrom(padding: const EdgeInsets.symmetric(horizontal: 12), minimumSize: const Size(0, 40), tapTargetSize: MaterialTapTargetSize.shrinkWrap),
|
||||
style: TextButton.styleFrom(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
minimumSize: const Size(0, 40),
|
||||
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text("Skip".tr, style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
|
||||
Text(
|
||||
"Skip".tr,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark500
|
||||
: AppThemeData.grey500,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 2, left: 4),
|
||||
child: Icon(Icons.arrow_forward_ios, size: 16, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500),
|
||||
child: Icon(
|
||||
Icons.arrow_forward_ios,
|
||||
size: 16,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark500
|
||||
: AppThemeData.grey500,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -62,7 +86,13 @@ class OtpVerificationScreen extends StatelessWidget {
|
||||
children: [
|
||||
Text(
|
||||
"${"Enter the OTP sent to your mobile".tr} ${controller.countryCode} ${controller.maskPhoneNumber(controller.phoneNumber.value)}",
|
||||
style: AppThemeData.boldTextStyle(fontSize: 24, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 24,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark900
|
||||
: AppThemeData.grey900,
|
||||
),
|
||||
),
|
||||
|
||||
const SizedBox(height: 30),
|
||||
@@ -73,20 +103,41 @@ class OtpVerificationScreen extends StatelessWidget {
|
||||
length: 6,
|
||||
controller: controller.otpController.value,
|
||||
keyboardType: TextInputType.number,
|
||||
cursorColor: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500,
|
||||
cursorColor:
|
||||
isDark
|
||||
? AppThemeData.greyDark500
|
||||
: AppThemeData.grey500,
|
||||
enablePinAutofill: true,
|
||||
hintCharacter: "-",
|
||||
textStyle: AppThemeData.semiBoldTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark800 : AppThemeData.grey800),
|
||||
textStyle: AppThemeData.semiBoldTextStyle(
|
||||
fontSize: 18,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark800
|
||||
: AppThemeData.grey800,
|
||||
),
|
||||
pinTheme: PinTheme(
|
||||
shape: PinCodeFieldShape.box,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
fieldHeight: 54,
|
||||
fieldWidth: 51,
|
||||
inactiveColor: isDark ? AppThemeData.greyDark200 : AppThemeData.grey200,
|
||||
inactiveColor:
|
||||
isDark
|
||||
? AppThemeData.greyDark200
|
||||
: AppThemeData.grey200,
|
||||
inactiveFillColor: Colors.transparent,
|
||||
selectedColor: isDark ? AppThemeData.greyDark400 : AppThemeData.grey400,
|
||||
selectedFillColor: isDark ? AppThemeData.surfaceDark : AppThemeData.grey50,
|
||||
activeColor: isDark ? AppThemeData.greyDark200 : AppThemeData.grey200,
|
||||
selectedColor:
|
||||
isDark
|
||||
? AppThemeData.greyDark400
|
||||
: AppThemeData.grey400,
|
||||
selectedFillColor:
|
||||
isDark
|
||||
? AppThemeData.surfaceDark
|
||||
: AppThemeData.grey50,
|
||||
activeColor:
|
||||
isDark
|
||||
? AppThemeData.greyDark200
|
||||
: AppThemeData.grey200,
|
||||
activeFillColor: Colors.transparent,
|
||||
errorBorderColor: AppThemeData.danger300,
|
||||
disabledColor: Colors.transparent,
|
||||
@@ -101,13 +152,23 @@ class OtpVerificationScreen extends StatelessWidget {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Image.asset(AppAssets.icArrowsClockwise, height: 20, width: 20),
|
||||
Image.asset(
|
||||
AppAssets.icArrowsClockwise,
|
||||
height: 20,
|
||||
width: 20,
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
controller.otpController.value.clear();
|
||||
controller.sendOTP();
|
||||
},
|
||||
child: Text("Resend OTP".tr, style: AppThemeData.semiBoldTextStyle(color: AppThemeData.info400, fontSize: 16)),
|
||||
child: Text(
|
||||
"Resend OTP".tr,
|
||||
style: AppThemeData.semiBoldTextStyle(
|
||||
color: AppThemeData.info400,
|
||||
fontSize: 16,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -116,10 +177,17 @@ class OtpVerificationScreen extends StatelessWidget {
|
||||
|
||||
/// Verify Button
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Verify".tr,
|
||||
onPress: controller.verifyOtp,
|
||||
color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900,
|
||||
textColor: isDark ? AppThemeData.surfaceDark : Colors.white,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark900
|
||||
: AppThemeData.grey900,
|
||||
textColor:
|
||||
isDark
|
||||
? AppThemeData.surfaceDark
|
||||
: Colors.white,
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -131,12 +199,25 @@ class OtpVerificationScreen extends StatelessWidget {
|
||||
child: Text.rich(
|
||||
TextSpan(
|
||||
text: "Didn't have an account?".tr,
|
||||
style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark800 : AppThemeData.grey800),
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark800
|
||||
: AppThemeData.grey800,
|
||||
),
|
||||
children: [
|
||||
TextSpan(
|
||||
text: "Sign up".tr,
|
||||
style: AppThemeData.mediumTextStyle(color: AppThemeData.ecommerce300, decoration: TextDecoration.underline),
|
||||
recognizer: TapGestureRecognizer()..onTap = () => Get.offAll(() => const SignUpScreen()),
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color: AppThemeData.ecommerce300,
|
||||
decoration: TextDecoration.underline,
|
||||
),
|
||||
recognizer:
|
||||
TapGestureRecognizer()
|
||||
..onTap =
|
||||
() => Get.offAll(
|
||||
() => const SignUpScreen(),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user