UserProperties class

Represents user properties for analytics tracking

Constructors

UserProperties({required String userId, String? name, String? email, int? age, String? gender, String? location, String? language, String? subscriptionStatus, double? totalSpent, double? lifetimeValue, DateTime? registrationDate, DateTime? lastActivity, Map<String, Object?> customProperties = const <String, Object?>{}})
Creates a UserProperties
const
UserProperties.empty()
Creates an empty UserProperties
factory
UserProperties.fromMap(Map<String, dynamic> map)
Creates a UserProperties from a map
factory

Properties

age int?
User's age
final
customProperties Map<String, Object?>
Custom properties for the user
final
email String?
User's email address
final
gender String?
User's gender
final
hashCode int
The hash code for this object.
no setterinherited
language String?
User's preferred language
final
lastActivity DateTime?
User's last activity date
final
lifetimeValue double?
User's lifetime value
final
location String?
User's location/country
final
name String?
User's display name
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
registrationDate DateTime?
User's registration date
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
subscriptionStatus String?
User's subscription status
final
totalSpent double?
User's total spent amount
final
userId String
User's unique identifier
final

Methods

copyWith({String? userId, String? name, String? email, int? age, String? gender, String? location, String? language, String? subscriptionStatus, double? totalSpent, double? lifetimeValue, DateTime? registrationDate, DateTime? lastActivity, Map<String, Object?>? customProperties}) UserProperties
Creates a copy of the UserProperties with the specified properties overridden by the new values
fromJson(String json) UserProperties
Converts the object from a JSON string representation.
inherited
fromMap(Map<String, dynamic> map) UserProperties
Converts the object from a Map representation.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() String
Converts the object to a JSON string representation.
inherited
toMap() Map<String, dynamic>
Converts the BaseDataModel object to a Map representation.
toString() String
A string representation of this object.
inherited

Operators

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