RudderTraits constructor
RudderTraits({})
Creates a new RudderTraits instance with optional user information.
All parameters are optional and can be set individually or through the various put methods after construction.
Parameters:
address
- User's address informationage
- User's age as a stringbirthday
- User's birthdaycompany
- User's company informationcreatedAt
- Account creation timestampdescription
- User descriptionemail
- User's email addressfirstName
- User's first namegender
- User's genderid
- User's unique identifierlastName
- User's last namename
- User's full namephone
- User's phone numbertitle
- User's title or positionuserName
- User's username
Implementation
RudderTraits(
{Address? address,
String? age,
String? birthday,
Company? company,
String? createdAt,
String? description,
String? email,
String? firstName,
String? gender,
String? id,
String? lastName,
String? name,
String? phone,
String? title,
String? userName}) {
if (address != null) {
__traitsMap["address"] = address.addressMap;
}
if (age != null) {
__traitsMap["age"] = age;
}
if (birthday != null) {
__traitsMap["birthday"] = birthday;
}
if (company != null) {
__traitsMap["company"] = company.companyMap;
}
if (createdAt != null) {
__traitsMap["createdAt"] = createdAt;
}
if (description != null) {
__traitsMap["description"] = description;
}
if (email != null) {
__traitsMap["email"] = email;
}
if (firstName != null) {
__traitsMap["firstName"] = firstName;
}
if (gender != null) {
__traitsMap["gender"] = gender;
}
if (id != null) {
__traitsMap["id"] = id;
__traitsMap["oldId"] = id;
}
if (lastName != null) {
__traitsMap["lastName"] = lastName;
}
if (name != null) {
__traitsMap["name"] = name;
}
if (phone != null) {
__traitsMap["phone"] = phone;
}
if (title != null) {
__traitsMap["title"] = title;
}
if (userName != null) {
__traitsMap["userName"] = userName;
}
}