setMobileUserId method

Future<void> setMobileUserId(
  1. int mobileUserId
)

Sets and saves the mobile user id. @param mobileUserId The mobile user id that will be saved.

Implementation

Future<void> setMobileUserId(int mobileUserId) async {
  SharedPreferences prefs = await SharedPreferences.getInstance();
  await prefs.setInt(_mobileUserIdKey, mobileUserId);
  await MBAudienceManager.shared.updateMetadata();
}