Context class

Constructors

Context({ContextType contextType = ContextType.unknown, UserType userType = UserType.unknown, PayloadType payloadType = PayloadType.unknown, String description = '', String userId = '', String deviceId = '', String productId = '', String versionId = '', String installId = '', String locale = '', int sessionId = -1, bool isInternal = false, bool isSnapshot = false, String snapshotVariant = '', bool isReady = false, bool hasInput = false, String authSessionId = '', bool isAnonymous = false, bool isGlobal = false, String authProvider = '', String ssoConnectionId = '', String testLinkId = '', String testLinkName = '', String geoCountry = '', String geoSubdivision = '', String geoCity = '', int edgeRttMsec = 0, bool receiveAllMessages = false, int preciseJoinedAt = 0, String userAgent = '', ClientType clientType = ClientType.unknown, String uniqueSessionId = '', Map<String, String> parameters = const {}, SdkType sdkType = SdkType.unknown, int sdkCapability = 0, int viewportWidth = 0, int viewportHeight = 0, String theme = '', String timezone = '', bool isTouchDevice = false, String initialPath = '', String initialUrl = '', StyleFormat styleFormat = StyleFormat.css, bool supportsCompression = true, bool isSoftDisconnected = false, int softDisconnectAt = 0})
Context.fromJson(Map<String, dynamic> json)
factory
Context.fromReader(TeleportObjectReader reader)
factory
Context.fromTeleport(Uint8List data)
factory

Properties

authProvider ↔ String
Copied from ConnectToken.AuthProvider — how the user signed in: google, microsoft, apple, facebook, signicat, email, passkey or sso. Empty for a guest, and for a sign-in that predates the platform recording it, which is not the same as any one method. Signed by the backend, so an app may rely on it, for example to require that its enterprise users came in through their organisation's IdP.
getter/setter pair
authSessionId ↔ String
getter/setter pair
clientType ↔ ClientType
getter/setter pair
contextType ↔ ContextType
getter/setter pair
description ↔ String
getter/setter pair
deviceId ↔ String
getter/setter pair
edgeRttMsec ↔ int
Copied from ConnectToken.EdgeRttMsec — the round-trip time, in milliseconds, between the client and the load balancer that answered its /init, measured once when it connected. A first guess at the connection's quality, for example to start on lighter media for a distant or slow client before anything else is known. 0 when not measured. It is not the latency to this server.
getter/setter pair
geoCity ↔ String
Copied from ConnectToken.GeoCity — the city name the load balancer placed the client in (Helsinki). Empty when it could not, which is common. Same trust as GeoCountry.
getter/setter pair
geoCountry ↔ String
Copied from ConnectToken.GeoCountry — the country the load balancer placed the client in at /init, as an uppercase CLDR region code (FI, US; ISO 3166-1 alpha-2 for nearly every country). Empty when the client was not placed, which every local run is. It is the network's location, so a VPN, a corporate egress or a mobile carrier's gateway reports where that is rather than the person. Only the app sees the four placement fields: the copy of a Context that reaches any other client in the session has them empty. Resolved by the backend from the edge, never from the client, but still a hint for what to show: a request that bypasses the load balancer carries its own value, so never gate access, pricing or compliance on it.
getter/setter pair
geoSubdivision ↔ String
Copied from ConnectToken.GeoSubdivision — the state, province or region within GeoCountry, as a CLDR subdivision id (USCA for California). Empty whenever GeoCountry is, and where the edge could not narrow it down. Same trust as GeoCountry.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
hasInput ↔ bool
getter/setter pair
initialPath ↔ String
getter/setter pair
initialUrl ↔ String
Copied from ConnectToken.InitialUrl — the absolute URL the browser loaded, so an app can see the host it was reached on (a custom customer domain) and not just the path. A strict superset of InitialPath: same SDK-internal ikon-* query params stripped, everything else kept, so InitialUrl.PathAndQuery reproduces InitialPath. Empty for every non-browser client, so read it as an addition to InitialPath rather than a replacement. Client-controlled like InitialPath — treat it as a hint and re-authorize server-side; it must never gate anything security-relevant on its own.
getter/setter pair
installId ↔ String
getter/setter pair
isAnonymous ↔ bool
Copied from ConnectToken.IsAnonymous — true when the user is anonymous (guest login or no login): a device-scoped identity rather than a real account. The authoritative signal for guest detection; AuthSessionId is a login-session identifier, not an authentication flag.
getter/setter pair
isGlobal ↔ bool
Copied from ConnectToken.IsGlobal — true when this anonymous user is the space's GLOBAL communal identity (the "global" login method), where every global visitor shares one UserId. Always false for device-scoped guests and signed-in users; implies IsAnonymous. Lets an app offer "continue as guest" or per-visitor features only where they make sense.
getter/setter pair
isInternal ↔ bool
getter/setter pair
isReady ↔ bool
getter/setter pair
isSnapshot ↔ bool
Copied from ConnectToken.IsSnapshot — marks the build-time snapshot-capture client.
getter/setter pair
isSoftDisconnected ↔ bool
getter/setter pair
isTouchDevice ↔ bool
getter/setter pair
locale ↔ String
getter/setter pair
parameters ↔ Map<String, String>
getter/setter pair
payloadType ↔ PayloadType
getter/setter pair
preciseJoinedAt ↔ int
getter/setter pair
productId ↔ String
getter/setter pair
receiveAllMessages ↔ bool
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sdkCapability ↔ int
Opaque, monotonically-increasing capability level advertised by the connecting SDK (companion to SdkType). 0 = legacy/unknown. Copied from ConnectToken.SdkCapability when the server builds the client Context.
getter/setter pair
sdkType ↔ SdkType
getter/setter pair
sessionId ↔ int
getter/setter pair
snapshotVariant ↔ String
Copied from ConnectToken.SnapshotVariant — the boot-snapshot variant id the capture client asks the app to render; empty for route captures and all live clients. Client-controlled like IsSnapshot — must never gate anything security-relevant.
getter/setter pair
softDisconnectAt ↔ int
getter/setter pair
ssoConnectionId ↔ String
Copied from ConnectToken.SsoConnectionId — the space's SSO connection the user signed in through; empty unless AuthProvider is sso. What an app compares against the connection it assigned to one of its tenants.
getter/setter pair
styleFormat ↔ StyleFormat
getter/setter pair
supportsCompression ↔ bool
getter/setter pair
testLinkId ↔ String
Copied from ConnectToken.TestLinkId / TestLinkName — set when this session came in through a test link the app's makers minted. A guest that is also a tester: the feedback button is offered whatever the audience setting, and its reports carry the link's name. Empty otherwise.
getter/setter pair
testLinkName ↔ String
getter/setter pair
theme ↔ String
getter/setter pair
timezone ↔ String
getter/setter pair
uniqueSessionId ↔ String
getter/setter pair
userAgent ↔ String
getter/setter pair
userId ↔ String
getter/setter pair
userType ↔ UserType
getter/setter pair
versionId ↔ String
getter/setter pair
viewportHeight ↔ int
getter/setter pair
viewportWidth ↔ int
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited
toTeleport() → Uint8List
writeTo(TeleportObjectWriter scope) → void

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

fieldIdAuthProvider → const int
fieldIdAuthSessionId → const int
fieldIdClientType → const int
fieldIdContextType → const int
fieldIdDescription → const int
fieldIdDeviceId → const int
fieldIdEdgeRttMsec → const int
fieldIdGeoCity → const int
fieldIdGeoCountry → const int
fieldIdGeoSubdivision → const int
fieldIdHasInput → const int
fieldIdInitialPath → const int
fieldIdInitialUrl → const int
fieldIdInstallId → const int
fieldIdIsAnonymous → const int
fieldIdIsGlobal → const int
fieldIdIsInternal → const int
fieldIdIsReady → const int
fieldIdIsSnapshot → const int
fieldIdIsSoftDisconnected → const int
fieldIdIsTouchDevice → const int
fieldIdLocale → const int
fieldIdParameters → const int
fieldIdPayloadType → const int
fieldIdPreciseJoinedAt → const int
fieldIdProductId → const int
fieldIdReceiveAllMessages → const int
fieldIdSdkCapability → const int
fieldIdSdkType → const int
fieldIdSessionId → const int
fieldIdSnapshotVariant → const int
fieldIdSoftDisconnectAt → const int
fieldIdSsoConnectionId → const int
fieldIdStyleFormat → const int
fieldIdSupportsCompression → const int
fieldIdTestLinkId → const int
fieldIdTestLinkName → const int
fieldIdTheme → const int
fieldIdTimezone → const int
fieldIdUniqueSessionId → const int
fieldIdUserAgent → const int
fieldIdUserId → const int
fieldIdUserType → const int
fieldIdVersionId → const int
fieldIdViewportHeight → const int
fieldIdViewportWidth → const int
teleportVersion → const int