Update user.dart
This commit is contained in:
parent
50e530e2f1
commit
301939bf39
1 changed files with 2 additions and 5 deletions
|
@ -26,11 +26,8 @@ class User extends Model with _$UserSerializerMixin {
|
||||||
this.email,
|
this.email,
|
||||||
this.username,
|
this.username,
|
||||||
this.password,
|
this.password,
|
||||||
List<String> roles: const []}) {
|
Iterable<String> roles: const []}) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
|
this.roles.addAll(roles ?? []);
|
||||||
if (roles != null) {
|
|
||||||
this.roles.addAll(roles);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue