From 301939bf39c8a97ca2711f397232d0a6edb215ba Mon Sep 17 00:00:00 2001 From: Tobe O Date: Sun, 12 Feb 2017 19:09:47 -0500 Subject: [PATCH] Update user.dart --- lib/src/models/user.dart | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/src/models/user.dart b/lib/src/models/user.dart index 9e4ad39..7368895 100644 --- a/lib/src/models/user.dart +++ b/lib/src/models/user.dart @@ -26,11 +26,8 @@ class User extends Model with _$UserSerializerMixin { this.email, this.username, this.password, - List roles: const []}) { + Iterable roles: const []}) { this.id = id; - - if (roles != null) { - this.roles.addAll(roles); - } + this.roles.addAll(roles ?? []); } }