mirror of
https://github.com/Iconica-Development/flutter_login_widget.git
synced 2025-05-19 05:33:45 +02:00
feat: add option for textalignment of inputfields
This commit is contained in:
parent
9e283f8be4
commit
3cb1e0566b
4 changed files with 14 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
## 6.0.0
|
||||
|
||||
* Changed ForgotPasswordform to use the same layout as the EmailPasswordLoginForm.
|
||||
* Add option for textalignment for email and password fields.
|
||||
|
||||
## 5.2.0
|
||||
|
||||
|
|
|
@ -15,6 +15,8 @@ class LoginOptions {
|
|||
this.maxFormWidth,
|
||||
this.emailTextStyle,
|
||||
this.passwordTextStyle,
|
||||
this.emailTextAlign,
|
||||
this.passwordTextAlign,
|
||||
this.emailDecoration = const InputDecoration(),
|
||||
this.passwordDecoration = const InputDecoration(),
|
||||
this.initialEmail = '',
|
||||
|
@ -88,6 +90,12 @@ class LoginOptions {
|
|||
/// The text style for the password input field.
|
||||
final TextStyle? passwordTextStyle;
|
||||
|
||||
/// The text alignment for the email input field.
|
||||
final TextAlign? emailTextAlign;
|
||||
|
||||
/// The text alignment for the password input field.
|
||||
final TextAlign? passwordTextAlign;
|
||||
|
||||
/// Translations for various texts on the login screen.
|
||||
final LoginTranslations translations;
|
||||
|
||||
|
|
|
@ -148,6 +148,8 @@ class _EmailPasswordLoginFormState extends State<EmailPasswordLoginForm> {
|
|||
children: [
|
||||
options.emailInputContainerBuilder(
|
||||
TextFormField(
|
||||
textAlign:
|
||||
options.emailTextAlign ?? TextAlign.start,
|
||||
onChanged: _updateCurrentEmail,
|
||||
validator: widget.options.validations.validateEmail,
|
||||
initialValue: options.initialEmail,
|
||||
|
@ -159,6 +161,8 @@ class _EmailPasswordLoginFormState extends State<EmailPasswordLoginForm> {
|
|||
),
|
||||
options.passwordInputContainerBuilder(
|
||||
TextFormField(
|
||||
textAlign:
|
||||
options.passwordTextAlign ?? TextAlign.start,
|
||||
obscureText: _obscurePassword,
|
||||
onChanged: _updateCurrentPassword,
|
||||
validator:
|
||||
|
|
|
@ -122,6 +122,7 @@ class _ForgotPasswordFormState extends State<ForgotPasswordForm> {
|
|||
alignment: Alignment.center,
|
||||
child: options.emailInputContainerBuilder(
|
||||
TextFormField(
|
||||
textAlign: options.emailTextAlign ?? TextAlign.start,
|
||||
focusNode: _focusNode,
|
||||
onChanged: _updateCurrentEmail,
|
||||
validator: widget.options.validations.validateEmail,
|
||||
|
|
Loading…
Reference in a new issue