Fix parsing of user model if email is not present
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
kolaente 2020-01-09 19:34:38 +01:00
parent 4d61a6e918
commit 7619eee570
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ class User {
User(this.id, this.email, this.username, this.avatarHash);
User.fromJson(Map<String, dynamic> json)
: id = json['id'],
email = json['email'],
email = json.containsKey('email') ? json['email'] : '',
username = json['username'],
avatarHash = json['avatarUrl'];