UserV2 class

The user object contains Twitter user account metadata describing the referenced user. The user object is the primary object returned in the users lookup endpoint. When requesting additional user fields on this endpoint, simply use the fields parameter user.fields.

The user object can also be found as a child object and expanded in the Tweet object. The object is available for expansion with ?expansions=author_id or ?expansions=in_reply_to_user_id to get the condensed object with only default fields. Use the expansion with the field parameter: user.fields when requesting additional fields to complete the object.

Annotations
  • @JsonSerializable()

Constructors

UserV2({required String id, required String name, required String username, String? profileImageUrl, bool? verified = false})
const
UserV2.fromJson(Map<String, dynamic> json)
factory
UserV2.fromRawJson(String str)
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
id String
The unique identifier of this user.
final
name String
The name of the user, as they’ve defined it on their profile. Not necessarily a person’s name. Typically capped at 50 characters, but subject to change.
final
profileImageUrl String?
A URL provided by a Twitter user in their profile. This could be a homepage, but is not always the case.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
username String
The Twitter screen name, handle, or alias that this user identifies themselves with. Usernames are unique but subject to change. Typically a maximum of 15 characters long, but some historical accounts may exist with longer names.
final
verified bool?
Indicates whether or not this Twitter user has a verified account. A verified account lets people know that an account of public interest is authentic.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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