Use this.id
This commit is contained in:
parent
60dd6dacaa
commit
9e403b8710
|
@ -93,8 +93,7 @@ class Site {
|
||||||
this.rawConfig = rawConfig;
|
this.rawConfig = rawConfig;
|
||||||
this.lastManagedUpdate = lastManagedUpdate;
|
this.lastManagedUpdate = lastManagedUpdate;
|
||||||
|
|
||||||
if (id != null) {
|
_updates = EventChannel('net.defined.nebula/${this.id}');
|
||||||
_updates = EventChannel('net.defined.nebula/$id');
|
|
||||||
_updates.receiveBroadcastStream().listen((d) {
|
_updates.receiveBroadcastStream().listen((d) {
|
||||||
try {
|
try {
|
||||||
_updateFromJson(d);
|
_updateFromJson(d);
|
||||||
|
@ -109,7 +108,6 @@ class Site {
|
||||||
_change.addError(error.message ?? 'An unexpected error occurred');
|
_change.addError(error.message ?? 'An unexpected error occurred');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
factory Site.fromJson(Map<String, dynamic> json) {
|
factory Site.fromJson(Map<String, dynamic> json) {
|
||||||
var decoded = Site._fromJson(json);
|
var decoded = Site._fromJson(json);
|
||||||
|
|
Loading…
Reference in New Issue