FlutterAPI reference
Sessions & identity
Sessions & identity in the Flutter SDK.
import 'package:nexus_flutter/nexus.dart';NexusSessions
classThe sessions spine. identify names the end-user; track starts/refreshes
the journey session other services correlate into.
identify()
methodFuture<void> identify(String distinctId, {String? email, String? name, String? phone, Map<String, Object?>? traits})Identify the current end-user. All subsequent telemetry is attributed to it.
Parameters
Prop
Type
track()
methodFuture<String?> track({Map<String, Object?>? context})Start/refresh the active session and return its server sessionId.
Parameters
Prop
Type
Returns Future<String?>
reset()
methodFuture<void> reset()Forget the current user (e.g. on logout) and start a fresh session. Also clears the persisted identity, so subsequent launches start anonymous again.
View source