fix: Make defaults catch if constructor is null
This commit is contained in:
parent
ff04b1cce5
commit
f08dabaf03
|
|
@ -318,19 +318,24 @@ class Room {
|
||||||
Room({
|
Room({
|
||||||
this.id,
|
this.id,
|
||||||
this.membership = Membership.join,
|
this.membership = Membership.join,
|
||||||
this.notificationCount = 0,
|
int notificationCount,
|
||||||
this.highlightCount = 0,
|
int highlightCount,
|
||||||
this.prev_batch = '',
|
String prev_batch,
|
||||||
this.client,
|
this.client,
|
||||||
this.notificationSettings,
|
this.notificationSettings,
|
||||||
this.mHeroes = const [],
|
this.mHeroes = const [],
|
||||||
this.mInvitedMemberCount = 0,
|
int mInvitedMemberCount,
|
||||||
this.mJoinedMemberCount = 0,
|
int mJoinedMemberCount,
|
||||||
this.roomAccountData = const {},
|
this.roomAccountData = const {},
|
||||||
double newestSortOrder = 0.0,
|
double newestSortOrder = 0.0,
|
||||||
double oldestSortOrder = 0.0,
|
double oldestSortOrder = 0.0,
|
||||||
}) : _newestSortOrder = newestSortOrder,
|
}) : _newestSortOrder = newestSortOrder,
|
||||||
_oldestSortOrder = oldestSortOrder;
|
_oldestSortOrder = oldestSortOrder,
|
||||||
|
notificationCount = notificationCount ?? 0,
|
||||||
|
highlightCount = highlightCount ?? 0,
|
||||||
|
prev_batch = prev_batch ?? '',
|
||||||
|
mInvitedMemberCount = mInvitedMemberCount ?? 0,
|
||||||
|
mJoinedMemberCount = mJoinedMemberCount ?? 0;
|
||||||
|
|
||||||
/// The default count of how much events should be requested when requesting the
|
/// The default count of how much events should be requested when requesting the
|
||||||
/// history of this room.
|
/// history of this room.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue