setSubId method

  1. @override
Future<void> setSubId(
  1. String subId
)
override

Sets the subscription ID for tracking purposes.

This method allows you to set a sub ID after the SDK has been initialized.

Throws an UnimplementedError if the platform-specific implementation has not been provided.

Implementation

@override
Future<void> setSubId(String subId) async {
  try {
    await methodChannel.invokeMethod('setSubId', {'subId': subId});
  } on PlatformException {
    rethrow;
  } catch (e) {
    throw PlatformException(
        code: 'SET_SUB_ID_ERROR', message: 'Failed to set sub ID: $e');
  }
}