testUser method

Future<void> testUser()

Implementation

Future<void> testUser() async {
  final String? userUrl = await smartlook.user.getUrl();
  final userProperties = smartlook.user.properties;
  assert(userUrl != null);
  debugPrint("User URL: $userUrl");

  await smartlook.user.setName('tester_name');
  await smartlook.user.setEmail('tester_email');
  await userProperties.putString('test_key', value: 'test_value');
  final String? value = await userProperties.getString('test_key');
  assert(value == 'test_value');

  final userSession = smartlook.user.session;
  final String? url = await userSession.getUrl();
  debugPrint("Session URL: $url");
  final String? urlWithTimestamp = await userSession.getUrlWithTimeStamp();
  debugPrint("Session URL with timestamp: $urlWithTimestamp");
}