[Classes] Non nullable id and mxcurl
This commit is contained in:
parent
e4d9113ed8
commit
740ac0dc9c
|
|
@ -66,13 +66,13 @@ class User {
|
||||||
MxContent get avatar_url => avatarUrl;
|
MxContent get avatar_url => avatarUrl;
|
||||||
|
|
||||||
User(
|
User(
|
||||||
this.id, {
|
String id, {
|
||||||
this.membership,
|
this.membership,
|
||||||
this.displayName,
|
this.displayName,
|
||||||
this.avatarUrl,
|
this.avatarUrl,
|
||||||
this.powerLevel,
|
this.powerLevel,
|
||||||
this.room,
|
this.room,
|
||||||
});
|
}) : this.id = id ?? "";
|
||||||
|
|
||||||
/// Returns the displayname or the local part of the Matrix ID if the user
|
/// Returns the displayname or the local part of the Matrix ID if the user
|
||||||
/// has no displayname.
|
/// has no displayname.
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ class MxContent {
|
||||||
final String _mxc;
|
final String _mxc;
|
||||||
|
|
||||||
/// Insert a mxc:// uri here.
|
/// Insert a mxc:// uri here.
|
||||||
MxContent(this._mxc);
|
MxContent(String mxcUrl) : this._mxc = mxcUrl ?? "";
|
||||||
|
|
||||||
/// Returns the mxc uri.
|
/// Returns the mxc uri.
|
||||||
get mxc => _mxc;
|
get mxc => _mxc;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue