fix: default theme

This commit is contained in:
mike doornenbal 2024-08-08 09:44:01 +02:00
parent 469a62eede
commit 3bccff1e70
3 changed files with 27 additions and 29 deletions

View file

@ -1,3 +1,7 @@
## 7.1.1
* Changed default theme
## 7.1.0 ## 7.1.0
* Added autofillgroup to support native password managers * Added autofillgroup to support native password managers

View file

@ -63,7 +63,7 @@ class LoginOptions {
this.passwordInputContainerBuilder = _createPasswordInputContainer, this.passwordInputContainerBuilder = _createPasswordInputContainer,
this.showObscurePassword = true, this.showObscurePassword = true,
this.forgotPasswordSpacerOptions = const ForgotPasswordSpacerOptions( this.forgotPasswordSpacerOptions = const ForgotPasswordSpacerOptions(
spacerAfterButton: 3, spacerAfterButton: 4,
spacerBeforeTitle: 1, spacerBeforeTitle: 1,
), ),
this.loginBackgroundColor = const Color(0xffFAF9F6), this.loginBackgroundColor = const Color(0xffFAF9F6),
@ -164,10 +164,10 @@ class LoginTranslations {
this.emailEmpty = 'Email is required', this.emailEmpty = 'Email is required',
this.passwordEmpty = 'Password is required', this.passwordEmpty = 'Password is required',
this.emailInvalid = 'Enter a valid email address', this.emailInvalid = 'Enter a valid email address',
this.loginButton = 'Login', this.loginButton = 'Log in',
this.forgotPasswordButton = 'Forgot password?', this.forgotPasswordButton = 'Forgot password?',
this.requestForgotPasswordButton = 'Send link', this.requestForgotPasswordButton = 'Send link',
this.registrationButton = 'Create Account', this.registrationButton = 'Create account',
}); });
final String emailInvalid; final String emailInvalid;
@ -195,28 +195,26 @@ Widget _createLoginButton(
) => ) =>
Opacity( Opacity(
opacity: disabled ? 0.5 : 1.0, opacity: disabled ? 0.5 : 1.0,
child: InkWell( child: Row(
onTap: () async => children: [
Expanded(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
child: FilledButton(
onPressed: () async =>
!disabled ? await onPressed() : await onDisabledPress(), !disabled ? await onPressed() : await onDisabledPress(),
child: Container( child: Padding(
height: 44, padding: const EdgeInsets.all(8),
width: 254,
decoration: const BoxDecoration(
color: Color(0xff71C6D1),
borderRadius: BorderRadius.all(Radius.circular(20)),
),
child: Center(
child: Text( child: Text(
options.translations.loginButton, options.translations.loginButton,
style: const TextStyle( style: Theme.of(context).textTheme.displayLarge,
fontWeight: FontWeight.w800,
fontSize: 20,
color: Colors.white,
), ),
), ),
), ),
), ),
), ),
],
),
); );
Widget _createForgotPasswordButton( Widget _createForgotPasswordButton(
@ -288,12 +286,8 @@ Widget _createRegisterButton(
onPressed: !disabled ? onPressed : onDisabledPress, onPressed: !disabled ? onPressed : onDisabledPress,
child: Text( child: Text(
options.translations.registrationButton, options.translations.registrationButton,
style: const TextStyle( style: Theme.of(context).textTheme.displayMedium!.copyWith(
decoration: TextDecoration.underline, decoration: TextDecoration.underline,
decorationColor: Color(0xff71C6D1),
color: Color(0xff71C6D1),
fontSize: 18,
fontWeight: FontWeight.w800,
), ),
), ),
), ),

View file

@ -1,6 +1,6 @@
name: flutter_login name: flutter_login
description: Flutter Login Component description: Flutter Login Component
version: 7.1.0 version: 7.1.1
publish_to: https://forgejo.internal.iconica.nl/api/packages/internal/pub publish_to: https://forgejo.internal.iconica.nl/api/packages/internal/pub