sendLoginEvent method
Implementation
@override
Future<void> sendLoginEvent(LoginEvent event) async {
if (Platform.isIOS) {
final payload = {
"account_id": event.accountId,
"external_id": event.externalId,
"flttr_lgn": jsonEncode({
"loc": {
"lat": event.location?.latitude,
"lng": event.location?.longitude,
"ts": event.location?.timestamp,
},
"base": {
"evnt_tag": event.tag,
"stts": event.status,
"prop": _transformToStringMap(event.properties),
},
}),
};
await methodChannel.invokeMethod<void>('sendLoginEvent', payload);
} else {
await methodChannel.invokeMethod<void>('sendLoginEvent', {
"accountId": event.accountId,
"externalId": event.externalId,
"tag": event.tag,
"status": event.status,
"location": event.location != null
? _parseEventLocation(event.location!)
: null,
"properties": event.properties,
});
}
return;
}