setUserIdentifier method

  1. @override
Future<void> setUserIdentifier(
  1. String identifier
)
override

Records a user ID (identifier) that's associated with subsequent fatal and non-fatal reports.

The user ID is visible in the session view on the Firebase Crashlytics console. Identifiers longer than 1024 characters will be truncated.

Ensure you have collected permission to store any personal identifiable information from the user if required.

Implementation

@override
Future<void> setUserIdentifier(String identifier) async {
  try {
    await channel.invokeMethod<void>(
        'Crashlytics#setUserIdentifier', <String, dynamic>{
      'identifier': identifier,
    });
  } on PlatformException catch (e, s) {
    throw platformExceptionToFirebaseException(e, s);
  }
}