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', + ), ], ], ),