forked from Nexus/nexus
parent
784e5254e2
commit
23046f08a9
8 changed files with 448 additions and 36 deletions
|
|
@ -12,9 +12,23 @@ class const ClientState({
|
|||
required final String? userId,
|
||||
required final String? deviceId,
|
||||
required final String? homeserverUrl,
|
||||
final VerificationState verificationState = const .new(),
|
||||
}) with _$ClientState {
|
||||
Map<String, Object?> toJson() => _$ClientStateToJson(this);
|
||||
|
||||
factory ClientState.fromJson(Map<String, Object?> json) =>
|
||||
_$ClientStateFromJson(json);
|
||||
}
|
||||
|
||||
@Freezed(toJson: false, fromJson: false)
|
||||
@JsonSerializable()
|
||||
class const VerificationState({
|
||||
final bool stateChecked = false,
|
||||
final bool hasCrossSigning = false,
|
||||
@JsonKey(name: "has_ssss") final bool hasSecretStorage = false,
|
||||
}) with _$VerificationState {
|
||||
Map<String, Object?> toJson() => _$VerificationStateToJson(this);
|
||||
|
||||
factory VerificationState.fromJson(Map<String, Object?> json) =>
|
||||
_$VerificationStateFromJson(json);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue