mirror of
https://github.com/Iconica-Development/flutter_login_widget.git
synced 2025-05-19 13:43:44 +02:00
Merge pull request #35 from Iconica-Development/feature/suffix-icon-options
feat: Add size and padding options for password suffix icon
This commit is contained in:
commit
7be44f21d5
4 changed files with 11 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
## 6.1.0
|
||||
|
||||
* Added 'suffixIconSize' and 'suffixIconPadding' to LoginOptions.
|
||||
|
||||
## 6.0.2
|
||||
|
||||
* Added more default loginOptions for login, forgot password and register.
|
||||
|
|
|
@ -81,6 +81,8 @@ class LoginOptions {
|
|||
padding: EdgeInsets.symmetric(horizontal: 60),
|
||||
),
|
||||
this.forgotPasswordCustomAppBar,
|
||||
this.suffixIconSize,
|
||||
this.suffixIconPadding,
|
||||
});
|
||||
|
||||
/// Builds the login button.
|
||||
|
@ -152,6 +154,8 @@ class LoginOptions {
|
|||
|
||||
/// Determines whether the password field should be obscured.
|
||||
final bool showObscurePassword;
|
||||
final double? suffixIconSize;
|
||||
final EdgeInsets? suffixIconPadding;
|
||||
|
||||
/// Get validations.
|
||||
ValidationService get validations =>
|
||||
|
|
|
@ -178,6 +178,7 @@ class _EmailPasswordLoginFormState extends State<EmailPasswordLoginForm> {
|
|||
decoration: options.passwordDecoration.copyWith(
|
||||
suffixIcon: options.showObscurePassword
|
||||
? IconButton(
|
||||
padding: options.suffixIconPadding,
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
_obscurePassword =
|
||||
|
@ -188,6 +189,7 @@ class _EmailPasswordLoginFormState extends State<EmailPasswordLoginForm> {
|
|||
_obscurePassword
|
||||
? Icons.visibility
|
||||
: Icons.visibility_off,
|
||||
size: options.suffixIconSize,
|
||||
),
|
||||
)
|
||||
: null,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: flutter_login
|
||||
description: Flutter Login Component
|
||||
version: 6.0.2
|
||||
version: 6.1.0
|
||||
|
||||
environment:
|
||||
sdk: ">=2.18.1 <3.0.0"
|
||||
|
|
Loading…
Reference in a new issue