Added default null color for labels

This commit is contained in:
kolaente 2019-03-20 07:46:32 +01:00
parent 714aed4603
commit 7b142d5e65
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ class Label {
: id = json['id'],
title = json['title'],
description = json['description'],
color = new Color(int.parse(json['hex_color'], radix: 16) + 0xFF000000),
color = json['hex_color'] == '' ? null : new Color(int.parse(json['hex_color'], radix: 16) + 0xFF000000),
updated = DateTime.fromMillisecondsSinceEpoch(json['updated']),
created = DateTime.fromMillisecondsSinceEpoch(json['created']),
createdBy = User.fromJson(json['created_by']);