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 ?? []); } }