You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I read that I can use custom key to send additional data with setCustomKey method. However, I couldn't find a way to remove it for the next error report.
Here is my firebase_logger.dart
class FirebaseLogger implements ILogger {
FirebaseCrashlytics get _crashlytics => FirebaseCrashlytics.instance;
@override
Future<void> init() async {
await Firebase.initializeApp();
}
@override
Future<void> trackError(
String name, {
Map<String, String> properties,
dynamic exception,
StackTrace stackTrace,
}) async {
final String userId = getUserId();
if (userId != null) _crashlytics.setUserIdentifier(userId);
properties.forEach((key, value) {
_crashlytics.setCustomKey(key, value);
});
_crashlytics.recordError(exception, stackTrace);
// Clear the keys for the next log
properties.forEach((key, value) {
_crashlytics.setCustomKey(key, '');
});
if (employeeId != null) _crashlytics.setUserIdentifier('');
}
}
I tried triggering testError1 and then testError2.
I read oldquestions (which may not valid anymore) that I had to set it null or empty in android SDK, but in flutter they checked it with assert not null. Giving them empty value gave the result of testError2 empty id1 and name1 properties. Is there a way to reset the keys/properties?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I read that I can use custom key to send additional data with
setCustomKey
method. However, I couldn't find a way to remove it for the next error report.Here is my
firebase_logger.dart
and here are my error methods:
I tried triggering
testError1
and thentestError2
.I read old questions (which may not valid anymore) that I had to set it null or empty in android SDK, but in flutter they checked it with assert not null. Giving them empty value gave the result of
testError2
emptyid1
andname1
properties. Is there a way to reset the keys/properties?Beta Was this translation helpful? Give feedback.
All reactions