mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-05-20 15:10:30 -04:00
debugging work
This commit is contained in:
parent
739df7c427
commit
d6b1c20906
71 changed files with 4155 additions and 3616 deletions
|
@ -13,7 +13,7 @@ enum AccountInfoStatus {
|
|||
}
|
||||
|
||||
@immutable
|
||||
class AccountInfo extends Equatable {
|
||||
class AccountInfo extends Equatable implements ToDebugMap {
|
||||
const AccountInfo({
|
||||
required this.status,
|
||||
required this.localAccount,
|
||||
|
@ -30,6 +30,13 @@ class AccountInfo extends Equatable {
|
|||
localAccount,
|
||||
userLogin,
|
||||
];
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toDebugMap() => {
|
||||
'status': status,
|
||||
'localAccount': localAccount,
|
||||
'userLogin': userLogin,
|
||||
};
|
||||
}
|
||||
|
||||
extension AccountInfoExt on AccountInfo {
|
||||
|
|
|
@ -16,7 +16,7 @@ part 'local_account.freezed.dart';
|
|||
// This is the root of the account information tree for VeilidChat
|
||||
//
|
||||
@freezed
|
||||
class LocalAccount with _$LocalAccount {
|
||||
sealed class LocalAccount with _$LocalAccount {
|
||||
const factory LocalAccount({
|
||||
// The super identity key record for the account,
|
||||
// containing the publicKey in the currentIdentity
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// dart format width=80
|
||||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint
|
||||
|
@ -9,238 +10,43 @@ part of 'local_account.dart';
|
|||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
LocalAccount _$LocalAccountFromJson(Map<String, dynamic> json) {
|
||||
return _LocalAccount.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$LocalAccount {
|
||||
// The super identity key record for the account,
|
||||
// containing the publicKey in the currentIdentity
|
||||
SuperIdentity get superIdentity =>
|
||||
throw _privateConstructorUsedError; // The encrypted currentIdentity secret that goes with
|
||||
SuperIdentity
|
||||
get superIdentity; // The encrypted currentIdentity secret that goes with
|
||||
// the identityPublicKey with appended salt
|
||||
@Uint8ListJsonConverter()
|
||||
Uint8List get identitySecretBytes =>
|
||||
throw _privateConstructorUsedError; // The kind of encryption input used on the account
|
||||
EncryptionKeyType get encryptionKeyType =>
|
||||
throw _privateConstructorUsedError; // If account is not hidden, password can be retrieved via
|
||||
bool get biometricsEnabled =>
|
||||
throw _privateConstructorUsedError; // Keep account hidden unless account password is entered
|
||||
Uint8List
|
||||
get identitySecretBytes; // The kind of encryption input used on the account
|
||||
EncryptionKeyType
|
||||
get encryptionKeyType; // If account is not hidden, password can be retrieved via
|
||||
bool
|
||||
get biometricsEnabled; // Keep account hidden unless account password is entered
|
||||
// (tries all hidden accounts with auth method (no biometrics))
|
||||
bool get hiddenAccount =>
|
||||
throw _privateConstructorUsedError; // Display name for account until it is unlocked
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this LocalAccount to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
bool get hiddenAccount; // Display name for account until it is unlocked
|
||||
String get name;
|
||||
|
||||
/// Create a copy of LocalAccount
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$LocalAccountCopyWith<LocalAccount> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
_$LocalAccountCopyWithImpl<LocalAccount>(
|
||||
this as LocalAccount, _$identity);
|
||||
|
||||
/// @nodoc
|
||||
abstract class $LocalAccountCopyWith<$Res> {
|
||||
factory $LocalAccountCopyWith(
|
||||
LocalAccount value, $Res Function(LocalAccount) then) =
|
||||
_$LocalAccountCopyWithImpl<$Res, LocalAccount>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{SuperIdentity superIdentity,
|
||||
@Uint8ListJsonConverter() Uint8List identitySecretBytes,
|
||||
EncryptionKeyType encryptionKeyType,
|
||||
bool biometricsEnabled,
|
||||
bool hiddenAccount,
|
||||
String name});
|
||||
|
||||
$SuperIdentityCopyWith<$Res> get superIdentity;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$LocalAccountCopyWithImpl<$Res, $Val extends LocalAccount>
|
||||
implements $LocalAccountCopyWith<$Res> {
|
||||
_$LocalAccountCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of LocalAccount
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? superIdentity = null,
|
||||
Object? identitySecretBytes = null,
|
||||
Object? encryptionKeyType = null,
|
||||
Object? biometricsEnabled = null,
|
||||
Object? hiddenAccount = null,
|
||||
Object? name = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
superIdentity: null == superIdentity
|
||||
? _value.superIdentity
|
||||
: superIdentity // ignore: cast_nullable_to_non_nullable
|
||||
as SuperIdentity,
|
||||
identitySecretBytes: null == identitySecretBytes
|
||||
? _value.identitySecretBytes
|
||||
: identitySecretBytes // ignore: cast_nullable_to_non_nullable
|
||||
as Uint8List,
|
||||
encryptionKeyType: null == encryptionKeyType
|
||||
? _value.encryptionKeyType
|
||||
: encryptionKeyType // ignore: cast_nullable_to_non_nullable
|
||||
as EncryptionKeyType,
|
||||
biometricsEnabled: null == biometricsEnabled
|
||||
? _value.biometricsEnabled
|
||||
: biometricsEnabled // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
hiddenAccount: null == hiddenAccount
|
||||
? _value.hiddenAccount
|
||||
: hiddenAccount // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
) as $Val);
|
||||
}
|
||||
|
||||
/// Create a copy of LocalAccount
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SuperIdentityCopyWith<$Res> get superIdentity {
|
||||
return $SuperIdentityCopyWith<$Res>(_value.superIdentity, (value) {
|
||||
return _then(_value.copyWith(superIdentity: value) as $Val);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$LocalAccountImplCopyWith<$Res>
|
||||
implements $LocalAccountCopyWith<$Res> {
|
||||
factory _$$LocalAccountImplCopyWith(
|
||||
_$LocalAccountImpl value, $Res Function(_$LocalAccountImpl) then) =
|
||||
__$$LocalAccountImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{SuperIdentity superIdentity,
|
||||
@Uint8ListJsonConverter() Uint8List identitySecretBytes,
|
||||
EncryptionKeyType encryptionKeyType,
|
||||
bool biometricsEnabled,
|
||||
bool hiddenAccount,
|
||||
String name});
|
||||
|
||||
@override
|
||||
$SuperIdentityCopyWith<$Res> get superIdentity;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$LocalAccountImplCopyWithImpl<$Res>
|
||||
extends _$LocalAccountCopyWithImpl<$Res, _$LocalAccountImpl>
|
||||
implements _$$LocalAccountImplCopyWith<$Res> {
|
||||
__$$LocalAccountImplCopyWithImpl(
|
||||
_$LocalAccountImpl _value, $Res Function(_$LocalAccountImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of LocalAccount
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? superIdentity = null,
|
||||
Object? identitySecretBytes = null,
|
||||
Object? encryptionKeyType = null,
|
||||
Object? biometricsEnabled = null,
|
||||
Object? hiddenAccount = null,
|
||||
Object? name = null,
|
||||
}) {
|
||||
return _then(_$LocalAccountImpl(
|
||||
superIdentity: null == superIdentity
|
||||
? _value.superIdentity
|
||||
: superIdentity // ignore: cast_nullable_to_non_nullable
|
||||
as SuperIdentity,
|
||||
identitySecretBytes: null == identitySecretBytes
|
||||
? _value.identitySecretBytes
|
||||
: identitySecretBytes // ignore: cast_nullable_to_non_nullable
|
||||
as Uint8List,
|
||||
encryptionKeyType: null == encryptionKeyType
|
||||
? _value.encryptionKeyType
|
||||
: encryptionKeyType // ignore: cast_nullable_to_non_nullable
|
||||
as EncryptionKeyType,
|
||||
biometricsEnabled: null == biometricsEnabled
|
||||
? _value.biometricsEnabled
|
||||
: biometricsEnabled // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
hiddenAccount: null == hiddenAccount
|
||||
? _value.hiddenAccount
|
||||
: hiddenAccount // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$LocalAccountImpl implements _LocalAccount {
|
||||
const _$LocalAccountImpl(
|
||||
{required this.superIdentity,
|
||||
@Uint8ListJsonConverter() required this.identitySecretBytes,
|
||||
required this.encryptionKeyType,
|
||||
required this.biometricsEnabled,
|
||||
required this.hiddenAccount,
|
||||
required this.name});
|
||||
|
||||
factory _$LocalAccountImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$LocalAccountImplFromJson(json);
|
||||
|
||||
// The super identity key record for the account,
|
||||
// containing the publicKey in the currentIdentity
|
||||
@override
|
||||
final SuperIdentity superIdentity;
|
||||
// The encrypted currentIdentity secret that goes with
|
||||
// the identityPublicKey with appended salt
|
||||
@override
|
||||
@Uint8ListJsonConverter()
|
||||
final Uint8List identitySecretBytes;
|
||||
// The kind of encryption input used on the account
|
||||
@override
|
||||
final EncryptionKeyType encryptionKeyType;
|
||||
// If account is not hidden, password can be retrieved via
|
||||
@override
|
||||
final bool biometricsEnabled;
|
||||
// Keep account hidden unless account password is entered
|
||||
// (tries all hidden accounts with auth method (no biometrics))
|
||||
@override
|
||||
final bool hiddenAccount;
|
||||
// Display name for account until it is unlocked
|
||||
@override
|
||||
final String name;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'LocalAccount(superIdentity: $superIdentity, identitySecretBytes: $identitySecretBytes, encryptionKeyType: $encryptionKeyType, biometricsEnabled: $biometricsEnabled, hiddenAccount: $hiddenAccount, name: $name)';
|
||||
}
|
||||
/// Serializes this LocalAccount to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$LocalAccountImpl &&
|
||||
other is LocalAccount &&
|
||||
(identical(other.superIdentity, superIdentity) ||
|
||||
other.superIdentity == superIdentity) &&
|
||||
const DeepCollectionEquality()
|
||||
|
@ -265,60 +71,250 @@ class _$LocalAccountImpl implements _LocalAccount {
|
|||
hiddenAccount,
|
||||
name);
|
||||
|
||||
/// Create a copy of LocalAccount
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$LocalAccountImplCopyWith<_$LocalAccountImpl> get copyWith =>
|
||||
__$$LocalAccountImplCopyWithImpl<_$LocalAccountImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$LocalAccountImplToJson(
|
||||
this,
|
||||
);
|
||||
String toString() {
|
||||
return 'LocalAccount(superIdentity: $superIdentity, identitySecretBytes: $identitySecretBytes, encryptionKeyType: $encryptionKeyType, biometricsEnabled: $biometricsEnabled, hiddenAccount: $hiddenAccount, name: $name)';
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _LocalAccount implements LocalAccount {
|
||||
const factory _LocalAccount(
|
||||
{required final SuperIdentity superIdentity,
|
||||
@Uint8ListJsonConverter() required final Uint8List identitySecretBytes,
|
||||
required final EncryptionKeyType encryptionKeyType,
|
||||
required final bool biometricsEnabled,
|
||||
required final bool hiddenAccount,
|
||||
required final String name}) = _$LocalAccountImpl;
|
||||
/// @nodoc
|
||||
abstract mixin class $LocalAccountCopyWith<$Res> {
|
||||
factory $LocalAccountCopyWith(
|
||||
LocalAccount value, $Res Function(LocalAccount) _then) =
|
||||
_$LocalAccountCopyWithImpl;
|
||||
@useResult
|
||||
$Res call(
|
||||
{SuperIdentity superIdentity,
|
||||
@Uint8ListJsonConverter() Uint8List identitySecretBytes,
|
||||
EncryptionKeyType encryptionKeyType,
|
||||
bool biometricsEnabled,
|
||||
bool hiddenAccount,
|
||||
String name});
|
||||
|
||||
factory _LocalAccount.fromJson(Map<String, dynamic> json) =
|
||||
_$LocalAccountImpl.fromJson;
|
||||
$SuperIdentityCopyWith<$Res> get superIdentity;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$LocalAccountCopyWithImpl<$Res> implements $LocalAccountCopyWith<$Res> {
|
||||
_$LocalAccountCopyWithImpl(this._self, this._then);
|
||||
|
||||
final LocalAccount _self;
|
||||
final $Res Function(LocalAccount) _then;
|
||||
|
||||
/// Create a copy of LocalAccount
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? superIdentity = null,
|
||||
Object? identitySecretBytes = null,
|
||||
Object? encryptionKeyType = null,
|
||||
Object? biometricsEnabled = null,
|
||||
Object? hiddenAccount = null,
|
||||
Object? name = null,
|
||||
}) {
|
||||
return _then(_self.copyWith(
|
||||
superIdentity: null == superIdentity
|
||||
? _self.superIdentity
|
||||
: superIdentity // ignore: cast_nullable_to_non_nullable
|
||||
as SuperIdentity,
|
||||
identitySecretBytes: null == identitySecretBytes
|
||||
? _self.identitySecretBytes
|
||||
: identitySecretBytes // ignore: cast_nullable_to_non_nullable
|
||||
as Uint8List,
|
||||
encryptionKeyType: null == encryptionKeyType
|
||||
? _self.encryptionKeyType
|
||||
: encryptionKeyType // ignore: cast_nullable_to_non_nullable
|
||||
as EncryptionKeyType,
|
||||
biometricsEnabled: null == biometricsEnabled
|
||||
? _self.biometricsEnabled
|
||||
: biometricsEnabled // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
hiddenAccount: null == hiddenAccount
|
||||
? _self.hiddenAccount
|
||||
: hiddenAccount // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
name: null == name
|
||||
? _self.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of LocalAccount
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SuperIdentityCopyWith<$Res> get superIdentity {
|
||||
return $SuperIdentityCopyWith<$Res>(_self.superIdentity, (value) {
|
||||
return _then(_self.copyWith(superIdentity: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _LocalAccount implements LocalAccount {
|
||||
const _LocalAccount(
|
||||
{required this.superIdentity,
|
||||
@Uint8ListJsonConverter() required this.identitySecretBytes,
|
||||
required this.encryptionKeyType,
|
||||
required this.biometricsEnabled,
|
||||
required this.hiddenAccount,
|
||||
required this.name});
|
||||
factory _LocalAccount.fromJson(Map<String, dynamic> json) =>
|
||||
_$LocalAccountFromJson(json);
|
||||
|
||||
// The super identity key record for the account,
|
||||
// containing the publicKey in the currentIdentity
|
||||
@override
|
||||
SuperIdentity
|
||||
get superIdentity; // The encrypted currentIdentity secret that goes with
|
||||
final SuperIdentity superIdentity;
|
||||
// The encrypted currentIdentity secret that goes with
|
||||
// the identityPublicKey with appended salt
|
||||
@override
|
||||
@Uint8ListJsonConverter()
|
||||
Uint8List
|
||||
get identitySecretBytes; // The kind of encryption input used on the account
|
||||
final Uint8List identitySecretBytes;
|
||||
// The kind of encryption input used on the account
|
||||
@override
|
||||
EncryptionKeyType
|
||||
get encryptionKeyType; // If account is not hidden, password can be retrieved via
|
||||
final EncryptionKeyType encryptionKeyType;
|
||||
// If account is not hidden, password can be retrieved via
|
||||
@override
|
||||
bool
|
||||
get biometricsEnabled; // Keep account hidden unless account password is entered
|
||||
final bool biometricsEnabled;
|
||||
// Keep account hidden unless account password is entered
|
||||
// (tries all hidden accounts with auth method (no biometrics))
|
||||
@override
|
||||
bool get hiddenAccount; // Display name for account until it is unlocked
|
||||
final bool hiddenAccount;
|
||||
// Display name for account until it is unlocked
|
||||
@override
|
||||
String get name;
|
||||
final String name;
|
||||
|
||||
/// Create a copy of LocalAccount
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$LocalAccountImplCopyWith<_$LocalAccountImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
@pragma('vm:prefer-inline')
|
||||
_$LocalAccountCopyWith<_LocalAccount> get copyWith =>
|
||||
__$LocalAccountCopyWithImpl<_LocalAccount>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$LocalAccountToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _LocalAccount &&
|
||||
(identical(other.superIdentity, superIdentity) ||
|
||||
other.superIdentity == superIdentity) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other.identitySecretBytes, identitySecretBytes) &&
|
||||
(identical(other.encryptionKeyType, encryptionKeyType) ||
|
||||
other.encryptionKeyType == encryptionKeyType) &&
|
||||
(identical(other.biometricsEnabled, biometricsEnabled) ||
|
||||
other.biometricsEnabled == biometricsEnabled) &&
|
||||
(identical(other.hiddenAccount, hiddenAccount) ||
|
||||
other.hiddenAccount == hiddenAccount) &&
|
||||
(identical(other.name, name) || other.name == name));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
superIdentity,
|
||||
const DeepCollectionEquality().hash(identitySecretBytes),
|
||||
encryptionKeyType,
|
||||
biometricsEnabled,
|
||||
hiddenAccount,
|
||||
name);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'LocalAccount(superIdentity: $superIdentity, identitySecretBytes: $identitySecretBytes, encryptionKeyType: $encryptionKeyType, biometricsEnabled: $biometricsEnabled, hiddenAccount: $hiddenAccount, name: $name)';
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$LocalAccountCopyWith<$Res>
|
||||
implements $LocalAccountCopyWith<$Res> {
|
||||
factory _$LocalAccountCopyWith(
|
||||
_LocalAccount value, $Res Function(_LocalAccount) _then) =
|
||||
__$LocalAccountCopyWithImpl;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{SuperIdentity superIdentity,
|
||||
@Uint8ListJsonConverter() Uint8List identitySecretBytes,
|
||||
EncryptionKeyType encryptionKeyType,
|
||||
bool biometricsEnabled,
|
||||
bool hiddenAccount,
|
||||
String name});
|
||||
|
||||
@override
|
||||
$SuperIdentityCopyWith<$Res> get superIdentity;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$LocalAccountCopyWithImpl<$Res>
|
||||
implements _$LocalAccountCopyWith<$Res> {
|
||||
__$LocalAccountCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _LocalAccount _self;
|
||||
final $Res Function(_LocalAccount) _then;
|
||||
|
||||
/// Create a copy of LocalAccount
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$Res call({
|
||||
Object? superIdentity = null,
|
||||
Object? identitySecretBytes = null,
|
||||
Object? encryptionKeyType = null,
|
||||
Object? biometricsEnabled = null,
|
||||
Object? hiddenAccount = null,
|
||||
Object? name = null,
|
||||
}) {
|
||||
return _then(_LocalAccount(
|
||||
superIdentity: null == superIdentity
|
||||
? _self.superIdentity
|
||||
: superIdentity // ignore: cast_nullable_to_non_nullable
|
||||
as SuperIdentity,
|
||||
identitySecretBytes: null == identitySecretBytes
|
||||
? _self.identitySecretBytes
|
||||
: identitySecretBytes // ignore: cast_nullable_to_non_nullable
|
||||
as Uint8List,
|
||||
encryptionKeyType: null == encryptionKeyType
|
||||
? _self.encryptionKeyType
|
||||
: encryptionKeyType // ignore: cast_nullable_to_non_nullable
|
||||
as EncryptionKeyType,
|
||||
biometricsEnabled: null == biometricsEnabled
|
||||
? _self.biometricsEnabled
|
||||
: biometricsEnabled // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
hiddenAccount: null == hiddenAccount
|
||||
? _self.hiddenAccount
|
||||
: hiddenAccount // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
name: null == name
|
||||
? _self.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of LocalAccount
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SuperIdentityCopyWith<$Res> get superIdentity {
|
||||
return $SuperIdentityCopyWith<$Res>(_self.superIdentity, (value) {
|
||||
return _then(_self.copyWith(superIdentity: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// dart format on
|
||||
|
|
|
@ -6,8 +6,8 @@ part of 'local_account.dart';
|
|||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$LocalAccountImpl _$$LocalAccountImplFromJson(Map<String, dynamic> json) =>
|
||||
_$LocalAccountImpl(
|
||||
_LocalAccount _$LocalAccountFromJson(Map<String, dynamic> json) =>
|
||||
_LocalAccount(
|
||||
superIdentity: SuperIdentity.fromJson(json['super_identity']),
|
||||
identitySecretBytes: const Uint8ListJsonConverter()
|
||||
.fromJson(json['identity_secret_bytes']),
|
||||
|
@ -18,7 +18,7 @@ _$LocalAccountImpl _$$LocalAccountImplFromJson(Map<String, dynamic> json) =>
|
|||
name: json['name'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$LocalAccountImplToJson(_$LocalAccountImpl instance) =>
|
||||
Map<String, dynamic> _$LocalAccountToJson(_LocalAccount instance) =>
|
||||
<String, dynamic>{
|
||||
'super_identity': instance.superIdentity.toJson(),
|
||||
'identity_secret_bytes':
|
||||
|
|
|
@ -2,6 +2,7 @@ import 'package:async_tools/async_tools.dart';
|
|||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:veilid_support/veilid_support.dart';
|
||||
|
||||
import '../../../chat/chat.dart';
|
||||
import '../../../chat_list/chat_list.dart';
|
||||
|
@ -14,7 +15,9 @@ import '../../account_manager.dart';
|
|||
part 'per_account_collection_state.freezed.dart';
|
||||
|
||||
@freezed
|
||||
class PerAccountCollectionState with _$PerAccountCollectionState {
|
||||
sealed class PerAccountCollectionState
|
||||
with _$PerAccountCollectionState
|
||||
implements ToDebugMap {
|
||||
const factory PerAccountCollectionState({
|
||||
required AccountInfo accountInfo,
|
||||
required AsyncValue<AccountRecordState>? avAccountRecordState,
|
||||
|
@ -29,6 +32,23 @@ class PerAccountCollectionState with _$PerAccountCollectionState {
|
|||
required ActiveSingleContactChatBlocMapCubit?
|
||||
activeSingleContactChatBlocMapCubit,
|
||||
}) = _PerAccountCollectionState;
|
||||
const PerAccountCollectionState._();
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toDebugMap() => {
|
||||
'accountInfo': accountInfo,
|
||||
'avAccountRecordState': avAccountRecordState,
|
||||
'accountInfoCubit': accountInfoCubit,
|
||||
'accountRecordCubit': accountRecordCubit,
|
||||
'contactInvitationListCubit': contactInvitationListCubit,
|
||||
'contactListCubit': contactListCubit,
|
||||
'waitingInvitationsBlocMapCubit': waitingInvitationsBlocMapCubit,
|
||||
'activeChatCubit': activeChatCubit,
|
||||
'chatListCubit': chatListCubit,
|
||||
'activeConversationsBlocMapCubit': activeConversationsBlocMapCubit,
|
||||
'activeSingleContactChatBlocMapCubit':
|
||||
activeSingleContactChatBlocMapCubit,
|
||||
};
|
||||
}
|
||||
|
||||
extension PerAccountCollectionStateExt on PerAccountCollectionState {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// dart format width=80
|
||||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint
|
||||
|
@ -9,311 +10,36 @@ part of 'per_account_collection_state.dart';
|
|||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
/// @nodoc
|
||||
mixin _$PerAccountCollectionState {
|
||||
AccountInfo get accountInfo => throw _privateConstructorUsedError;
|
||||
AsyncValue<Account>? get avAccountRecordState =>
|
||||
throw _privateConstructorUsedError;
|
||||
AccountInfoCubit? get accountInfoCubit => throw _privateConstructorUsedError;
|
||||
AccountRecordCubit? get accountRecordCubit =>
|
||||
throw _privateConstructorUsedError;
|
||||
ContactInvitationListCubit? get contactInvitationListCubit =>
|
||||
throw _privateConstructorUsedError;
|
||||
ContactListCubit? get contactListCubit => throw _privateConstructorUsedError;
|
||||
WaitingInvitationsBlocMapCubit? get waitingInvitationsBlocMapCubit =>
|
||||
throw _privateConstructorUsedError;
|
||||
ActiveChatCubit? get activeChatCubit => throw _privateConstructorUsedError;
|
||||
ChatListCubit? get chatListCubit => throw _privateConstructorUsedError;
|
||||
ActiveConversationsBlocMapCubit? get activeConversationsBlocMapCubit =>
|
||||
throw _privateConstructorUsedError;
|
||||
ActiveSingleContactChatBlocMapCubit?
|
||||
get activeSingleContactChatBlocMapCubit =>
|
||||
throw _privateConstructorUsedError;
|
||||
AccountInfo get accountInfo;
|
||||
AsyncValue<AccountRecordState>? get avAccountRecordState;
|
||||
AccountInfoCubit? get accountInfoCubit;
|
||||
AccountRecordCubit? get accountRecordCubit;
|
||||
ContactInvitationListCubit? get contactInvitationListCubit;
|
||||
ContactListCubit? get contactListCubit;
|
||||
WaitingInvitationsBlocMapCubit? get waitingInvitationsBlocMapCubit;
|
||||
ActiveChatCubit? get activeChatCubit;
|
||||
ChatListCubit? get chatListCubit;
|
||||
ActiveConversationsBlocMapCubit? get activeConversationsBlocMapCubit;
|
||||
ActiveSingleContactChatBlocMapCubit? get activeSingleContactChatBlocMapCubit;
|
||||
|
||||
/// Create a copy of PerAccountCollectionState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$PerAccountCollectionStateCopyWith<PerAccountCollectionState> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $PerAccountCollectionStateCopyWith<$Res> {
|
||||
factory $PerAccountCollectionStateCopyWith(PerAccountCollectionState value,
|
||||
$Res Function(PerAccountCollectionState) then) =
|
||||
_$PerAccountCollectionStateCopyWithImpl<$Res, PerAccountCollectionState>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{AccountInfo accountInfo,
|
||||
AsyncValue<Account>? avAccountRecordState,
|
||||
AccountInfoCubit? accountInfoCubit,
|
||||
AccountRecordCubit? accountRecordCubit,
|
||||
ContactInvitationListCubit? contactInvitationListCubit,
|
||||
ContactListCubit? contactListCubit,
|
||||
WaitingInvitationsBlocMapCubit? waitingInvitationsBlocMapCubit,
|
||||
ActiveChatCubit? activeChatCubit,
|
||||
ChatListCubit? chatListCubit,
|
||||
ActiveConversationsBlocMapCubit? activeConversationsBlocMapCubit,
|
||||
ActiveSingleContactChatBlocMapCubit?
|
||||
activeSingleContactChatBlocMapCubit});
|
||||
|
||||
$AsyncValueCopyWith<Account, $Res>? get avAccountRecordState;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$PerAccountCollectionStateCopyWithImpl<$Res,
|
||||
$Val extends PerAccountCollectionState>
|
||||
implements $PerAccountCollectionStateCopyWith<$Res> {
|
||||
_$PerAccountCollectionStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of PerAccountCollectionState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? accountInfo = null,
|
||||
Object? avAccountRecordState = freezed,
|
||||
Object? accountInfoCubit = freezed,
|
||||
Object? accountRecordCubit = freezed,
|
||||
Object? contactInvitationListCubit = freezed,
|
||||
Object? contactListCubit = freezed,
|
||||
Object? waitingInvitationsBlocMapCubit = freezed,
|
||||
Object? activeChatCubit = freezed,
|
||||
Object? chatListCubit = freezed,
|
||||
Object? activeConversationsBlocMapCubit = freezed,
|
||||
Object? activeSingleContactChatBlocMapCubit = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
accountInfo: null == accountInfo
|
||||
? _value.accountInfo
|
||||
: accountInfo // ignore: cast_nullable_to_non_nullable
|
||||
as AccountInfo,
|
||||
avAccountRecordState: freezed == avAccountRecordState
|
||||
? _value.avAccountRecordState
|
||||
: avAccountRecordState // ignore: cast_nullable_to_non_nullable
|
||||
as AsyncValue<Account>?,
|
||||
accountInfoCubit: freezed == accountInfoCubit
|
||||
? _value.accountInfoCubit
|
||||
: accountInfoCubit // ignore: cast_nullable_to_non_nullable
|
||||
as AccountInfoCubit?,
|
||||
accountRecordCubit: freezed == accountRecordCubit
|
||||
? _value.accountRecordCubit
|
||||
: accountRecordCubit // ignore: cast_nullable_to_non_nullable
|
||||
as AccountRecordCubit?,
|
||||
contactInvitationListCubit: freezed == contactInvitationListCubit
|
||||
? _value.contactInvitationListCubit
|
||||
: contactInvitationListCubit // ignore: cast_nullable_to_non_nullable
|
||||
as ContactInvitationListCubit?,
|
||||
contactListCubit: freezed == contactListCubit
|
||||
? _value.contactListCubit
|
||||
: contactListCubit // ignore: cast_nullable_to_non_nullable
|
||||
as ContactListCubit?,
|
||||
waitingInvitationsBlocMapCubit: freezed == waitingInvitationsBlocMapCubit
|
||||
? _value.waitingInvitationsBlocMapCubit
|
||||
: waitingInvitationsBlocMapCubit // ignore: cast_nullable_to_non_nullable
|
||||
as WaitingInvitationsBlocMapCubit?,
|
||||
activeChatCubit: freezed == activeChatCubit
|
||||
? _value.activeChatCubit
|
||||
: activeChatCubit // ignore: cast_nullable_to_non_nullable
|
||||
as ActiveChatCubit?,
|
||||
chatListCubit: freezed == chatListCubit
|
||||
? _value.chatListCubit
|
||||
: chatListCubit // ignore: cast_nullable_to_non_nullable
|
||||
as ChatListCubit?,
|
||||
activeConversationsBlocMapCubit: freezed ==
|
||||
activeConversationsBlocMapCubit
|
||||
? _value.activeConversationsBlocMapCubit
|
||||
: activeConversationsBlocMapCubit // ignore: cast_nullable_to_non_nullable
|
||||
as ActiveConversationsBlocMapCubit?,
|
||||
activeSingleContactChatBlocMapCubit: freezed ==
|
||||
activeSingleContactChatBlocMapCubit
|
||||
? _value.activeSingleContactChatBlocMapCubit
|
||||
: activeSingleContactChatBlocMapCubit // ignore: cast_nullable_to_non_nullable
|
||||
as ActiveSingleContactChatBlocMapCubit?,
|
||||
) as $Val);
|
||||
}
|
||||
|
||||
/// Create a copy of PerAccountCollectionState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$AsyncValueCopyWith<Account, $Res>? get avAccountRecordState {
|
||||
if (_value.avAccountRecordState == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $AsyncValueCopyWith<Account, $Res>(_value.avAccountRecordState!,
|
||||
(value) {
|
||||
return _then(_value.copyWith(avAccountRecordState: value) as $Val);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$PerAccountCollectionStateImplCopyWith<$Res>
|
||||
implements $PerAccountCollectionStateCopyWith<$Res> {
|
||||
factory _$$PerAccountCollectionStateImplCopyWith(
|
||||
_$PerAccountCollectionStateImpl value,
|
||||
$Res Function(_$PerAccountCollectionStateImpl) then) =
|
||||
__$$PerAccountCollectionStateImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{AccountInfo accountInfo,
|
||||
AsyncValue<Account>? avAccountRecordState,
|
||||
AccountInfoCubit? accountInfoCubit,
|
||||
AccountRecordCubit? accountRecordCubit,
|
||||
ContactInvitationListCubit? contactInvitationListCubit,
|
||||
ContactListCubit? contactListCubit,
|
||||
WaitingInvitationsBlocMapCubit? waitingInvitationsBlocMapCubit,
|
||||
ActiveChatCubit? activeChatCubit,
|
||||
ChatListCubit? chatListCubit,
|
||||
ActiveConversationsBlocMapCubit? activeConversationsBlocMapCubit,
|
||||
ActiveSingleContactChatBlocMapCubit?
|
||||
activeSingleContactChatBlocMapCubit});
|
||||
|
||||
@override
|
||||
$AsyncValueCopyWith<Account, $Res>? get avAccountRecordState;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$PerAccountCollectionStateImplCopyWithImpl<$Res>
|
||||
extends _$PerAccountCollectionStateCopyWithImpl<$Res,
|
||||
_$PerAccountCollectionStateImpl>
|
||||
implements _$$PerAccountCollectionStateImplCopyWith<$Res> {
|
||||
__$$PerAccountCollectionStateImplCopyWithImpl(
|
||||
_$PerAccountCollectionStateImpl _value,
|
||||
$Res Function(_$PerAccountCollectionStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of PerAccountCollectionState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? accountInfo = null,
|
||||
Object? avAccountRecordState = freezed,
|
||||
Object? accountInfoCubit = freezed,
|
||||
Object? accountRecordCubit = freezed,
|
||||
Object? contactInvitationListCubit = freezed,
|
||||
Object? contactListCubit = freezed,
|
||||
Object? waitingInvitationsBlocMapCubit = freezed,
|
||||
Object? activeChatCubit = freezed,
|
||||
Object? chatListCubit = freezed,
|
||||
Object? activeConversationsBlocMapCubit = freezed,
|
||||
Object? activeSingleContactChatBlocMapCubit = freezed,
|
||||
}) {
|
||||
return _then(_$PerAccountCollectionStateImpl(
|
||||
accountInfo: null == accountInfo
|
||||
? _value.accountInfo
|
||||
: accountInfo // ignore: cast_nullable_to_non_nullable
|
||||
as AccountInfo,
|
||||
avAccountRecordState: freezed == avAccountRecordState
|
||||
? _value.avAccountRecordState
|
||||
: avAccountRecordState // ignore: cast_nullable_to_non_nullable
|
||||
as AsyncValue<Account>?,
|
||||
accountInfoCubit: freezed == accountInfoCubit
|
||||
? _value.accountInfoCubit
|
||||
: accountInfoCubit // ignore: cast_nullable_to_non_nullable
|
||||
as AccountInfoCubit?,
|
||||
accountRecordCubit: freezed == accountRecordCubit
|
||||
? _value.accountRecordCubit
|
||||
: accountRecordCubit // ignore: cast_nullable_to_non_nullable
|
||||
as AccountRecordCubit?,
|
||||
contactInvitationListCubit: freezed == contactInvitationListCubit
|
||||
? _value.contactInvitationListCubit
|
||||
: contactInvitationListCubit // ignore: cast_nullable_to_non_nullable
|
||||
as ContactInvitationListCubit?,
|
||||
contactListCubit: freezed == contactListCubit
|
||||
? _value.contactListCubit
|
||||
: contactListCubit // ignore: cast_nullable_to_non_nullable
|
||||
as ContactListCubit?,
|
||||
waitingInvitationsBlocMapCubit: freezed == waitingInvitationsBlocMapCubit
|
||||
? _value.waitingInvitationsBlocMapCubit
|
||||
: waitingInvitationsBlocMapCubit // ignore: cast_nullable_to_non_nullable
|
||||
as WaitingInvitationsBlocMapCubit?,
|
||||
activeChatCubit: freezed == activeChatCubit
|
||||
? _value.activeChatCubit
|
||||
: activeChatCubit // ignore: cast_nullable_to_non_nullable
|
||||
as ActiveChatCubit?,
|
||||
chatListCubit: freezed == chatListCubit
|
||||
? _value.chatListCubit
|
||||
: chatListCubit // ignore: cast_nullable_to_non_nullable
|
||||
as ChatListCubit?,
|
||||
activeConversationsBlocMapCubit: freezed ==
|
||||
activeConversationsBlocMapCubit
|
||||
? _value.activeConversationsBlocMapCubit
|
||||
: activeConversationsBlocMapCubit // ignore: cast_nullable_to_non_nullable
|
||||
as ActiveConversationsBlocMapCubit?,
|
||||
activeSingleContactChatBlocMapCubit: freezed ==
|
||||
activeSingleContactChatBlocMapCubit
|
||||
? _value.activeSingleContactChatBlocMapCubit
|
||||
: activeSingleContactChatBlocMapCubit // ignore: cast_nullable_to_non_nullable
|
||||
as ActiveSingleContactChatBlocMapCubit?,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$PerAccountCollectionStateImpl implements _PerAccountCollectionState {
|
||||
const _$PerAccountCollectionStateImpl(
|
||||
{required this.accountInfo,
|
||||
required this.avAccountRecordState,
|
||||
required this.accountInfoCubit,
|
||||
required this.accountRecordCubit,
|
||||
required this.contactInvitationListCubit,
|
||||
required this.contactListCubit,
|
||||
required this.waitingInvitationsBlocMapCubit,
|
||||
required this.activeChatCubit,
|
||||
required this.chatListCubit,
|
||||
required this.activeConversationsBlocMapCubit,
|
||||
required this.activeSingleContactChatBlocMapCubit});
|
||||
|
||||
@override
|
||||
final AccountInfo accountInfo;
|
||||
@override
|
||||
final AsyncValue<Account>? avAccountRecordState;
|
||||
@override
|
||||
final AccountInfoCubit? accountInfoCubit;
|
||||
@override
|
||||
final AccountRecordCubit? accountRecordCubit;
|
||||
@override
|
||||
final ContactInvitationListCubit? contactInvitationListCubit;
|
||||
@override
|
||||
final ContactListCubit? contactListCubit;
|
||||
@override
|
||||
final WaitingInvitationsBlocMapCubit? waitingInvitationsBlocMapCubit;
|
||||
@override
|
||||
final ActiveChatCubit? activeChatCubit;
|
||||
@override
|
||||
final ChatListCubit? chatListCubit;
|
||||
@override
|
||||
final ActiveConversationsBlocMapCubit? activeConversationsBlocMapCubit;
|
||||
@override
|
||||
final ActiveSingleContactChatBlocMapCubit?
|
||||
activeSingleContactChatBlocMapCubit;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'PerAccountCollectionState(accountInfo: $accountInfo, avAccountRecordState: $avAccountRecordState, accountInfoCubit: $accountInfoCubit, accountRecordCubit: $accountRecordCubit, contactInvitationListCubit: $contactInvitationListCubit, contactListCubit: $contactListCubit, waitingInvitationsBlocMapCubit: $waitingInvitationsBlocMapCubit, activeChatCubit: $activeChatCubit, chatListCubit: $chatListCubit, activeConversationsBlocMapCubit: $activeConversationsBlocMapCubit, activeSingleContactChatBlocMapCubit: $activeSingleContactChatBlocMapCubit)';
|
||||
}
|
||||
_$PerAccountCollectionStateCopyWithImpl<PerAccountCollectionState>(
|
||||
this as PerAccountCollectionState, _$identity);
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$PerAccountCollectionStateImpl &&
|
||||
other is PerAccountCollectionState &&
|
||||
(identical(other.accountInfo, accountInfo) ||
|
||||
other.accountInfo == accountInfo) &&
|
||||
(identical(other.avAccountRecordState, avAccountRecordState) ||
|
||||
|
@ -361,61 +87,350 @@ class _$PerAccountCollectionStateImpl implements _PerAccountCollectionState {
|
|||
activeConversationsBlocMapCubit,
|
||||
activeSingleContactChatBlocMapCubit);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'PerAccountCollectionState(accountInfo: $accountInfo, avAccountRecordState: $avAccountRecordState, accountInfoCubit: $accountInfoCubit, accountRecordCubit: $accountRecordCubit, contactInvitationListCubit: $contactInvitationListCubit, contactListCubit: $contactListCubit, waitingInvitationsBlocMapCubit: $waitingInvitationsBlocMapCubit, activeChatCubit: $activeChatCubit, chatListCubit: $chatListCubit, activeConversationsBlocMapCubit: $activeConversationsBlocMapCubit, activeSingleContactChatBlocMapCubit: $activeSingleContactChatBlocMapCubit)';
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $PerAccountCollectionStateCopyWith<$Res> {
|
||||
factory $PerAccountCollectionStateCopyWith(PerAccountCollectionState value,
|
||||
$Res Function(PerAccountCollectionState) _then) =
|
||||
_$PerAccountCollectionStateCopyWithImpl;
|
||||
@useResult
|
||||
$Res call(
|
||||
{AccountInfo accountInfo,
|
||||
AsyncValue<Account>? avAccountRecordState,
|
||||
AccountInfoCubit? accountInfoCubit,
|
||||
AccountRecordCubit? accountRecordCubit,
|
||||
ContactInvitationListCubit? contactInvitationListCubit,
|
||||
ContactListCubit? contactListCubit,
|
||||
WaitingInvitationsBlocMapCubit? waitingInvitationsBlocMapCubit,
|
||||
ActiveChatCubit? activeChatCubit,
|
||||
ChatListCubit? chatListCubit,
|
||||
ActiveConversationsBlocMapCubit? activeConversationsBlocMapCubit,
|
||||
ActiveSingleContactChatBlocMapCubit?
|
||||
activeSingleContactChatBlocMapCubit});
|
||||
|
||||
$AsyncValueCopyWith<Account, $Res>? get avAccountRecordState;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$PerAccountCollectionStateCopyWithImpl<$Res>
|
||||
implements $PerAccountCollectionStateCopyWith<$Res> {
|
||||
_$PerAccountCollectionStateCopyWithImpl(this._self, this._then);
|
||||
|
||||
final PerAccountCollectionState _self;
|
||||
final $Res Function(PerAccountCollectionState) _then;
|
||||
|
||||
/// Create a copy of PerAccountCollectionState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? accountInfo = null,
|
||||
Object? avAccountRecordState = freezed,
|
||||
Object? accountInfoCubit = freezed,
|
||||
Object? accountRecordCubit = freezed,
|
||||
Object? contactInvitationListCubit = freezed,
|
||||
Object? contactListCubit = freezed,
|
||||
Object? waitingInvitationsBlocMapCubit = freezed,
|
||||
Object? activeChatCubit = freezed,
|
||||
Object? chatListCubit = freezed,
|
||||
Object? activeConversationsBlocMapCubit = freezed,
|
||||
Object? activeSingleContactChatBlocMapCubit = freezed,
|
||||
}) {
|
||||
return _then(_self.copyWith(
|
||||
accountInfo: null == accountInfo
|
||||
? _self.accountInfo
|
||||
: accountInfo // ignore: cast_nullable_to_non_nullable
|
||||
as AccountInfo,
|
||||
avAccountRecordState: freezed == avAccountRecordState
|
||||
? _self.avAccountRecordState!
|
||||
: avAccountRecordState // ignore: cast_nullable_to_non_nullable
|
||||
as AsyncValue<Account>?,
|
||||
accountInfoCubit: freezed == accountInfoCubit
|
||||
? _self.accountInfoCubit
|
||||
: accountInfoCubit // ignore: cast_nullable_to_non_nullable
|
||||
as AccountInfoCubit?,
|
||||
accountRecordCubit: freezed == accountRecordCubit
|
||||
? _self.accountRecordCubit
|
||||
: accountRecordCubit // ignore: cast_nullable_to_non_nullable
|
||||
as AccountRecordCubit?,
|
||||
contactInvitationListCubit: freezed == contactInvitationListCubit
|
||||
? _self.contactInvitationListCubit
|
||||
: contactInvitationListCubit // ignore: cast_nullable_to_non_nullable
|
||||
as ContactInvitationListCubit?,
|
||||
contactListCubit: freezed == contactListCubit
|
||||
? _self.contactListCubit
|
||||
: contactListCubit // ignore: cast_nullable_to_non_nullable
|
||||
as ContactListCubit?,
|
||||
waitingInvitationsBlocMapCubit: freezed == waitingInvitationsBlocMapCubit
|
||||
? _self.waitingInvitationsBlocMapCubit
|
||||
: waitingInvitationsBlocMapCubit // ignore: cast_nullable_to_non_nullable
|
||||
as WaitingInvitationsBlocMapCubit?,
|
||||
activeChatCubit: freezed == activeChatCubit
|
||||
? _self.activeChatCubit
|
||||
: activeChatCubit // ignore: cast_nullable_to_non_nullable
|
||||
as ActiveChatCubit?,
|
||||
chatListCubit: freezed == chatListCubit
|
||||
? _self.chatListCubit
|
||||
: chatListCubit // ignore: cast_nullable_to_non_nullable
|
||||
as ChatListCubit?,
|
||||
activeConversationsBlocMapCubit: freezed ==
|
||||
activeConversationsBlocMapCubit
|
||||
? _self.activeConversationsBlocMapCubit
|
||||
: activeConversationsBlocMapCubit // ignore: cast_nullable_to_non_nullable
|
||||
as ActiveConversationsBlocMapCubit?,
|
||||
activeSingleContactChatBlocMapCubit: freezed ==
|
||||
activeSingleContactChatBlocMapCubit
|
||||
? _self.activeSingleContactChatBlocMapCubit
|
||||
: activeSingleContactChatBlocMapCubit // ignore: cast_nullable_to_non_nullable
|
||||
as ActiveSingleContactChatBlocMapCubit?,
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of PerAccountCollectionState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$PerAccountCollectionStateImplCopyWith<_$PerAccountCollectionStateImpl>
|
||||
get copyWith => __$$PerAccountCollectionStateImplCopyWithImpl<
|
||||
_$PerAccountCollectionStateImpl>(this, _$identity);
|
||||
$AsyncValueCopyWith<Account, $Res>? get avAccountRecordState {
|
||||
if (_self.avAccountRecordState == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $AsyncValueCopyWith<Account, $Res>(_self.avAccountRecordState!,
|
||||
(value) {
|
||||
return _then(_self.copyWith(avAccountRecordState: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _PerAccountCollectionState implements PerAccountCollectionState {
|
||||
const factory _PerAccountCollectionState(
|
||||
{required final AccountInfo accountInfo,
|
||||
required final AsyncValue<Account>? avAccountRecordState,
|
||||
required final AccountInfoCubit? accountInfoCubit,
|
||||
required final AccountRecordCubit? accountRecordCubit,
|
||||
required final ContactInvitationListCubit? contactInvitationListCubit,
|
||||
required final ContactListCubit? contactListCubit,
|
||||
required final WaitingInvitationsBlocMapCubit?
|
||||
waitingInvitationsBlocMapCubit,
|
||||
required final ActiveChatCubit? activeChatCubit,
|
||||
required final ChatListCubit? chatListCubit,
|
||||
required final ActiveConversationsBlocMapCubit?
|
||||
activeConversationsBlocMapCubit,
|
||||
required final ActiveSingleContactChatBlocMapCubit?
|
||||
activeSingleContactChatBlocMapCubit}) =
|
||||
_$PerAccountCollectionStateImpl;
|
||||
/// @nodoc
|
||||
|
||||
class _PerAccountCollectionState extends PerAccountCollectionState {
|
||||
const _PerAccountCollectionState(
|
||||
{required this.accountInfo,
|
||||
required this.avAccountRecordState,
|
||||
required this.accountInfoCubit,
|
||||
required this.accountRecordCubit,
|
||||
required this.contactInvitationListCubit,
|
||||
required this.contactListCubit,
|
||||
required this.waitingInvitationsBlocMapCubit,
|
||||
required this.activeChatCubit,
|
||||
required this.chatListCubit,
|
||||
required this.activeConversationsBlocMapCubit,
|
||||
required this.activeSingleContactChatBlocMapCubit})
|
||||
: super._();
|
||||
|
||||
@override
|
||||
AccountInfo get accountInfo;
|
||||
final AccountInfo accountInfo;
|
||||
@override
|
||||
AsyncValue<Account>? get avAccountRecordState;
|
||||
final AsyncValue<Account>? avAccountRecordState;
|
||||
@override
|
||||
AccountInfoCubit? get accountInfoCubit;
|
||||
final AccountInfoCubit? accountInfoCubit;
|
||||
@override
|
||||
AccountRecordCubit? get accountRecordCubit;
|
||||
final AccountRecordCubit? accountRecordCubit;
|
||||
@override
|
||||
ContactInvitationListCubit? get contactInvitationListCubit;
|
||||
final ContactInvitationListCubit? contactInvitationListCubit;
|
||||
@override
|
||||
ContactListCubit? get contactListCubit;
|
||||
final ContactListCubit? contactListCubit;
|
||||
@override
|
||||
WaitingInvitationsBlocMapCubit? get waitingInvitationsBlocMapCubit;
|
||||
final WaitingInvitationsBlocMapCubit? waitingInvitationsBlocMapCubit;
|
||||
@override
|
||||
ActiveChatCubit? get activeChatCubit;
|
||||
final ActiveChatCubit? activeChatCubit;
|
||||
@override
|
||||
ChatListCubit? get chatListCubit;
|
||||
final ChatListCubit? chatListCubit;
|
||||
@override
|
||||
ActiveConversationsBlocMapCubit? get activeConversationsBlocMapCubit;
|
||||
final ActiveConversationsBlocMapCubit? activeConversationsBlocMapCubit;
|
||||
@override
|
||||
ActiveSingleContactChatBlocMapCubit? get activeSingleContactChatBlocMapCubit;
|
||||
final ActiveSingleContactChatBlocMapCubit?
|
||||
activeSingleContactChatBlocMapCubit;
|
||||
|
||||
/// Create a copy of PerAccountCollectionState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$PerAccountCollectionStateImplCopyWith<_$PerAccountCollectionStateImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
@pragma('vm:prefer-inline')
|
||||
_$PerAccountCollectionStateCopyWith<_PerAccountCollectionState>
|
||||
get copyWith =>
|
||||
__$PerAccountCollectionStateCopyWithImpl<_PerAccountCollectionState>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _PerAccountCollectionState &&
|
||||
(identical(other.accountInfo, accountInfo) ||
|
||||
other.accountInfo == accountInfo) &&
|
||||
(identical(other.avAccountRecordState, avAccountRecordState) ||
|
||||
other.avAccountRecordState == avAccountRecordState) &&
|
||||
(identical(other.accountInfoCubit, accountInfoCubit) ||
|
||||
other.accountInfoCubit == accountInfoCubit) &&
|
||||
(identical(other.accountRecordCubit, accountRecordCubit) ||
|
||||
other.accountRecordCubit == accountRecordCubit) &&
|
||||
(identical(other.contactInvitationListCubit,
|
||||
contactInvitationListCubit) ||
|
||||
other.contactInvitationListCubit ==
|
||||
contactInvitationListCubit) &&
|
||||
(identical(other.contactListCubit, contactListCubit) ||
|
||||
other.contactListCubit == contactListCubit) &&
|
||||
(identical(other.waitingInvitationsBlocMapCubit,
|
||||
waitingInvitationsBlocMapCubit) ||
|
||||
other.waitingInvitationsBlocMapCubit ==
|
||||
waitingInvitationsBlocMapCubit) &&
|
||||
(identical(other.activeChatCubit, activeChatCubit) ||
|
||||
other.activeChatCubit == activeChatCubit) &&
|
||||
(identical(other.chatListCubit, chatListCubit) ||
|
||||
other.chatListCubit == chatListCubit) &&
|
||||
(identical(other.activeConversationsBlocMapCubit,
|
||||
activeConversationsBlocMapCubit) ||
|
||||
other.activeConversationsBlocMapCubit ==
|
||||
activeConversationsBlocMapCubit) &&
|
||||
(identical(other.activeSingleContactChatBlocMapCubit,
|
||||
activeSingleContactChatBlocMapCubit) ||
|
||||
other.activeSingleContactChatBlocMapCubit ==
|
||||
activeSingleContactChatBlocMapCubit));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
accountInfo,
|
||||
avAccountRecordState,
|
||||
accountInfoCubit,
|
||||
accountRecordCubit,
|
||||
contactInvitationListCubit,
|
||||
contactListCubit,
|
||||
waitingInvitationsBlocMapCubit,
|
||||
activeChatCubit,
|
||||
chatListCubit,
|
||||
activeConversationsBlocMapCubit,
|
||||
activeSingleContactChatBlocMapCubit);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'PerAccountCollectionState(accountInfo: $accountInfo, avAccountRecordState: $avAccountRecordState, accountInfoCubit: $accountInfoCubit, accountRecordCubit: $accountRecordCubit, contactInvitationListCubit: $contactInvitationListCubit, contactListCubit: $contactListCubit, waitingInvitationsBlocMapCubit: $waitingInvitationsBlocMapCubit, activeChatCubit: $activeChatCubit, chatListCubit: $chatListCubit, activeConversationsBlocMapCubit: $activeConversationsBlocMapCubit, activeSingleContactChatBlocMapCubit: $activeSingleContactChatBlocMapCubit)';
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$PerAccountCollectionStateCopyWith<$Res>
|
||||
implements $PerAccountCollectionStateCopyWith<$Res> {
|
||||
factory _$PerAccountCollectionStateCopyWith(_PerAccountCollectionState value,
|
||||
$Res Function(_PerAccountCollectionState) _then) =
|
||||
__$PerAccountCollectionStateCopyWithImpl;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{AccountInfo accountInfo,
|
||||
AsyncValue<Account>? avAccountRecordState,
|
||||
AccountInfoCubit? accountInfoCubit,
|
||||
AccountRecordCubit? accountRecordCubit,
|
||||
ContactInvitationListCubit? contactInvitationListCubit,
|
||||
ContactListCubit? contactListCubit,
|
||||
WaitingInvitationsBlocMapCubit? waitingInvitationsBlocMapCubit,
|
||||
ActiveChatCubit? activeChatCubit,
|
||||
ChatListCubit? chatListCubit,
|
||||
ActiveConversationsBlocMapCubit? activeConversationsBlocMapCubit,
|
||||
ActiveSingleContactChatBlocMapCubit?
|
||||
activeSingleContactChatBlocMapCubit});
|
||||
|
||||
@override
|
||||
$AsyncValueCopyWith<Account, $Res>? get avAccountRecordState;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$PerAccountCollectionStateCopyWithImpl<$Res>
|
||||
implements _$PerAccountCollectionStateCopyWith<$Res> {
|
||||
__$PerAccountCollectionStateCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _PerAccountCollectionState _self;
|
||||
final $Res Function(_PerAccountCollectionState) _then;
|
||||
|
||||
/// Create a copy of PerAccountCollectionState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$Res call({
|
||||
Object? accountInfo = null,
|
||||
Object? avAccountRecordState = freezed,
|
||||
Object? accountInfoCubit = freezed,
|
||||
Object? accountRecordCubit = freezed,
|
||||
Object? contactInvitationListCubit = freezed,
|
||||
Object? contactListCubit = freezed,
|
||||
Object? waitingInvitationsBlocMapCubit = freezed,
|
||||
Object? activeChatCubit = freezed,
|
||||
Object? chatListCubit = freezed,
|
||||
Object? activeConversationsBlocMapCubit = freezed,
|
||||
Object? activeSingleContactChatBlocMapCubit = freezed,
|
||||
}) {
|
||||
return _then(_PerAccountCollectionState(
|
||||
accountInfo: null == accountInfo
|
||||
? _self.accountInfo
|
||||
: accountInfo // ignore: cast_nullable_to_non_nullable
|
||||
as AccountInfo,
|
||||
avAccountRecordState: freezed == avAccountRecordState
|
||||
? _self.avAccountRecordState
|
||||
: avAccountRecordState // ignore: cast_nullable_to_non_nullable
|
||||
as AsyncValue<Account>?,
|
||||
accountInfoCubit: freezed == accountInfoCubit
|
||||
? _self.accountInfoCubit
|
||||
: accountInfoCubit // ignore: cast_nullable_to_non_nullable
|
||||
as AccountInfoCubit?,
|
||||
accountRecordCubit: freezed == accountRecordCubit
|
||||
? _self.accountRecordCubit
|
||||
: accountRecordCubit // ignore: cast_nullable_to_non_nullable
|
||||
as AccountRecordCubit?,
|
||||
contactInvitationListCubit: freezed == contactInvitationListCubit
|
||||
? _self.contactInvitationListCubit
|
||||
: contactInvitationListCubit // ignore: cast_nullable_to_non_nullable
|
||||
as ContactInvitationListCubit?,
|
||||
contactListCubit: freezed == contactListCubit
|
||||
? _self.contactListCubit
|
||||
: contactListCubit // ignore: cast_nullable_to_non_nullable
|
||||
as ContactListCubit?,
|
||||
waitingInvitationsBlocMapCubit: freezed == waitingInvitationsBlocMapCubit
|
||||
? _self.waitingInvitationsBlocMapCubit
|
||||
: waitingInvitationsBlocMapCubit // ignore: cast_nullable_to_non_nullable
|
||||
as WaitingInvitationsBlocMapCubit?,
|
||||
activeChatCubit: freezed == activeChatCubit
|
||||
? _self.activeChatCubit
|
||||
: activeChatCubit // ignore: cast_nullable_to_non_nullable
|
||||
as ActiveChatCubit?,
|
||||
chatListCubit: freezed == chatListCubit
|
||||
? _self.chatListCubit
|
||||
: chatListCubit // ignore: cast_nullable_to_non_nullable
|
||||
as ChatListCubit?,
|
||||
activeConversationsBlocMapCubit: freezed ==
|
||||
activeConversationsBlocMapCubit
|
||||
? _self.activeConversationsBlocMapCubit
|
||||
: activeConversationsBlocMapCubit // ignore: cast_nullable_to_non_nullable
|
||||
as ActiveConversationsBlocMapCubit?,
|
||||
activeSingleContactChatBlocMapCubit: freezed ==
|
||||
activeSingleContactChatBlocMapCubit
|
||||
? _self.activeSingleContactChatBlocMapCubit
|
||||
: activeSingleContactChatBlocMapCubit // ignore: cast_nullable_to_non_nullable
|
||||
as ActiveSingleContactChatBlocMapCubit?,
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of PerAccountCollectionState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$AsyncValueCopyWith<Account, $Res>? get avAccountRecordState {
|
||||
if (_self.avAccountRecordState == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $AsyncValueCopyWith<Account, $Res>(_self.avAccountRecordState!,
|
||||
(value) {
|
||||
return _then(_self.copyWith(avAccountRecordState: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// dart format on
|
||||
|
|
|
@ -9,7 +9,7 @@ part 'user_login.g.dart';
|
|||
// User logins are stored in the user_logins tablestore table
|
||||
// indexed by the accountSuperIdentityRecordKey
|
||||
@freezed
|
||||
class UserLogin with _$UserLogin {
|
||||
sealed class UserLogin with _$UserLogin {
|
||||
const factory UserLogin({
|
||||
// SuperIdentity record key for the user
|
||||
// used to index the local accounts table
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// dart format width=80
|
||||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint
|
||||
|
@ -9,195 +10,36 @@ part of 'user_login.dart';
|
|||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
||||
|
||||
UserLogin _$UserLoginFromJson(Map<String, dynamic> json) {
|
||||
return _UserLogin.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$UserLogin {
|
||||
// SuperIdentity record key for the user
|
||||
// used to index the local accounts table
|
||||
Typed<FixedEncodedString43> get superIdentityRecordKey =>
|
||||
throw _privateConstructorUsedError; // The identity secret as unlocked from the local accounts table
|
||||
Typed<FixedEncodedString43> get identitySecret =>
|
||||
throw _privateConstructorUsedError; // The account record key, owner key and secret pulled from the identity
|
||||
AccountRecordInfo get accountRecordInfo =>
|
||||
throw _privateConstructorUsedError; // The time this login was most recently used
|
||||
Timestamp get lastActive => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this UserLogin to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
TypedKey
|
||||
get superIdentityRecordKey; // The identity secret as unlocked from the local accounts table
|
||||
TypedSecret
|
||||
get identitySecret; // The account record key, owner key and secret pulled from the identity
|
||||
AccountRecordInfo
|
||||
get accountRecordInfo; // The time this login was most recently used
|
||||
Timestamp get lastActive;
|
||||
|
||||
/// Create a copy of UserLogin
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$UserLoginCopyWith<UserLogin> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
_$UserLoginCopyWithImpl<UserLogin>(this as UserLogin, _$identity);
|
||||
|
||||
/// @nodoc
|
||||
abstract class $UserLoginCopyWith<$Res> {
|
||||
factory $UserLoginCopyWith(UserLogin value, $Res Function(UserLogin) then) =
|
||||
_$UserLoginCopyWithImpl<$Res, UserLogin>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{Typed<FixedEncodedString43> superIdentityRecordKey,
|
||||
Typed<FixedEncodedString43> identitySecret,
|
||||
AccountRecordInfo accountRecordInfo,
|
||||
Timestamp lastActive});
|
||||
|
||||
$AccountRecordInfoCopyWith<$Res> get accountRecordInfo;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$UserLoginCopyWithImpl<$Res, $Val extends UserLogin>
|
||||
implements $UserLoginCopyWith<$Res> {
|
||||
_$UserLoginCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of UserLogin
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? superIdentityRecordKey = null,
|
||||
Object? identitySecret = null,
|
||||
Object? accountRecordInfo = null,
|
||||
Object? lastActive = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
superIdentityRecordKey: null == superIdentityRecordKey
|
||||
? _value.superIdentityRecordKey
|
||||
: superIdentityRecordKey // ignore: cast_nullable_to_non_nullable
|
||||
as Typed<FixedEncodedString43>,
|
||||
identitySecret: null == identitySecret
|
||||
? _value.identitySecret
|
||||
: identitySecret // ignore: cast_nullable_to_non_nullable
|
||||
as Typed<FixedEncodedString43>,
|
||||
accountRecordInfo: null == accountRecordInfo
|
||||
? _value.accountRecordInfo
|
||||
: accountRecordInfo // ignore: cast_nullable_to_non_nullable
|
||||
as AccountRecordInfo,
|
||||
lastActive: null == lastActive
|
||||
? _value.lastActive
|
||||
: lastActive // ignore: cast_nullable_to_non_nullable
|
||||
as Timestamp,
|
||||
) as $Val);
|
||||
}
|
||||
|
||||
/// Create a copy of UserLogin
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$AccountRecordInfoCopyWith<$Res> get accountRecordInfo {
|
||||
return $AccountRecordInfoCopyWith<$Res>(_value.accountRecordInfo, (value) {
|
||||
return _then(_value.copyWith(accountRecordInfo: value) as $Val);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$UserLoginImplCopyWith<$Res>
|
||||
implements $UserLoginCopyWith<$Res> {
|
||||
factory _$$UserLoginImplCopyWith(
|
||||
_$UserLoginImpl value, $Res Function(_$UserLoginImpl) then) =
|
||||
__$$UserLoginImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{Typed<FixedEncodedString43> superIdentityRecordKey,
|
||||
Typed<FixedEncodedString43> identitySecret,
|
||||
AccountRecordInfo accountRecordInfo,
|
||||
Timestamp lastActive});
|
||||
|
||||
@override
|
||||
$AccountRecordInfoCopyWith<$Res> get accountRecordInfo;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$UserLoginImplCopyWithImpl<$Res>
|
||||
extends _$UserLoginCopyWithImpl<$Res, _$UserLoginImpl>
|
||||
implements _$$UserLoginImplCopyWith<$Res> {
|
||||
__$$UserLoginImplCopyWithImpl(
|
||||
_$UserLoginImpl _value, $Res Function(_$UserLoginImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of UserLogin
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? superIdentityRecordKey = null,
|
||||
Object? identitySecret = null,
|
||||
Object? accountRecordInfo = null,
|
||||
Object? lastActive = null,
|
||||
}) {
|
||||
return _then(_$UserLoginImpl(
|
||||
superIdentityRecordKey: null == superIdentityRecordKey
|
||||
? _value.superIdentityRecordKey
|
||||
: superIdentityRecordKey // ignore: cast_nullable_to_non_nullable
|
||||
as Typed<FixedEncodedString43>,
|
||||
identitySecret: null == identitySecret
|
||||
? _value.identitySecret
|
||||
: identitySecret // ignore: cast_nullable_to_non_nullable
|
||||
as Typed<FixedEncodedString43>,
|
||||
accountRecordInfo: null == accountRecordInfo
|
||||
? _value.accountRecordInfo
|
||||
: accountRecordInfo // ignore: cast_nullable_to_non_nullable
|
||||
as AccountRecordInfo,
|
||||
lastActive: null == lastActive
|
||||
? _value.lastActive
|
||||
: lastActive // ignore: cast_nullable_to_non_nullable
|
||||
as Timestamp,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$UserLoginImpl implements _UserLogin {
|
||||
const _$UserLoginImpl(
|
||||
{required this.superIdentityRecordKey,
|
||||
required this.identitySecret,
|
||||
required this.accountRecordInfo,
|
||||
required this.lastActive});
|
||||
|
||||
factory _$UserLoginImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$UserLoginImplFromJson(json);
|
||||
|
||||
// SuperIdentity record key for the user
|
||||
// used to index the local accounts table
|
||||
@override
|
||||
final Typed<FixedEncodedString43> superIdentityRecordKey;
|
||||
// The identity secret as unlocked from the local accounts table
|
||||
@override
|
||||
final Typed<FixedEncodedString43> identitySecret;
|
||||
// The account record key, owner key and secret pulled from the identity
|
||||
@override
|
||||
final AccountRecordInfo accountRecordInfo;
|
||||
// The time this login was most recently used
|
||||
@override
|
||||
final Timestamp lastActive;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'UserLogin(superIdentityRecordKey: $superIdentityRecordKey, identitySecret: $identitySecret, accountRecordInfo: $accountRecordInfo, lastActive: $lastActive)';
|
||||
}
|
||||
/// Serializes this UserLogin to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$UserLoginImpl &&
|
||||
other is UserLogin &&
|
||||
(identical(other.superIdentityRecordKey, superIdentityRecordKey) ||
|
||||
other.superIdentityRecordKey == superIdentityRecordKey) &&
|
||||
(identical(other.identitySecret, identitySecret) ||
|
||||
|
@ -213,50 +55,204 @@ class _$UserLoginImpl implements _UserLogin {
|
|||
int get hashCode => Object.hash(runtimeType, superIdentityRecordKey,
|
||||
identitySecret, accountRecordInfo, lastActive);
|
||||
|
||||
/// Create a copy of UserLogin
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$UserLoginImplCopyWith<_$UserLoginImpl> get copyWith =>
|
||||
__$$UserLoginImplCopyWithImpl<_$UserLoginImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$UserLoginImplToJson(
|
||||
this,
|
||||
);
|
||||
String toString() {
|
||||
return 'UserLogin(superIdentityRecordKey: $superIdentityRecordKey, identitySecret: $identitySecret, accountRecordInfo: $accountRecordInfo, lastActive: $lastActive)';
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _UserLogin implements UserLogin {
|
||||
const factory _UserLogin(
|
||||
{required final Typed<FixedEncodedString43> superIdentityRecordKey,
|
||||
required final Typed<FixedEncodedString43> identitySecret,
|
||||
required final AccountRecordInfo accountRecordInfo,
|
||||
required final Timestamp lastActive}) = _$UserLoginImpl;
|
||||
/// @nodoc
|
||||
abstract mixin class $UserLoginCopyWith<$Res> {
|
||||
factory $UserLoginCopyWith(UserLogin value, $Res Function(UserLogin) _then) =
|
||||
_$UserLoginCopyWithImpl;
|
||||
@useResult
|
||||
$Res call(
|
||||
{Typed<FixedEncodedString43> superIdentityRecordKey,
|
||||
Typed<FixedEncodedString43> identitySecret,
|
||||
AccountRecordInfo accountRecordInfo,
|
||||
Timestamp lastActive});
|
||||
|
||||
factory _UserLogin.fromJson(Map<String, dynamic> json) =
|
||||
_$UserLoginImpl.fromJson;
|
||||
$AccountRecordInfoCopyWith<$Res> get accountRecordInfo;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$UserLoginCopyWithImpl<$Res> implements $UserLoginCopyWith<$Res> {
|
||||
_$UserLoginCopyWithImpl(this._self, this._then);
|
||||
|
||||
final UserLogin _self;
|
||||
final $Res Function(UserLogin) _then;
|
||||
|
||||
/// Create a copy of UserLogin
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? superIdentityRecordKey = null,
|
||||
Object? identitySecret = null,
|
||||
Object? accountRecordInfo = null,
|
||||
Object? lastActive = null,
|
||||
}) {
|
||||
return _then(_self.copyWith(
|
||||
superIdentityRecordKey: null == superIdentityRecordKey
|
||||
? _self.superIdentityRecordKey!
|
||||
: superIdentityRecordKey // ignore: cast_nullable_to_non_nullable
|
||||
as Typed<FixedEncodedString43>,
|
||||
identitySecret: null == identitySecret
|
||||
? _self.identitySecret!
|
||||
: identitySecret // ignore: cast_nullable_to_non_nullable
|
||||
as Typed<FixedEncodedString43>,
|
||||
accountRecordInfo: null == accountRecordInfo
|
||||
? _self.accountRecordInfo
|
||||
: accountRecordInfo // ignore: cast_nullable_to_non_nullable
|
||||
as AccountRecordInfo,
|
||||
lastActive: null == lastActive
|
||||
? _self.lastActive
|
||||
: lastActive // ignore: cast_nullable_to_non_nullable
|
||||
as Timestamp,
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of UserLogin
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$AccountRecordInfoCopyWith<$Res> get accountRecordInfo {
|
||||
return $AccountRecordInfoCopyWith<$Res>(_self.accountRecordInfo, (value) {
|
||||
return _then(_self.copyWith(accountRecordInfo: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _UserLogin implements UserLogin {
|
||||
const _UserLogin(
|
||||
{required this.superIdentityRecordKey,
|
||||
required this.identitySecret,
|
||||
required this.accountRecordInfo,
|
||||
required this.lastActive});
|
||||
factory _UserLogin.fromJson(Map<String, dynamic> json) =>
|
||||
_$UserLoginFromJson(json);
|
||||
|
||||
// SuperIdentity record key for the user
|
||||
// used to index the local accounts table
|
||||
@override
|
||||
Typed<FixedEncodedString43>
|
||||
get superIdentityRecordKey; // The identity secret as unlocked from the local accounts table
|
||||
final Typed<FixedEncodedString43> superIdentityRecordKey;
|
||||
// The identity secret as unlocked from the local accounts table
|
||||
@override
|
||||
Typed<FixedEncodedString43>
|
||||
get identitySecret; // The account record key, owner key and secret pulled from the identity
|
||||
final Typed<FixedEncodedString43> identitySecret;
|
||||
// The account record key, owner key and secret pulled from the identity
|
||||
@override
|
||||
AccountRecordInfo
|
||||
get accountRecordInfo; // The time this login was most recently used
|
||||
final AccountRecordInfo accountRecordInfo;
|
||||
// The time this login was most recently used
|
||||
@override
|
||||
Timestamp get lastActive;
|
||||
final Timestamp lastActive;
|
||||
|
||||
/// Create a copy of UserLogin
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$UserLoginImplCopyWith<_$UserLoginImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
@pragma('vm:prefer-inline')
|
||||
_$UserLoginCopyWith<_UserLogin> get copyWith =>
|
||||
__$UserLoginCopyWithImpl<_UserLogin>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$UserLoginToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _UserLogin &&
|
||||
(identical(other.superIdentityRecordKey, superIdentityRecordKey) ||
|
||||
other.superIdentityRecordKey == superIdentityRecordKey) &&
|
||||
(identical(other.identitySecret, identitySecret) ||
|
||||
other.identitySecret == identitySecret) &&
|
||||
(identical(other.accountRecordInfo, accountRecordInfo) ||
|
||||
other.accountRecordInfo == accountRecordInfo) &&
|
||||
(identical(other.lastActive, lastActive) ||
|
||||
other.lastActive == lastActive));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, superIdentityRecordKey,
|
||||
identitySecret, accountRecordInfo, lastActive);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'UserLogin(superIdentityRecordKey: $superIdentityRecordKey, identitySecret: $identitySecret, accountRecordInfo: $accountRecordInfo, lastActive: $lastActive)';
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$UserLoginCopyWith<$Res>
|
||||
implements $UserLoginCopyWith<$Res> {
|
||||
factory _$UserLoginCopyWith(
|
||||
_UserLogin value, $Res Function(_UserLogin) _then) =
|
||||
__$UserLoginCopyWithImpl;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{Typed<FixedEncodedString43> superIdentityRecordKey,
|
||||
Typed<FixedEncodedString43> identitySecret,
|
||||
AccountRecordInfo accountRecordInfo,
|
||||
Timestamp lastActive});
|
||||
|
||||
@override
|
||||
$AccountRecordInfoCopyWith<$Res> get accountRecordInfo;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$UserLoginCopyWithImpl<$Res> implements _$UserLoginCopyWith<$Res> {
|
||||
__$UserLoginCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _UserLogin _self;
|
||||
final $Res Function(_UserLogin) _then;
|
||||
|
||||
/// Create a copy of UserLogin
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$Res call({
|
||||
Object? superIdentityRecordKey = null,
|
||||
Object? identitySecret = null,
|
||||
Object? accountRecordInfo = null,
|
||||
Object? lastActive = null,
|
||||
}) {
|
||||
return _then(_UserLogin(
|
||||
superIdentityRecordKey: null == superIdentityRecordKey
|
||||
? _self.superIdentityRecordKey
|
||||
: superIdentityRecordKey // ignore: cast_nullable_to_non_nullable
|
||||
as Typed<FixedEncodedString43>,
|
||||
identitySecret: null == identitySecret
|
||||
? _self.identitySecret
|
||||
: identitySecret // ignore: cast_nullable_to_non_nullable
|
||||
as Typed<FixedEncodedString43>,
|
||||
accountRecordInfo: null == accountRecordInfo
|
||||
? _self.accountRecordInfo
|
||||
: accountRecordInfo // ignore: cast_nullable_to_non_nullable
|
||||
as AccountRecordInfo,
|
||||
lastActive: null == lastActive
|
||||
? _self.lastActive
|
||||
: lastActive // ignore: cast_nullable_to_non_nullable
|
||||
as Timestamp,
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of UserLogin
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$AccountRecordInfoCopyWith<$Res> get accountRecordInfo {
|
||||
return $AccountRecordInfoCopyWith<$Res>(_self.accountRecordInfo, (value) {
|
||||
return _then(_self.copyWith(accountRecordInfo: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// dart format on
|
||||
|
|
|
@ -6,8 +6,7 @@ part of 'user_login.dart';
|
|||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$UserLoginImpl _$$UserLoginImplFromJson(Map<String, dynamic> json) =>
|
||||
_$UserLoginImpl(
|
||||
_UserLogin _$UserLoginFromJson(Map<String, dynamic> json) => _UserLogin(
|
||||
superIdentityRecordKey: Typed<FixedEncodedString43>.fromJson(
|
||||
json['super_identity_record_key']),
|
||||
identitySecret:
|
||||
|
@ -17,7 +16,7 @@ _$UserLoginImpl _$$UserLoginImplFromJson(Map<String, dynamic> json) =>
|
|||
lastActive: Timestamp.fromJson(json['last_active']),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$UserLoginImplToJson(_$UserLoginImpl instance) =>
|
||||
Map<String, dynamic> _$UserLoginToJson(_UserLogin instance) =>
|
||||
<String, dynamic>{
|
||||
'super_identity_record_key': instance.superIdentityRecordKey.toJson(),
|
||||
'identity_secret': instance.identitySecret.toJson(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue