From e8f3292dc7e36c7ee9f0fd57a98d8d38cdaf38a9 Mon Sep 17 00:00:00 2001 From: mike doornenbal Date: Tue, 2 Apr 2024 15:41:36 +0200 Subject: [PATCH] fix: add default loginoptions for email and password fields --- CHANGELOG.md | 4 ++++ lib/src/config/login_options.dart | 11 +++++++++++ pubspec.yaml | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36b458c..9d7b702 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 6.0.1 + +* Added default loginOptions for email and password fields. + ## 6.0.0 * Changed ForgotPasswordform to use the same layout as the EmailPasswordLoginForm. diff --git a/lib/src/config/login_options.dart b/lib/src/config/login_options.dart index 9a8fd25..d61f245 100644 --- a/lib/src/config/login_options.dart +++ b/lib/src/config/login_options.dart @@ -35,6 +35,17 @@ class LoginOptions { this.forgotPasswordSpacerOptions = const ForgotPasswordSpacerOptions(), }); + factory LoginOptions.defaults() => const LoginOptions( + emailDecoration: InputDecoration( + labelText: 'Email', + hintText: 'Enter your email', + ), + passwordDecoration: InputDecoration( + labelText: 'Password', + hintText: 'Enter your password', + ), + ); + /// Builds the login button. final ButtonBuilder loginButtonBuilder; diff --git a/pubspec.yaml b/pubspec.yaml index 5166b25..33bf03c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_login description: Flutter Login Component -version: 6.0.0 +version: 6.0.1 environment: sdk: ">=2.18.1 <3.0.0"