Skip to content

Commit 909c8a1

Browse files
committed
inline use of profile
1 parent 84fdfff commit 909c8a1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/src/models/account.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,6 @@ class Account {
128128

129129
/// Convert this object into a JSON object.
130130
Map<String, dynamic> toJson() {
131-
final Profile? accountProfile = profile;
132-
133131
return <String, dynamic>{
134132
'created': created?.toIso8601String(),
135133
'data': data,
@@ -141,7 +139,7 @@ class Account {
141139
'lastUpdated': lastUpdated?.toIso8601String(),
142140
'loginProvider': loginProvider,
143141
'oldestDataUpdated': oldestDataUpdated?.toIso8601String(),
144-
if (accountProfile != null) 'profile': accountProfile.toJson(),
142+
if (profile != null) 'profile': profile!.toJson(),
145143
'registered': registered?.toIso8601String(),
146144
'signatureTimestamp': signatureTimestamp?.toIso8601String(),
147145
'socialProviders': socialProviders,

0 commit comments

Comments
 (0)