mirror of
https://github.com/Iconica-Development/flutter_login_widget.git
synced 2025-05-19 13:43:44 +02:00
feat: add textstyle for fields
This commit is contained in:
parent
9f8fabb93a
commit
a154140fc9
5 changed files with 14 additions and 4 deletions
|
@ -1,3 +1,6 @@
|
|||
## 3.1.2
|
||||
* Added textStyle option for email and password fields
|
||||
|
||||
## 3.1.1
|
||||
* Fix login values not copied to validation
|
||||
|
||||
|
|
|
@ -13,6 +13,8 @@ class LoginOptions {
|
|||
this.passwordLabel,
|
||||
this.emailInputPrefix,
|
||||
this.passwordInputPrefix,
|
||||
this.emailTextStyle,
|
||||
this.passwordTextStyle,
|
||||
this.decoration = const InputDecoration(),
|
||||
this.initialEmail = '',
|
||||
this.initialPassword = '',
|
||||
|
@ -48,6 +50,8 @@ class LoginOptions {
|
|||
final String initialPassword;
|
||||
final String? emailHintText;
|
||||
final String? passwordHintText;
|
||||
final TextStyle? emailTextStyle;
|
||||
final TextStyle? passwordTextStyle;
|
||||
final LoginTranslations translations;
|
||||
final ValidationService? validationService;
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ class _EmailPasswordLoginFormState extends State<EmailPasswordLoginForm> {
|
|||
alignment: Alignment.topCenter,
|
||||
child: _wrapWithDefaultStyle(
|
||||
options.title,
|
||||
theme.textTheme.headline6,
|
||||
theme.textTheme.headlineSmall,
|
||||
),
|
||||
)
|
||||
],
|
||||
|
@ -103,7 +103,7 @@ class _EmailPasswordLoginFormState extends State<EmailPasswordLoginForm> {
|
|||
alignment: Alignment.topCenter,
|
||||
child: _wrapWithDefaultStyle(
|
||||
options.subtitle,
|
||||
theme.textTheme.subtitle1,
|
||||
theme.textTheme.titleSmall,
|
||||
),
|
||||
)
|
||||
],
|
||||
|
@ -132,6 +132,7 @@ class _EmailPasswordLoginFormState extends State<EmailPasswordLoginForm> {
|
|||
initialValue: options.initialEmail,
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
textInputAction: TextInputAction.next,
|
||||
style: options.emailTextStyle,
|
||||
decoration: options.decoration.copyWith(
|
||||
hintText: options.emailHintText,
|
||||
prefixIcon: options.emailInputPrefix,
|
||||
|
@ -149,6 +150,7 @@ class _EmailPasswordLoginFormState extends State<EmailPasswordLoginForm> {
|
|||
initialValue: options.initialPassword,
|
||||
keyboardType: TextInputType.visiblePassword,
|
||||
textInputAction: TextInputAction.done,
|
||||
style: options.passwordTextStyle,
|
||||
onFieldSubmitted: (_) => _handleLogin(),
|
||||
decoration: options.decoration.copyWith(
|
||||
hintText: options.passwordHintText,
|
||||
|
|
|
@ -106,6 +106,7 @@ class _ForgotPasswordFormState extends State<ForgotPasswordForm> {
|
|||
initialValue: options.initialEmail,
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
textInputAction: TextInputAction.next,
|
||||
style: options.emailTextStyle,
|
||||
decoration: options.decoration.copyWith(
|
||||
prefixIcon: options.emailInputPrefix,
|
||||
label: options.emailLabel,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: flutter_login
|
||||
description: A new Flutter package project.
|
||||
version: 3.1.1
|
||||
description: Flutter Login Component
|
||||
version: 3.1.2
|
||||
|
||||
environment:
|
||||
sdk: ">=2.18.1 <3.0.0"
|
||||
|
|
Loading…
Reference in a new issue