setSnowplowUserId method

Future<void> setSnowplowUserId(
  1. String userId
)

Implementation

Future<void> setSnowplowUserId(String userId) async {
  final timestamp = DateFormat("yyyy-MM-ddTHH:mm:ss").format(DateTime.now());
  _cache[_userIdKey] = userId;
  _cache[_timestampKey] = timestamp;

  await SecureStorage.storeSecureData(_userIdKey, userId);
  await SecureStorage.storeSecureData(_timestampKey, timestamp);
}