identify method

  1. @override
void identify({
  1. required String identifier,
  2. Map<String, dynamic> attributes = const {},
})
override

Identify a person using a unique identifier, eg. email id. Note that you can identify only 1 profile at a time. In case, multiple identifiers are attempted to be identified, then the last identified profile will be removed automatically.

Implementation

@override
void identify(
    {required String identifier,
    Map<String, dynamic> attributes = const {}}) async {
  try {
    final payload = {
      TrackingConsts.identifier: identifier,
      TrackingConsts.attributes: attributes
    };
    methodChannel.invokeMethod(MethodConsts.identify, payload);
  } on PlatformException catch (exception) {
    handleException(exception);
  }
}