mirror of
https://gitlab.com/veilid/veilid.git
synced 2025-10-11 18:10:44 -04:00
refactor attachment
This commit is contained in:
parent
525baea32c
commit
f49e4f0892
11 changed files with 402 additions and 239 deletions
|
@ -1400,15 +1400,22 @@ class VeilidUpdateRoute implements VeilidUpdate {
|
|||
|
||||
class VeilidStateAttachment {
|
||||
final AttachmentState state;
|
||||
final bool publicInternetReady;
|
||||
final bool localNetworkReady;
|
||||
|
||||
VeilidStateAttachment(this.state);
|
||||
VeilidStateAttachment(
|
||||
this.state, this.publicInternetReady, this.localNetworkReady);
|
||||
|
||||
VeilidStateAttachment.fromJson(Map<String, dynamic> json)
|
||||
: state = attachmentStateFromJson(json['state']);
|
||||
: state = attachmentStateFromJson(json['state']),
|
||||
publicInternetReady = json['public_internet_ready'],
|
||||
localNetworkReady = json['local_network_ready'];
|
||||
|
||||
Map<String, dynamic> get json {
|
||||
return {
|
||||
'state': state.json,
|
||||
'public_internet_ready': publicInternetReady,
|
||||
'local_network_ready': localNetworkReady,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue