Skip to content

Commit

Permalink
Fix cast list
Browse files Browse the repository at this point in the history
  • Loading branch information
thanhit93 committed May 29, 2021
1 parent 22a3bea commit ffeb9a3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/contact.dart
Expand Up @@ -303,21 +303,21 @@ class Contact {
for (final c in _iterableKey(dyn, _klinkedContactIds)) "$c",
],
emails: [for (final m in _iterableKey(dyn, _kemails)) Item.fromMap(m)]
.notNull(),
.notNull().toList(),
phones: [for (final m in _iterableKey(dyn, _kphones)) Item.fromMap(m)]
.notNull(),
.notNull().toList(),
socialProfiles: [
for (final m in _iterableKey(dyn, _ksocialProfiles)) Item.fromMap(m)
].whereType<Item>().toList(),
urls: [for (final m in _iterableKey(dyn, _kurls)) Item.fromMap(m)]
.notNull(),
.notNull().toList(),
dates: [
for (final m in _iterableKey(dyn, _kdates)) ContactDate.fromMap(m)
].notNull(),
].notNull().toList(),
postalAddresses: [
for (final m in _iterableKey(dyn, _kpostalAddresses))
PostalAddress.fromMap(m)
].notNull(),
].notNull().toList(),
avatar: dyn[_kavatar] as Uint8List?,
note: dyn[_knote] as String?,
);
Expand Down Expand Up @@ -558,7 +558,7 @@ extension ItemListsToMap on Iterable<Item> {
List<Map<String, String>> toJson() {
return [
for (var i in this) i.toMap(),
].notNull();
].notNull().toList();
}
}

Expand Down

0 comments on commit ffeb9a3

Please sign in to comment.