Skip to content

Commit

Permalink
logoUrlAndType can be empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
n13 committed Sep 15, 2023
1 parent 557f88c commit a3aad42
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/core/network/models/dao_data_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@ class DaoData {
});

factory DaoData.fromJson(Map<String, dynamic> json) {
print('DaoData.fromJson ${json}');
final Map<String, dynamic> settings = json['settings'][0];
final logoUrlAndType = settings['settings_logo_s']?.split(':') ?? ['', ''];
List<String>? logoUrlAndType = settings['settings_logo_s']?.split(':');
if (logoUrlAndType == null || logoUrlAndType.length != 2) {
logoUrlAndType = ['', ''];
}
return DaoData(
docId: json['docId'],
detailsDaoName: json['details_daoName_n'],
Expand Down

0 comments on commit a3aad42

Please sign in to comment.