Skip to content

Commit

Permalink
Add semantic to basic auth sign in button
Browse files Browse the repository at this point in the history
  • Loading branch information
tddang-linagora committed Sep 23, 2024
1 parent a27e3c7 commit c9f5316
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ class LoginBasicAuthKeyValues {
static const String loginView = 'tmail_login_view';
static const String loginEmailField = 'tmail_login_email_field';
static const String loginPasswordField = 'tmail_login_password_field';
static const String loginSubmitButton = 'tmail_login_submit_button';
static const String loginSignInButton = 'tmail_login_sign_in_button';
}
29 changes: 16 additions & 13 deletions lib/features/login/presentation/base_login_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,24 @@ abstract class BaseLoginView extends GetWidget<LoginController> {
margin: const EdgeInsetsDirectional.only(bottom: 16, start: 24, end: 24),
width: controller.responsiveUtils.getDeviceWidth(context),
height: 48,
child: ElevatedButton(
key: const Key('loginSubmitForm'),
style: ElevatedButton.styleFrom(
foregroundColor: Colors.white,
backgroundColor: AppColor.primaryColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
side: const BorderSide(width: 0, color: AppColor.primaryColor)
child: Semantics(
identifier: LoginBasicAuthKeyValues.loginSignInButton,
child: ElevatedButton(
key: const Key('loginSubmitForm'),
style: ElevatedButton.styleFrom(
foregroundColor: Colors.white,
backgroundColor: AppColor.primaryColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
side: const BorderSide(width: 0, color: AppColor.primaryColor)
)
),
onPressed: controller.handleLoginPressed,
child: Text(
AppLocalizations.of(context).signIn,
style: const TextStyle(fontSize: 16, color: Colors.white)
)
),
onPressed: controller.handleLoginPressed,
child: Text(
AppLocalizations.of(context).signIn,
style: const TextStyle(fontSize: 16, color: Colors.white)
)
)
);
}
Expand Down

0 comments on commit c9f5316

Please sign in to comment.