setCurrentAppsentrikId method

  1. @override
Future<void> setCurrentAppsentrikId(
  1. String appsentrikId
)
override

Inform native side about the current appsentrik_id so that native crashes can be tagged with the same logical user.

Implementation

@override
Future<void> setCurrentAppsentrikId(String appsentrikId) async {
  try {
    await methodChannel.invokeMethod<void>('setCurrentAppsentrikId', {
      'appsentrikId': appsentrikId,
    });
  } on MissingPluginException catch (error) {
    debugPrint(
      '[AppSentrik] setCurrentAppsentrikId native method missing; ignored: $error',
    );
  } on PlatformException catch (error) {
    debugPrint(
      '[AppSentrik] setCurrentAppsentrikId platform error; ignored: $error',
    );
  } catch (error) {
    debugPrint('[AppSentrik] setCurrentAppsentrikId failed; ignored: $error');
  }
}