Skip to content

Commit 875e5a2

Browse files
committed
add verified_type check
1 parent 499bf3b commit 875e5a2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/user.dart

+3-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,9 @@ class UserWithExtra extends User {
223223
..entities = json['entities'] == null ? null : UserEntities.fromJson(json['entities'] as Map<String, dynamic>)
224224
..description = json['description'] as String?
225225
..protected = json['protected'] as bool?
226-
..verified = json['ext_is_blue_verified'] ?? json['verified'] ?? json['is_blue_verified'] as bool?
226+
..verified = json['verified_type'] == "Business"
227+
? true
228+
: json['ext_is_blue_verified'] ?? json['verified'] ?? json['is_blue_verified'] as bool?
227229
..status = json['status'] == null ? null : Tweet.fromJson(json['status'] as Map<String, dynamic>)
228230
..followersCount = json['followers_count'] as int?
229231
..friendsCount = json['friends_count'] as int?

0 commit comments

Comments
 (0)