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