identifyWithTraits static method

Future<void> identifyWithTraits(
  1. String id,
  2. Map<String, dynamic> traits
)

@Deprecated backward compatibility wrapper for setUserId and setAttribute. Use those unless really necessary.

Sets a correlation identifier for this session. This value can be looked up via web dashboard. For example, setting correlation to the value of the user-id after they logged in. Can be called only once per session. Subsequent calls will be ignored.

Implementation

static Future<void> identifyWithTraits(
    String id, Map<String, dynamic> traits) async {
  final Map<String, dynamic> args = <String, dynamic>{
    'id': id,
    'traits': traits
  };

  await TestFairyBase.channel.invokeMethod<void>('identifyWithTraits', args);
}