ExperimentUser class
A user context for evaluating feature flags and experiments.
Pass to ExperimentClient.fetch, ExperimentClient.start, or ExperimentClient.setUser to identify the user for flag evaluation. Use copyWith to create modified copies without mutating the original.
Constructors
-
ExperimentUser({String? deviceId, String? userId, String? country, String? city, String? region, String? dma, String? language, String? platform, String? version, String? os, String? deviceModel, String? deviceBrand, String? deviceManufacturer, String? carrier, String? library, String? ipAddress, Map<
String, Object?> ? userProperties, Map<String, List< ? groups, Map<String> >String, Map< ? groupProperties})String, Map< >String, Object?> > -
Creates an ExperimentUser with the given fields.
const
Properties
- carrier → String?
-
The mobile carrier name.
final
- city → String?
-
The user's city.
final
- country → String?
-
The user's country.
final
- deviceBrand → String?
-
The device brand.
final
- deviceId → String?
-
The unique device identifier.
final
- deviceManufacturer → String?
-
The device manufacturer.
final
- deviceModel → String?
-
The device model.
final
- dma → String?
-
The user's Designated Market Area.
final
-
groupProperties
→ Map<
String, Map< ?String, Map< >String, Object?> > -
Group-level properties, keyed by group type, group name, then property name.
final
-
groups
→ Map<
String, List< ?String> > -
Group memberships as a map of group type to group names.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- ipAddress → String?
-
The user's IP address.
final
- language → String?
-
The user's language.
final
- library → String?
-
The SDK library identifier. Typically set automatically.
final
- os → String?
-
The operating system.
final
- platform → String?
-
The platform.
final
- region → String?
-
The user's region or state.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- userId → String?
-
The unique user identifier.
final
-
userProperties
→ Map<
String, Object?> ? -
Custom user properties for targeting.
final
- version → String?
-
The app version string.
final
Methods
-
copyWith(
{String? deviceId, String? userId, String? country, String? city, String? region, String? dma, String? language, String? platform, String? version, String? os, String? deviceModel, String? deviceBrand, String? deviceManufacturer, String? carrier, String? library, String? ipAddress, Map< String, Object?> ? userProperties, Map<String, List< ? groups, Map<String> >String, Map< ? groupProperties}) → ExperimentUserString, Map< >String, Object?> > - Returns a copy of this user with the given fields replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override