fix own user model

This commit is contained in:
Salvatore Giordano
2021-04-20 14:53:19 +02:00
parent 7e80071aa2
commit 8f7106020f
2 changed files with 3 additions and 3 deletions
@@ -17,8 +17,8 @@ class OwnUser extends User {
this.totalUnreadCount = 0,
this.unreadChannels,
this.channelMutes = const [],
String id = '',
String role = '',
required String id,
String? role,
DateTime? createdAt,
DateTime? updatedAt,
DateTime? lastActive,
@@ -23,7 +23,7 @@ OwnUser _$OwnUserFromJson(Map<String, dynamic> json) {
.toList() ??
[],
id: json['id'] as String,
role: json['role'] as String,
role: json['role'] as String?,
createdAt: json['created_at'] == null
? null
: DateTime.parse(json['created_at'] as String),