Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/gradle-8' into gradle-8
Browse files Browse the repository at this point in the history
  • Loading branch information
juliansteenbakker committed Oct 16, 2023
2 parents c42ad34 + 9723092 commit ede2cb9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 26 deletions.
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ packages:
path: ".."
relative: true
source: path
version: "4.2.1"
version: "4.2.2"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down
39 changes: 15 additions & 24 deletions lib/src/widgets/cards/login_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,13 @@ class _LoginCardState extends State<_LoginCard> with TickerProviderStateMixin {

if (!DartHelper.isNullOrEmpty(error)) {
await control?.reverse();
showErrorToast(context, messages.flushbarTitleError, error!);

// Only show error toast if error is not in exclusion list
if (loginProvider.errorsToExcludeFromErrorMessage == null ||
!loginProvider.errorsToExcludeFromErrorMessage!.contains(error)) {
showErrorToast(context, messages.flushbarTitleError, error!);
}

Future.delayed(const Duration(milliseconds: 271), () {
if (mounted) {
setState(() => _showShadow = true);
Expand All @@ -326,7 +332,12 @@ class _LoginCardState extends State<_LoginCard> with TickerProviderStateMixin {
);
await control?.reverse();
if (!DartHelper.isNullOrEmpty(error)) {
showErrorToast(context, messages.flushbarTitleError, error!);
// Only show error toast if error is not in exclusion list
if (loginProvider.errorsToExcludeFromErrorMessage == null ||
!loginProvider.errorsToExcludeFromErrorMessage!.contains(error)) {
showErrorToast(context, messages.flushbarTitleError, error!);
}

Future.delayed(const Duration(milliseconds: 271), () {
if (mounted) {
setState(() => _showShadow = true);
Expand Down Expand Up @@ -542,29 +553,9 @@ class _LoginCardState extends State<_LoginCard> with TickerProviderStateMixin {
final iconProvidersList = <LoginProvider>[];
for (final loginProvider in auth.loginProviders) {
if (loginProvider.button != null) {
buttonProvidersList.add(
LoginProvider(
icon: loginProvider.icon,
label: loginProvider.label,
button: loginProvider.button,
callback: loginProvider.callback,
animated: loginProvider.animated,
providerNeedsSignUpCallback:
loginProvider.providerNeedsSignUpCallback,
),
);
buttonProvidersList.add(loginProvider);
} else if (loginProvider.icon != null) {
iconProvidersList.add(
LoginProvider(
icon: loginProvider.icon,
label: loginProvider.label,
button: loginProvider.button,
callback: loginProvider.callback,
animated: loginProvider.animated,
providerNeedsSignUpCallback:
loginProvider.providerNeedsSignUpCallback,
),
);
iconProvidersList.add(loginProvider);
}
}
if (buttonProvidersList.isNotEmpty) {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_login
description: A login widget with login/signup functionalities to help speed up development
version: 4.2.1
version: 4.2.3
repository: https://github.com/NearHuscarl/flutter_login

environment:
Expand Down

0 comments on commit ede2cb9

Please sign in to comment.