changed border color and tender tablet sizes
This commit is contained in:
@@ -18,93 +18,88 @@ class LoginDesktopPage extends StatelessWidget {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.backgroundColor,
|
||||
body: Center(
|
||||
child: SingleChildScrollView(
|
||||
padding: EdgeInsets.symmetric(horizontal: 24.0.w()),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 526,
|
||||
child: Consumer<AuthViewModel>(
|
||||
builder: (context, viewModel, _) {
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
LoginLogo(width: 190.0.w(), height: 88.0.h()),
|
||||
SizedBox(height: 32.0.h()),
|
||||
const LoginTitle(),
|
||||
SizedBox(height: 32.0.h()),
|
||||
LoginTextField(
|
||||
controller: viewModel.usernameController,
|
||||
focusNode: viewModel.usernameFocus,
|
||||
label: AppStrings.usernameLabel,
|
||||
iconPath: AssetsManager.userIcon,
|
||||
fieldHeight: 60.0.h(),
|
||||
borderRedus: 12,
|
||||
prefixIconPadding: 7.0.w(),
|
||||
),
|
||||
SizedBox(height: 16.0.h()),
|
||||
LoginTextField(
|
||||
controller: viewModel.passwordController,
|
||||
focusNode: viewModel.passwordFocus,
|
||||
label: AppStrings.passwordLabel,
|
||||
iconPath: AssetsManager.passwordIcon,
|
||||
prefixIconPadding: 7.0.w(),
|
||||
isPassword: true,
|
||||
obscureText: viewModel.obscurePassword,
|
||||
fieldHeight: 60.0.h(),
|
||||
onToggleVisibility:
|
||||
viewModel.togglePasswordVisibility,
|
||||
borderRedus: 12,
|
||||
),
|
||||
SizedBox(height: 32.0.h()),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 526,
|
||||
child: Consumer<AuthViewModel>(
|
||||
builder: (context, viewModel, _) {
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
LoginLogo(width: 190.0.w(), height: 88.0.h()),
|
||||
SizedBox(height: 32.0.h()),
|
||||
const LoginTitle(),
|
||||
SizedBox(height: 32.0.h()),
|
||||
LoginTextField(
|
||||
controller: viewModel.usernameController,
|
||||
focusNode: viewModel.usernameFocus,
|
||||
label: AppStrings.usernameLabel,
|
||||
iconPath: AssetsManager.userIcon,
|
||||
fieldHeight: 60.0.h(),
|
||||
borderRedus: 12,
|
||||
prefixIconPadding: 7.0.w(),
|
||||
),
|
||||
SizedBox(height: 16.0.h()),
|
||||
LoginTextField(
|
||||
controller: viewModel.passwordController,
|
||||
focusNode: viewModel.passwordFocus,
|
||||
label: AppStrings.passwordLabel,
|
||||
iconPath: AssetsManager.passwordIcon,
|
||||
prefixIconPadding: 7.0.w(),
|
||||
isPassword: true,
|
||||
obscureText: viewModel.obscurePassword,
|
||||
fieldHeight: 60.0.h(),
|
||||
onToggleVisibility: viewModel.togglePasswordVisibility,
|
||||
borderRedus: 12,
|
||||
),
|
||||
SizedBox(height: 32.0.h()),
|
||||
|
||||
if (viewModel.isLoading)
|
||||
BaseButton(
|
||||
isEnabled: false,
|
||||
onPressed: null,
|
||||
isLoading: true,
|
||||
)
|
||||
else
|
||||
BaseButton(
|
||||
isEnabled: viewModel.isLoginEnabled,
|
||||
onPressed:
|
||||
viewModel.isLoginEnabled
|
||||
? () async {
|
||||
await viewModel.login();
|
||||
if (viewModel.loggedInUser != null) {
|
||||
HomeRouteData().go(context);
|
||||
} else if (viewModel.errorMessage !=
|
||||
null) {
|
||||
ScaffoldMessenger.of(
|
||||
context,
|
||||
).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
viewModel.errorMessage!,
|
||||
),
|
||||
if (viewModel.isLoading)
|
||||
BaseButton(
|
||||
isEnabled: false,
|
||||
onPressed: null,
|
||||
isLoading: true,
|
||||
)
|
||||
else
|
||||
BaseButton(
|
||||
isEnabled: viewModel.isLoginEnabled,
|
||||
onPressed:
|
||||
viewModel.isLoginEnabled
|
||||
? () async {
|
||||
await viewModel.login();
|
||||
if (viewModel.loggedInUser != null) {
|
||||
HomeRouteData().go(context);
|
||||
} else if (viewModel.errorMessage != null) {
|
||||
ScaffoldMessenger.of(
|
||||
context,
|
||||
).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
viewModel.errorMessage!,
|
||||
),
|
||||
);
|
||||
}
|
||||
),
|
||||
);
|
||||
}
|
||||
: null,
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
}
|
||||
: null,
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 20.0.h()),
|
||||
child: Image.asset(
|
||||
AssetsManager.webLoginImage,
|
||||
width: 796.0.w(),
|
||||
height: 944.0.h(),
|
||||
fit: BoxFit.fitHeight,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 20.0.h()),
|
||||
child: Image.asset(
|
||||
AssetsManager.webLoginImage,
|
||||
width: 796.0,
|
||||
height: 944.0,
|
||||
fit: BoxFit.fitWidth,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user