changed border color and tender tablet sizes

This commit is contained in:
amirrezaghabeli
2025-08-11 08:10:06 +03:30
parent a3af2db260
commit d7deb592fa
3 changed files with 90 additions and 84 deletions
+77 -82
View File
@@ -18,93 +18,88 @@ class LoginDesktopPage extends StatelessWidget {
return Scaffold( return Scaffold(
backgroundColor: AppColors.backgroundColor, backgroundColor: AppColors.backgroundColor,
body: Center( body: Center(
child: SingleChildScrollView( child: Row(
padding: EdgeInsets.symmetric(horizontal: 24.0.w()), mainAxisAlignment: MainAxisAlignment.spaceAround,
child: Row( children: [
mainAxisAlignment: MainAxisAlignment.spaceAround, SizedBox(
children: [ width: 526,
SizedBox( child: Consumer<AuthViewModel>(
width: 526, builder: (context, viewModel, _) {
child: Consumer<AuthViewModel>( return Column(
builder: (context, viewModel, _) { mainAxisSize: MainAxisSize.min,
return Column( children: [
mainAxisSize: MainAxisSize.min, LoginLogo(width: 190.0.w(), height: 88.0.h()),
children: [ SizedBox(height: 32.0.h()),
LoginLogo(width: 190.0.w(), height: 88.0.h()), const LoginTitle(),
SizedBox(height: 32.0.h()), SizedBox(height: 32.0.h()),
const LoginTitle(), LoginTextField(
SizedBox(height: 32.0.h()), controller: viewModel.usernameController,
LoginTextField( focusNode: viewModel.usernameFocus,
controller: viewModel.usernameController, label: AppStrings.usernameLabel,
focusNode: viewModel.usernameFocus, iconPath: AssetsManager.userIcon,
label: AppStrings.usernameLabel, fieldHeight: 60.0.h(),
iconPath: AssetsManager.userIcon, borderRedus: 12,
fieldHeight: 60.0.h(), prefixIconPadding: 7.0.w(),
borderRedus: 12, ),
prefixIconPadding: 7.0.w(), SizedBox(height: 16.0.h()),
), LoginTextField(
SizedBox(height: 16.0.h()), controller: viewModel.passwordController,
LoginTextField( focusNode: viewModel.passwordFocus,
controller: viewModel.passwordController, label: AppStrings.passwordLabel,
focusNode: viewModel.passwordFocus, iconPath: AssetsManager.passwordIcon,
label: AppStrings.passwordLabel, prefixIconPadding: 7.0.w(),
iconPath: AssetsManager.passwordIcon, isPassword: true,
prefixIconPadding: 7.0.w(), obscureText: viewModel.obscurePassword,
isPassword: true, fieldHeight: 60.0.h(),
obscureText: viewModel.obscurePassword, onToggleVisibility: viewModel.togglePasswordVisibility,
fieldHeight: 60.0.h(), borderRedus: 12,
onToggleVisibility: ),
viewModel.togglePasswordVisibility, SizedBox(height: 32.0.h()),
borderRedus: 12,
),
SizedBox(height: 32.0.h()),
if (viewModel.isLoading) if (viewModel.isLoading)
BaseButton( BaseButton(
isEnabled: false, isEnabled: false,
onPressed: null, onPressed: null,
isLoading: true, isLoading: true,
) )
else else
BaseButton( BaseButton(
isEnabled: viewModel.isLoginEnabled, isEnabled: viewModel.isLoginEnabled,
onPressed: onPressed:
viewModel.isLoginEnabled viewModel.isLoginEnabled
? () async { ? () async {
await viewModel.login(); await viewModel.login();
if (viewModel.loggedInUser != null) { if (viewModel.loggedInUser != null) {
HomeRouteData().go(context); HomeRouteData().go(context);
} else if (viewModel.errorMessage != } else if (viewModel.errorMessage != null) {
null) { ScaffoldMessenger.of(
ScaffoldMessenger.of( context,
context, ).showSnackBar(
).showSnackBar( SnackBar(
SnackBar( content: Text(
content: Text( viewModel.errorMessage!,
viewModel.errorMessage!,
),
), ),
); ),
} );
} }
: null, }
), : null,
], ),
); ],
}, );
), },
), ),
Padding( ),
padding: EdgeInsets.symmetric(vertical: 20.0.h()), Padding(
child: Image.asset( padding: EdgeInsets.symmetric(vertical: 20.0.h()),
AssetsManager.webLoginImage, child: Image.asset(
width: 796.0.w(), AssetsManager.webLoginImage,
height: 944.0.h(), width: 796.0,
fit: BoxFit.fitHeight, height: 944.0,
), fit: BoxFit.fitWidth,
), ),
], ),
), ],
), ),
), ),
); );
+8 -1
View File
@@ -68,7 +68,9 @@ class LoginTextField extends StatelessWidget {
width: 24.0.w(), width: 24.0.w(),
height: 24.0.h(), height: 24.0.h(),
colorFilter: ColorFilter.mode( colorFilter: ColorFilter.mode(
focusNode.hasFocus ? AppColors.grey80 : AppColors.grey60, focusNode.hasFocus
? AppColors.grey80
: AppColors.grey60,
BlendMode.srcIn, BlendMode.srcIn,
), ),
), ),
@@ -76,6 +78,11 @@ class LoginTextField extends StatelessWidget {
: null, : null,
border: OutlineInputBorder( border: OutlineInputBorder(
borderRadius: BorderRadius.circular(borderRedus ?? 12.0.w()), borderRadius: BorderRadius.circular(borderRedus ?? 12.0.w()),
borderSide: BorderSide(color: AppColors.grey40),
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(borderRedus ?? 12.0.w()),
borderSide: BorderSide(color: AppColors.grey40),
), ),
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: AppColors.borderBlue), borderSide: BorderSide(color: AppColors.borderBlue),
+5 -1
View File
@@ -14,7 +14,11 @@ class TabletTendersPage extends StatelessWidget {
body: SingleChildScrollView( body: SingleChildScrollView(
child: Padding( child: Padding(
padding: EdgeInsets.symmetric(vertical: 24.0.h()), padding: EdgeInsets.only(
left: 24.0.w(),
right: 24.0.w(),
top: 128.0.h(),
),
child: MainTendersSlider(), child: MainTendersSlider(),
), ),
), ),