From 9473c3dcaaa63a42b5db8af15fcd1a50a77b2fdb Mon Sep 17 00:00:00 2001 From: Mathias Mogensen <42929161+Xazin@users.noreply.github.com> Date: Wed, 1 Mar 2023 09:14:19 +0100 Subject: [PATCH] ci: if-condition on signing step --- .../utils/firebase_crashlytics_extension.dart | 21 +++++++++++++++++++ .../profile/widget/commitments_tab.dart | 12 +++++------ 2 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 lib/core/utils/firebase_crashlytics_extension.dart diff --git a/lib/core/utils/firebase_crashlytics_extension.dart b/lib/core/utils/firebase_crashlytics_extension.dart new file mode 100644 index 00000000..4136d5d4 --- /dev/null +++ b/lib/core/utils/firebase_crashlytics_extension.dart @@ -0,0 +1,21 @@ +import 'package:firebase_crashlytics/firebase_crashlytics.dart'; + +extension FirebaseCrashlyticsLogger on FirebaseCrashlytics { + static Future log(String message) async { + FirebaseCrashlytics.instance.log(message); + } + + static Future warn( + Exception exception, + StackTrace? stackTrace, { + String? message, + bool fatal = true, + }) async { + FirebaseCrashlytics.instance.recordError( + exception, + stackTrace, + reason: message, + fatal: fatal, + ); + } +} diff --git a/lib/presentation/profile/widget/commitments_tab.dart b/lib/presentation/profile/widget/commitments_tab.dart index 39eb9ced..8cfebc0f 100644 --- a/lib/presentation/profile/widget/commitments_tab.dart +++ b/lib/presentation/profile/widget/commitments_tab.dart @@ -70,12 +70,12 @@ class CommitmentsTab extends StatelessWidget { ), ), ), - if (user == null || (crowdActions?.isEmpty ?? false)) ...[ - SignUpCTA( - user: user, - title: 'View your amazing commitments here', - ), - ], + ], + if (user == null || (crowdActions?.isEmpty ?? false)) ...[ + SignUpCTA( + user: user, + title: 'View your amazing commitments here', + ), ], ], ),