Initial commit
This commit is contained in:
96
lib/models/generated/clash_config.g.dart
Normal file
96
lib/models/generated/clash_config.g.dart
Normal file
@@ -0,0 +1,96 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of '../clash_config.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
Tun _$TunFromJson(Map<String, dynamic> json) => Tun()
|
||||
..enable = json['enable'] as bool
|
||||
..device = json['device'] as String
|
||||
..stack = $enumDecode(_$TunStackEnumMap, json['stack'])
|
||||
..dnsHijack =
|
||||
(json['dns-hijack'] as List<dynamic>).map((e) => e as String).toList();
|
||||
|
||||
Map<String, dynamic> _$TunToJson(Tun instance) => <String, dynamic>{
|
||||
'enable': instance.enable,
|
||||
'device': instance.device,
|
||||
'stack': _$TunStackEnumMap[instance.stack]!,
|
||||
'dns-hijack': instance.dnsHijack,
|
||||
};
|
||||
|
||||
const _$TunStackEnumMap = {
|
||||
TunStack.gvisor: 'gvisor',
|
||||
TunStack.system: 'system',
|
||||
TunStack.mixed: 'mixed',
|
||||
};
|
||||
|
||||
Dns _$DnsFromJson(Map<String, dynamic> json) => Dns()
|
||||
..enable = json['enable'] as bool
|
||||
..ipv6 = json['ipv6'] as bool
|
||||
..defaultNameserver = (json['default-nameserver'] as List<dynamic>)
|
||||
.map((e) => e as String)
|
||||
.toList()
|
||||
..enhancedMode = json['enhanced-mode'] as String
|
||||
..fakeIpRange = json['fake-ip-range'] as String
|
||||
..useHosts = json['use-hosts'] as bool
|
||||
..nameserver =
|
||||
(json['nameserver'] as List<dynamic>).map((e) => e as String).toList()
|
||||
..fallback =
|
||||
(json['fallback'] as List<dynamic>).map((e) => e as String).toList()
|
||||
..fakeIpFilter = (json['fake-ip-filter'] as List<dynamic>)
|
||||
.map((e) => e as String)
|
||||
.toList();
|
||||
|
||||
Map<String, dynamic> _$DnsToJson(Dns instance) => <String, dynamic>{
|
||||
'enable': instance.enable,
|
||||
'ipv6': instance.ipv6,
|
||||
'default-nameserver': instance.defaultNameserver,
|
||||
'enhanced-mode': instance.enhancedMode,
|
||||
'fake-ip-range': instance.fakeIpRange,
|
||||
'use-hosts': instance.useHosts,
|
||||
'nameserver': instance.nameserver,
|
||||
'fallback': instance.fallback,
|
||||
'fake-ip-filter': instance.fakeIpFilter,
|
||||
};
|
||||
|
||||
ClashConfig _$ClashConfigFromJson(Map<String, dynamic> json) => ClashConfig(
|
||||
mixedPort: (json['mixed-port'] as num?)?.toInt(),
|
||||
mode: $enumDecodeNullable(_$ModeEnumMap, json['mode']),
|
||||
allowLan: json['allow-lan'] as bool?,
|
||||
logLevel: $enumDecodeNullable(_$LogLevelEnumMap, json['log-level']),
|
||||
tun: json['tun'] == null
|
||||
? null
|
||||
: Tun.fromJson(json['tun'] as Map<String, dynamic>),
|
||||
dns: json['dns'] == null
|
||||
? null
|
||||
: Dns.fromJson(json['dns'] as Map<String, dynamic>),
|
||||
rules:
|
||||
(json['rules'] as List<dynamic>?)?.map((e) => e as String).toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ClashConfigToJson(ClashConfig instance) =>
|
||||
<String, dynamic>{
|
||||
'mixed-port': instance.mixedPort,
|
||||
'mode': _$ModeEnumMap[instance.mode]!,
|
||||
'allow-lan': instance.allowLan,
|
||||
'log-level': _$LogLevelEnumMap[instance.logLevel]!,
|
||||
'tun': instance.tun,
|
||||
'dns': instance.dns,
|
||||
'rules': instance.rules,
|
||||
};
|
||||
|
||||
const _$ModeEnumMap = {
|
||||
Mode.rule: 'rule',
|
||||
Mode.global: 'global',
|
||||
Mode.direct: 'direct',
|
||||
};
|
||||
|
||||
const _$LogLevelEnumMap = {
|
||||
LogLevel.debug: 'debug',
|
||||
LogLevel.info: 'info',
|
||||
LogLevel.warning: 'warning',
|
||||
LogLevel.error: 'error',
|
||||
LogLevel.silent: 'silent',
|
||||
};
|
||||
87
lib/models/generated/config.g.dart
Normal file
87
lib/models/generated/config.g.dart
Normal file
@@ -0,0 +1,87 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of '../config.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
AccessControl _$AccessControlFromJson(Map<String, dynamic> json) =>
|
||||
AccessControl(
|
||||
isFilterSystemApp: json['isFilterSystemApp'] as bool? ?? true,
|
||||
mode: $enumDecodeNullable(_$AccessControlModeEnumMap, json['mode']) ??
|
||||
AccessControlMode.rejectSelected,
|
||||
acceptList: (json['acceptList'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList() ??
|
||||
const [],
|
||||
rejectList: (json['rejectList'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList() ??
|
||||
const [],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$AccessControlToJson(AccessControl instance) =>
|
||||
<String, dynamic>{
|
||||
'mode': _$AccessControlModeEnumMap[instance.mode]!,
|
||||
'acceptList': instance.acceptList,
|
||||
'rejectList': instance.rejectList,
|
||||
'isFilterSystemApp': instance.isFilterSystemApp,
|
||||
};
|
||||
|
||||
const _$AccessControlModeEnumMap = {
|
||||
AccessControlMode.acceptSelected: 'acceptSelected',
|
||||
AccessControlMode.rejectSelected: 'rejectSelected',
|
||||
};
|
||||
|
||||
Config _$ConfigFromJson(Map<String, dynamic> json) => Config()
|
||||
..profiles = (json['profiles'] as List<dynamic>?)
|
||||
?.map((e) => Profile.fromJson(e as Map<String, dynamic>))
|
||||
.toList() ??
|
||||
[]
|
||||
..currentProfileId = json['currentProfileId'] as String?
|
||||
..autoLaunch = json['autoLaunch'] as bool? ?? false
|
||||
..silentLaunch = json['silentLaunch'] as bool? ?? false
|
||||
..autoRun = json['autoRun'] as bool? ?? false
|
||||
..themeMode = $enumDecodeNullable(_$ThemeModeEnumMap, json['themeMode']) ??
|
||||
ThemeMode.system
|
||||
..openLogs = json['openLogs'] as bool? ?? false
|
||||
..locale = json['locale'] as String?
|
||||
..primaryColor = (json['primaryColor'] as num?)?.toInt()
|
||||
..proxiesSortType =
|
||||
$enumDecodeNullable(_$ProxiesSortTypeEnumMap, json['proxiesSortType']) ??
|
||||
ProxiesSortType.none
|
||||
..isMinimizeOnExit = json['isMinimizeOnExit'] as bool? ?? true
|
||||
..isAccessControl = json['isAccessControl'] as bool? ?? false
|
||||
..accessControl =
|
||||
AccessControl.fromJson(json['accessControl'] as Map<String, dynamic>)
|
||||
..isAnimateToPage = json['isAnimateToPage'] as bool? ?? true;
|
||||
|
||||
Map<String, dynamic> _$ConfigToJson(Config instance) => <String, dynamic>{
|
||||
'profiles': instance.profiles,
|
||||
'currentProfileId': instance.currentProfileId,
|
||||
'autoLaunch': instance.autoLaunch,
|
||||
'silentLaunch': instance.silentLaunch,
|
||||
'autoRun': instance.autoRun,
|
||||
'themeMode': _$ThemeModeEnumMap[instance.themeMode]!,
|
||||
'openLogs': instance.openLogs,
|
||||
'locale': instance.locale,
|
||||
'primaryColor': instance.primaryColor,
|
||||
'proxiesSortType': _$ProxiesSortTypeEnumMap[instance.proxiesSortType]!,
|
||||
'isMinimizeOnExit': instance.isMinimizeOnExit,
|
||||
'isAccessControl': instance.isAccessControl,
|
||||
'accessControl': instance.accessControl,
|
||||
'isAnimateToPage': instance.isAnimateToPage,
|
||||
};
|
||||
|
||||
const _$ThemeModeEnumMap = {
|
||||
ThemeMode.system: 'system',
|
||||
ThemeMode.light: 'light',
|
||||
ThemeMode.dark: 'dark',
|
||||
};
|
||||
|
||||
const _$ProxiesSortTypeEnumMap = {
|
||||
ProxiesSortType.none: 'none',
|
||||
ProxiesSortType.delay: 'delay',
|
||||
ProxiesSortType.name: 'name',
|
||||
};
|
||||
562
lib/models/generated/connection.freezed.dart
Normal file
562
lib/models/generated/connection.freezed.dart
Normal file
@@ -0,0 +1,562 @@
|
||||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of '../connection.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
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');
|
||||
|
||||
Metadata _$MetadataFromJson(Map<String, dynamic> json) {
|
||||
return _Metadata.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$Metadata {
|
||||
int get uid => throw _privateConstructorUsedError;
|
||||
String get network => throw _privateConstructorUsedError;
|
||||
String get sourceIP => throw _privateConstructorUsedError;
|
||||
String get sourcePort => throw _privateConstructorUsedError;
|
||||
String get destinationIP => throw _privateConstructorUsedError;
|
||||
String get destinationPort => throw _privateConstructorUsedError;
|
||||
String get host => throw _privateConstructorUsedError;
|
||||
String get remoteDestination => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
$MetadataCopyWith<Metadata> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $MetadataCopyWith<$Res> {
|
||||
factory $MetadataCopyWith(Metadata value, $Res Function(Metadata) then) =
|
||||
_$MetadataCopyWithImpl<$Res, Metadata>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{int uid,
|
||||
String network,
|
||||
String sourceIP,
|
||||
String sourcePort,
|
||||
String destinationIP,
|
||||
String destinationPort,
|
||||
String host,
|
||||
String remoteDestination});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$MetadataCopyWithImpl<$Res, $Val extends Metadata>
|
||||
implements $MetadataCopyWith<$Res> {
|
||||
_$MetadataCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? uid = null,
|
||||
Object? network = null,
|
||||
Object? sourceIP = null,
|
||||
Object? sourcePort = null,
|
||||
Object? destinationIP = null,
|
||||
Object? destinationPort = null,
|
||||
Object? host = null,
|
||||
Object? remoteDestination = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
uid: null == uid
|
||||
? _value.uid
|
||||
: uid // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
network: null == network
|
||||
? _value.network
|
||||
: network // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
sourceIP: null == sourceIP
|
||||
? _value.sourceIP
|
||||
: sourceIP // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
sourcePort: null == sourcePort
|
||||
? _value.sourcePort
|
||||
: sourcePort // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
destinationIP: null == destinationIP
|
||||
? _value.destinationIP
|
||||
: destinationIP // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
destinationPort: null == destinationPort
|
||||
? _value.destinationPort
|
||||
: destinationPort // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
host: null == host
|
||||
? _value.host
|
||||
: host // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
remoteDestination: null == remoteDestination
|
||||
? _value.remoteDestination
|
||||
: remoteDestination // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$MetadataImplCopyWith<$Res>
|
||||
implements $MetadataCopyWith<$Res> {
|
||||
factory _$$MetadataImplCopyWith(
|
||||
_$MetadataImpl value, $Res Function(_$MetadataImpl) then) =
|
||||
__$$MetadataImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{int uid,
|
||||
String network,
|
||||
String sourceIP,
|
||||
String sourcePort,
|
||||
String destinationIP,
|
||||
String destinationPort,
|
||||
String host,
|
||||
String remoteDestination});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$MetadataImplCopyWithImpl<$Res>
|
||||
extends _$MetadataCopyWithImpl<$Res, _$MetadataImpl>
|
||||
implements _$$MetadataImplCopyWith<$Res> {
|
||||
__$$MetadataImplCopyWithImpl(
|
||||
_$MetadataImpl _value, $Res Function(_$MetadataImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? uid = null,
|
||||
Object? network = null,
|
||||
Object? sourceIP = null,
|
||||
Object? sourcePort = null,
|
||||
Object? destinationIP = null,
|
||||
Object? destinationPort = null,
|
||||
Object? host = null,
|
||||
Object? remoteDestination = null,
|
||||
}) {
|
||||
return _then(_$MetadataImpl(
|
||||
uid: null == uid
|
||||
? _value.uid
|
||||
: uid // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
network: null == network
|
||||
? _value.network
|
||||
: network // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
sourceIP: null == sourceIP
|
||||
? _value.sourceIP
|
||||
: sourceIP // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
sourcePort: null == sourcePort
|
||||
? _value.sourcePort
|
||||
: sourcePort // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
destinationIP: null == destinationIP
|
||||
? _value.destinationIP
|
||||
: destinationIP // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
destinationPort: null == destinationPort
|
||||
? _value.destinationPort
|
||||
: destinationPort // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
host: null == host
|
||||
? _value.host
|
||||
: host // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
remoteDestination: null == remoteDestination
|
||||
? _value.remoteDestination
|
||||
: remoteDestination // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$MetadataImpl implements _Metadata {
|
||||
const _$MetadataImpl(
|
||||
{required this.uid,
|
||||
required this.network,
|
||||
required this.sourceIP,
|
||||
required this.sourcePort,
|
||||
required this.destinationIP,
|
||||
required this.destinationPort,
|
||||
required this.host,
|
||||
required this.remoteDestination});
|
||||
|
||||
factory _$MetadataImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$MetadataImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int uid;
|
||||
@override
|
||||
final String network;
|
||||
@override
|
||||
final String sourceIP;
|
||||
@override
|
||||
final String sourcePort;
|
||||
@override
|
||||
final String destinationIP;
|
||||
@override
|
||||
final String destinationPort;
|
||||
@override
|
||||
final String host;
|
||||
@override
|
||||
final String remoteDestination;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'Metadata(uid: $uid, network: $network, sourceIP: $sourceIP, sourcePort: $sourcePort, destinationIP: $destinationIP, destinationPort: $destinationPort, host: $host, remoteDestination: $remoteDestination)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$MetadataImpl &&
|
||||
(identical(other.uid, uid) || other.uid == uid) &&
|
||||
(identical(other.network, network) || other.network == network) &&
|
||||
(identical(other.sourceIP, sourceIP) ||
|
||||
other.sourceIP == sourceIP) &&
|
||||
(identical(other.sourcePort, sourcePort) ||
|
||||
other.sourcePort == sourcePort) &&
|
||||
(identical(other.destinationIP, destinationIP) ||
|
||||
other.destinationIP == destinationIP) &&
|
||||
(identical(other.destinationPort, destinationPort) ||
|
||||
other.destinationPort == destinationPort) &&
|
||||
(identical(other.host, host) || other.host == host) &&
|
||||
(identical(other.remoteDestination, remoteDestination) ||
|
||||
other.remoteDestination == remoteDestination));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, uid, network, sourceIP,
|
||||
sourcePort, destinationIP, destinationPort, host, remoteDestination);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$MetadataImplCopyWith<_$MetadataImpl> get copyWith =>
|
||||
__$$MetadataImplCopyWithImpl<_$MetadataImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$MetadataImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _Metadata implements Metadata {
|
||||
const factory _Metadata(
|
||||
{required final int uid,
|
||||
required final String network,
|
||||
required final String sourceIP,
|
||||
required final String sourcePort,
|
||||
required final String destinationIP,
|
||||
required final String destinationPort,
|
||||
required final String host,
|
||||
required final String remoteDestination}) = _$MetadataImpl;
|
||||
|
||||
factory _Metadata.fromJson(Map<String, dynamic> json) =
|
||||
_$MetadataImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get uid;
|
||||
@override
|
||||
String get network;
|
||||
@override
|
||||
String get sourceIP;
|
||||
@override
|
||||
String get sourcePort;
|
||||
@override
|
||||
String get destinationIP;
|
||||
@override
|
||||
String get destinationPort;
|
||||
@override
|
||||
String get host;
|
||||
@override
|
||||
String get remoteDestination;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$MetadataImplCopyWith<_$MetadataImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
Connection _$ConnectionFromJson(Map<String, dynamic> json) {
|
||||
return _Connection.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$Connection {
|
||||
String get id => throw _privateConstructorUsedError;
|
||||
num? get upload => throw _privateConstructorUsedError;
|
||||
num? get download => throw _privateConstructorUsedError;
|
||||
DateTime get start => throw _privateConstructorUsedError;
|
||||
Metadata get metadata => throw _privateConstructorUsedError;
|
||||
List<String> get chains => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
$ConnectionCopyWith<Connection> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ConnectionCopyWith<$Res> {
|
||||
factory $ConnectionCopyWith(
|
||||
Connection value, $Res Function(Connection) then) =
|
||||
_$ConnectionCopyWithImpl<$Res, Connection>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{String id,
|
||||
num? upload,
|
||||
num? download,
|
||||
DateTime start,
|
||||
Metadata metadata,
|
||||
List<String> chains});
|
||||
|
||||
$MetadataCopyWith<$Res> get metadata;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ConnectionCopyWithImpl<$Res, $Val extends Connection>
|
||||
implements $ConnectionCopyWith<$Res> {
|
||||
_$ConnectionCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
Object? upload = freezed,
|
||||
Object? download = freezed,
|
||||
Object? start = null,
|
||||
Object? metadata = null,
|
||||
Object? chains = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
upload: freezed == upload
|
||||
? _value.upload
|
||||
: upload // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
download: freezed == download
|
||||
? _value.download
|
||||
: download // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
start: null == start
|
||||
? _value.start
|
||||
: start // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
metadata: null == metadata
|
||||
? _value.metadata
|
||||
: metadata // ignore: cast_nullable_to_non_nullable
|
||||
as Metadata,
|
||||
chains: null == chains
|
||||
? _value.chains
|
||||
: chains // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
) as $Val);
|
||||
}
|
||||
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$MetadataCopyWith<$Res> get metadata {
|
||||
return $MetadataCopyWith<$Res>(_value.metadata, (value) {
|
||||
return _then(_value.copyWith(metadata: value) as $Val);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ConnectionImplCopyWith<$Res>
|
||||
implements $ConnectionCopyWith<$Res> {
|
||||
factory _$$ConnectionImplCopyWith(
|
||||
_$ConnectionImpl value, $Res Function(_$ConnectionImpl) then) =
|
||||
__$$ConnectionImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{String id,
|
||||
num? upload,
|
||||
num? download,
|
||||
DateTime start,
|
||||
Metadata metadata,
|
||||
List<String> chains});
|
||||
|
||||
@override
|
||||
$MetadataCopyWith<$Res> get metadata;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ConnectionImplCopyWithImpl<$Res>
|
||||
extends _$ConnectionCopyWithImpl<$Res, _$ConnectionImpl>
|
||||
implements _$$ConnectionImplCopyWith<$Res> {
|
||||
__$$ConnectionImplCopyWithImpl(
|
||||
_$ConnectionImpl _value, $Res Function(_$ConnectionImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
Object? upload = freezed,
|
||||
Object? download = freezed,
|
||||
Object? start = null,
|
||||
Object? metadata = null,
|
||||
Object? chains = null,
|
||||
}) {
|
||||
return _then(_$ConnectionImpl(
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
upload: freezed == upload
|
||||
? _value.upload
|
||||
: upload // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
download: freezed == download
|
||||
? _value.download
|
||||
: download // ignore: cast_nullable_to_non_nullable
|
||||
as num?,
|
||||
start: null == start
|
||||
? _value.start
|
||||
: start // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
metadata: null == metadata
|
||||
? _value.metadata
|
||||
: metadata // ignore: cast_nullable_to_non_nullable
|
||||
as Metadata,
|
||||
chains: null == chains
|
||||
? _value._chains
|
||||
: chains // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$ConnectionImpl implements _Connection {
|
||||
const _$ConnectionImpl(
|
||||
{required this.id,
|
||||
this.upload,
|
||||
this.download,
|
||||
required this.start,
|
||||
required this.metadata,
|
||||
required final List<String> chains})
|
||||
: _chains = chains;
|
||||
|
||||
factory _$ConnectionImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ConnectionImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String id;
|
||||
@override
|
||||
final num? upload;
|
||||
@override
|
||||
final num? download;
|
||||
@override
|
||||
final DateTime start;
|
||||
@override
|
||||
final Metadata metadata;
|
||||
final List<String> _chains;
|
||||
@override
|
||||
List<String> get chains {
|
||||
if (_chains is EqualUnmodifiableListView) return _chains;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_chains);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'Connection(id: $id, upload: $upload, download: $download, start: $start, metadata: $metadata, chains: $chains)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ConnectionImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.upload, upload) || other.upload == upload) &&
|
||||
(identical(other.download, download) ||
|
||||
other.download == download) &&
|
||||
(identical(other.start, start) || other.start == start) &&
|
||||
(identical(other.metadata, metadata) ||
|
||||
other.metadata == metadata) &&
|
||||
const DeepCollectionEquality().equals(other._chains, _chains));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, upload, download, start,
|
||||
metadata, const DeepCollectionEquality().hash(_chains));
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ConnectionImplCopyWith<_$ConnectionImpl> get copyWith =>
|
||||
__$$ConnectionImplCopyWithImpl<_$ConnectionImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$ConnectionImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _Connection implements Connection {
|
||||
const factory _Connection(
|
||||
{required final String id,
|
||||
final num? upload,
|
||||
final num? download,
|
||||
required final DateTime start,
|
||||
required final Metadata metadata,
|
||||
required final List<String> chains}) = _$ConnectionImpl;
|
||||
|
||||
factory _Connection.fromJson(Map<String, dynamic> json) =
|
||||
_$ConnectionImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get id;
|
||||
@override
|
||||
num? get upload;
|
||||
@override
|
||||
num? get download;
|
||||
@override
|
||||
DateTime get start;
|
||||
@override
|
||||
Metadata get metadata;
|
||||
@override
|
||||
List<String> get chains;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$ConnectionImplCopyWith<_$ConnectionImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
52
lib/models/generated/connection.g.dart
Normal file
52
lib/models/generated/connection.g.dart
Normal file
@@ -0,0 +1,52 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of '../connection.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$MetadataImpl _$$MetadataImplFromJson(Map<String, dynamic> json) =>
|
||||
_$MetadataImpl(
|
||||
uid: (json['uid'] as num).toInt(),
|
||||
network: json['network'] as String,
|
||||
sourceIP: json['sourceIP'] as String,
|
||||
sourcePort: json['sourcePort'] as String,
|
||||
destinationIP: json['destinationIP'] as String,
|
||||
destinationPort: json['destinationPort'] as String,
|
||||
host: json['host'] as String,
|
||||
remoteDestination: json['remoteDestination'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$MetadataImplToJson(_$MetadataImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'uid': instance.uid,
|
||||
'network': instance.network,
|
||||
'sourceIP': instance.sourceIP,
|
||||
'sourcePort': instance.sourcePort,
|
||||
'destinationIP': instance.destinationIP,
|
||||
'destinationPort': instance.destinationPort,
|
||||
'host': instance.host,
|
||||
'remoteDestination': instance.remoteDestination,
|
||||
};
|
||||
|
||||
_$ConnectionImpl _$$ConnectionImplFromJson(Map<String, dynamic> json) =>
|
||||
_$ConnectionImpl(
|
||||
id: json['id'] as String,
|
||||
upload: json['upload'] as num?,
|
||||
download: json['download'] as num?,
|
||||
start: DateTime.parse(json['start'] as String),
|
||||
metadata: Metadata.fromJson(json['metadata'] as Map<String, dynamic>),
|
||||
chains:
|
||||
(json['chains'] as List<dynamic>).map((e) => e as String).toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ConnectionImplToJson(_$ConnectionImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'upload': instance.upload,
|
||||
'download': instance.download,
|
||||
'start': instance.start.toIso8601String(),
|
||||
'metadata': instance.metadata,
|
||||
'chains': instance.chains,
|
||||
};
|
||||
861
lib/models/generated/ffi.freezed.dart
Normal file
861
lib/models/generated/ffi.freezed.dart
Normal file
@@ -0,0 +1,861 @@
|
||||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of '../ffi.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
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');
|
||||
|
||||
UpdateConfigParams _$UpdateConfigParamsFromJson(Map<String, dynamic> json) {
|
||||
return _UpdateConfigParams.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$UpdateConfigParams {
|
||||
@JsonKey(name: "profile-path")
|
||||
String? get profilePath => throw _privateConstructorUsedError;
|
||||
ClashConfig get config => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "is-patch")
|
||||
bool? get isPatch => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
$UpdateConfigParamsCopyWith<UpdateConfigParams> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $UpdateConfigParamsCopyWith<$Res> {
|
||||
factory $UpdateConfigParamsCopyWith(
|
||||
UpdateConfigParams value, $Res Function(UpdateConfigParams) then) =
|
||||
_$UpdateConfigParamsCopyWithImpl<$Res, UpdateConfigParams>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "profile-path") String? profilePath,
|
||||
ClashConfig config,
|
||||
@JsonKey(name: "is-patch") bool? isPatch});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$UpdateConfigParamsCopyWithImpl<$Res, $Val extends UpdateConfigParams>
|
||||
implements $UpdateConfigParamsCopyWith<$Res> {
|
||||
_$UpdateConfigParamsCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? profilePath = freezed,
|
||||
Object? config = null,
|
||||
Object? isPatch = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
profilePath: freezed == profilePath
|
||||
? _value.profilePath
|
||||
: profilePath // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
config: null == config
|
||||
? _value.config
|
||||
: config // ignore: cast_nullable_to_non_nullable
|
||||
as ClashConfig,
|
||||
isPatch: freezed == isPatch
|
||||
? _value.isPatch
|
||||
: isPatch // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$UpdateConfigParamsImplCopyWith<$Res>
|
||||
implements $UpdateConfigParamsCopyWith<$Res> {
|
||||
factory _$$UpdateConfigParamsImplCopyWith(_$UpdateConfigParamsImpl value,
|
||||
$Res Function(_$UpdateConfigParamsImpl) then) =
|
||||
__$$UpdateConfigParamsImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "profile-path") String? profilePath,
|
||||
ClashConfig config,
|
||||
@JsonKey(name: "is-patch") bool? isPatch});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$UpdateConfigParamsImplCopyWithImpl<$Res>
|
||||
extends _$UpdateConfigParamsCopyWithImpl<$Res, _$UpdateConfigParamsImpl>
|
||||
implements _$$UpdateConfigParamsImplCopyWith<$Res> {
|
||||
__$$UpdateConfigParamsImplCopyWithImpl(_$UpdateConfigParamsImpl _value,
|
||||
$Res Function(_$UpdateConfigParamsImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? profilePath = freezed,
|
||||
Object? config = null,
|
||||
Object? isPatch = freezed,
|
||||
}) {
|
||||
return _then(_$UpdateConfigParamsImpl(
|
||||
profilePath: freezed == profilePath
|
||||
? _value.profilePath
|
||||
: profilePath // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
config: null == config
|
||||
? _value.config
|
||||
: config // ignore: cast_nullable_to_non_nullable
|
||||
as ClashConfig,
|
||||
isPatch: freezed == isPatch
|
||||
? _value.isPatch
|
||||
: isPatch // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$UpdateConfigParamsImpl implements _UpdateConfigParams {
|
||||
const _$UpdateConfigParamsImpl(
|
||||
{@JsonKey(name: "profile-path") this.profilePath,
|
||||
required this.config,
|
||||
@JsonKey(name: "is-patch") this.isPatch});
|
||||
|
||||
factory _$UpdateConfigParamsImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$UpdateConfigParamsImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "profile-path")
|
||||
final String? profilePath;
|
||||
@override
|
||||
final ClashConfig config;
|
||||
@override
|
||||
@JsonKey(name: "is-patch")
|
||||
final bool? isPatch;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'UpdateConfigParams(profilePath: $profilePath, config: $config, isPatch: $isPatch)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$UpdateConfigParamsImpl &&
|
||||
(identical(other.profilePath, profilePath) ||
|
||||
other.profilePath == profilePath) &&
|
||||
(identical(other.config, config) || other.config == config) &&
|
||||
(identical(other.isPatch, isPatch) || other.isPatch == isPatch));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, profilePath, config, isPatch);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$UpdateConfigParamsImplCopyWith<_$UpdateConfigParamsImpl> get copyWith =>
|
||||
__$$UpdateConfigParamsImplCopyWithImpl<_$UpdateConfigParamsImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$UpdateConfigParamsImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _UpdateConfigParams implements UpdateConfigParams {
|
||||
const factory _UpdateConfigParams(
|
||||
{@JsonKey(name: "profile-path") final String? profilePath,
|
||||
required final ClashConfig config,
|
||||
@JsonKey(name: "is-patch") final bool? isPatch}) =
|
||||
_$UpdateConfigParamsImpl;
|
||||
|
||||
factory _UpdateConfigParams.fromJson(Map<String, dynamic> json) =
|
||||
_$UpdateConfigParamsImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "profile-path")
|
||||
String? get profilePath;
|
||||
@override
|
||||
ClashConfig get config;
|
||||
@override
|
||||
@JsonKey(name: "is-patch")
|
||||
bool? get isPatch;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$UpdateConfigParamsImplCopyWith<_$UpdateConfigParamsImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
ChangeProxyParams _$ChangeProxyParamsFromJson(Map<String, dynamic> json) {
|
||||
return _ChangeProxyParams.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$ChangeProxyParams {
|
||||
@JsonKey(name: "group-name")
|
||||
String get groupName => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "proxy-name")
|
||||
String get proxyName => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
$ChangeProxyParamsCopyWith<ChangeProxyParams> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ChangeProxyParamsCopyWith<$Res> {
|
||||
factory $ChangeProxyParamsCopyWith(
|
||||
ChangeProxyParams value, $Res Function(ChangeProxyParams) then) =
|
||||
_$ChangeProxyParamsCopyWithImpl<$Res, ChangeProxyParams>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "group-name") String groupName,
|
||||
@JsonKey(name: "proxy-name") String proxyName});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ChangeProxyParamsCopyWithImpl<$Res, $Val extends ChangeProxyParams>
|
||||
implements $ChangeProxyParamsCopyWith<$Res> {
|
||||
_$ChangeProxyParamsCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? groupName = null,
|
||||
Object? proxyName = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
groupName: null == groupName
|
||||
? _value.groupName
|
||||
: groupName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
proxyName: null == proxyName
|
||||
? _value.proxyName
|
||||
: proxyName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ChangeProxyParamsImplCopyWith<$Res>
|
||||
implements $ChangeProxyParamsCopyWith<$Res> {
|
||||
factory _$$ChangeProxyParamsImplCopyWith(_$ChangeProxyParamsImpl value,
|
||||
$Res Function(_$ChangeProxyParamsImpl) then) =
|
||||
__$$ChangeProxyParamsImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "group-name") String groupName,
|
||||
@JsonKey(name: "proxy-name") String proxyName});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ChangeProxyParamsImplCopyWithImpl<$Res>
|
||||
extends _$ChangeProxyParamsCopyWithImpl<$Res, _$ChangeProxyParamsImpl>
|
||||
implements _$$ChangeProxyParamsImplCopyWith<$Res> {
|
||||
__$$ChangeProxyParamsImplCopyWithImpl(_$ChangeProxyParamsImpl _value,
|
||||
$Res Function(_$ChangeProxyParamsImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? groupName = null,
|
||||
Object? proxyName = null,
|
||||
}) {
|
||||
return _then(_$ChangeProxyParamsImpl(
|
||||
groupName: null == groupName
|
||||
? _value.groupName
|
||||
: groupName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
proxyName: null == proxyName
|
||||
? _value.proxyName
|
||||
: proxyName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$ChangeProxyParamsImpl implements _ChangeProxyParams {
|
||||
const _$ChangeProxyParamsImpl(
|
||||
{@JsonKey(name: "group-name") required this.groupName,
|
||||
@JsonKey(name: "proxy-name") required this.proxyName});
|
||||
|
||||
factory _$ChangeProxyParamsImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ChangeProxyParamsImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "group-name")
|
||||
final String groupName;
|
||||
@override
|
||||
@JsonKey(name: "proxy-name")
|
||||
final String proxyName;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ChangeProxyParams(groupName: $groupName, proxyName: $proxyName)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ChangeProxyParamsImpl &&
|
||||
(identical(other.groupName, groupName) ||
|
||||
other.groupName == groupName) &&
|
||||
(identical(other.proxyName, proxyName) ||
|
||||
other.proxyName == proxyName));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, groupName, proxyName);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ChangeProxyParamsImplCopyWith<_$ChangeProxyParamsImpl> get copyWith =>
|
||||
__$$ChangeProxyParamsImplCopyWithImpl<_$ChangeProxyParamsImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$ChangeProxyParamsImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _ChangeProxyParams implements ChangeProxyParams {
|
||||
const factory _ChangeProxyParams(
|
||||
{@JsonKey(name: "group-name") required final String groupName,
|
||||
@JsonKey(name: "proxy-name") required final String proxyName}) =
|
||||
_$ChangeProxyParamsImpl;
|
||||
|
||||
factory _ChangeProxyParams.fromJson(Map<String, dynamic> json) =
|
||||
_$ChangeProxyParamsImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "group-name")
|
||||
String get groupName;
|
||||
@override
|
||||
@JsonKey(name: "proxy-name")
|
||||
String get proxyName;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$ChangeProxyParamsImplCopyWith<_$ChangeProxyParamsImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
Message _$MessageFromJson(Map<String, dynamic> json) {
|
||||
return _Message.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$Message {
|
||||
MessageType get type => throw _privateConstructorUsedError;
|
||||
dynamic get data => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
$MessageCopyWith<Message> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $MessageCopyWith<$Res> {
|
||||
factory $MessageCopyWith(Message value, $Res Function(Message) then) =
|
||||
_$MessageCopyWithImpl<$Res, Message>;
|
||||
@useResult
|
||||
$Res call({MessageType type, dynamic data});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$MessageCopyWithImpl<$Res, $Val extends Message>
|
||||
implements $MessageCopyWith<$Res> {
|
||||
_$MessageCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? type = null,
|
||||
Object? data = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
type: null == type
|
||||
? _value.type
|
||||
: type // ignore: cast_nullable_to_non_nullable
|
||||
as MessageType,
|
||||
data: freezed == data
|
||||
? _value.data
|
||||
: data // ignore: cast_nullable_to_non_nullable
|
||||
as dynamic,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$MessageImplCopyWith<$Res> implements $MessageCopyWith<$Res> {
|
||||
factory _$$MessageImplCopyWith(
|
||||
_$MessageImpl value, $Res Function(_$MessageImpl) then) =
|
||||
__$$MessageImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({MessageType type, dynamic data});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$MessageImplCopyWithImpl<$Res>
|
||||
extends _$MessageCopyWithImpl<$Res, _$MessageImpl>
|
||||
implements _$$MessageImplCopyWith<$Res> {
|
||||
__$$MessageImplCopyWithImpl(
|
||||
_$MessageImpl _value, $Res Function(_$MessageImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? type = null,
|
||||
Object? data = freezed,
|
||||
}) {
|
||||
return _then(_$MessageImpl(
|
||||
type: null == type
|
||||
? _value.type
|
||||
: type // ignore: cast_nullable_to_non_nullable
|
||||
as MessageType,
|
||||
data: freezed == data
|
||||
? _value.data
|
||||
: data // ignore: cast_nullable_to_non_nullable
|
||||
as dynamic,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$MessageImpl implements _Message {
|
||||
const _$MessageImpl({required this.type, this.data});
|
||||
|
||||
factory _$MessageImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$MessageImplFromJson(json);
|
||||
|
||||
@override
|
||||
final MessageType type;
|
||||
@override
|
||||
final dynamic data;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'Message(type: $type, data: $data)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$MessageImpl &&
|
||||
(identical(other.type, type) || other.type == type) &&
|
||||
const DeepCollectionEquality().equals(other.data, data));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, type, const DeepCollectionEquality().hash(data));
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$MessageImplCopyWith<_$MessageImpl> get copyWith =>
|
||||
__$$MessageImplCopyWithImpl<_$MessageImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$MessageImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _Message implements Message {
|
||||
const factory _Message(
|
||||
{required final MessageType type, final dynamic data}) = _$MessageImpl;
|
||||
|
||||
factory _Message.fromJson(Map<String, dynamic> json) = _$MessageImpl.fromJson;
|
||||
|
||||
@override
|
||||
MessageType get type;
|
||||
@override
|
||||
dynamic get data;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$MessageImplCopyWith<_$MessageImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
Delay _$DelayFromJson(Map<String, dynamic> json) {
|
||||
return _Delay.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$Delay {
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
int? get value => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
$DelayCopyWith<Delay> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $DelayCopyWith<$Res> {
|
||||
factory $DelayCopyWith(Delay value, $Res Function(Delay) then) =
|
||||
_$DelayCopyWithImpl<$Res, Delay>;
|
||||
@useResult
|
||||
$Res call({String name, int? value});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$DelayCopyWithImpl<$Res, $Val extends Delay>
|
||||
implements $DelayCopyWith<$Res> {
|
||||
_$DelayCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? name = null,
|
||||
Object? value = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
value: freezed == value
|
||||
? _value.value
|
||||
: value // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DelayImplCopyWith<$Res> implements $DelayCopyWith<$Res> {
|
||||
factory _$$DelayImplCopyWith(
|
||||
_$DelayImpl value, $Res Function(_$DelayImpl) then) =
|
||||
__$$DelayImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String name, int? value});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$DelayImplCopyWithImpl<$Res>
|
||||
extends _$DelayCopyWithImpl<$Res, _$DelayImpl>
|
||||
implements _$$DelayImplCopyWith<$Res> {
|
||||
__$$DelayImplCopyWithImpl(
|
||||
_$DelayImpl _value, $Res Function(_$DelayImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? name = null,
|
||||
Object? value = freezed,
|
||||
}) {
|
||||
return _then(_$DelayImpl(
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
value: freezed == value
|
||||
? _value.value
|
||||
: value // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$DelayImpl implements _Delay {
|
||||
const _$DelayImpl({required this.name, this.value});
|
||||
|
||||
factory _$DelayImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$DelayImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String name;
|
||||
@override
|
||||
final int? value;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'Delay(name: $name, value: $value)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$DelayImpl &&
|
||||
(identical(other.name, name) || other.name == name) &&
|
||||
(identical(other.value, value) || other.value == value));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, name, value);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$DelayImplCopyWith<_$DelayImpl> get copyWith =>
|
||||
__$$DelayImplCopyWithImpl<_$DelayImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$DelayImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _Delay implements Delay {
|
||||
const factory _Delay({required final String name, final int? value}) =
|
||||
_$DelayImpl;
|
||||
|
||||
factory _Delay.fromJson(Map<String, dynamic> json) = _$DelayImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get name;
|
||||
@override
|
||||
int? get value;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$DelayImplCopyWith<_$DelayImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
Process _$ProcessFromJson(Map<String, dynamic> json) {
|
||||
return _Process.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$Process {
|
||||
int get uid => throw _privateConstructorUsedError;
|
||||
String get network => throw _privateConstructorUsedError;
|
||||
String get source => throw _privateConstructorUsedError;
|
||||
String get target => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
$ProcessCopyWith<Process> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ProcessCopyWith<$Res> {
|
||||
factory $ProcessCopyWith(Process value, $Res Function(Process) then) =
|
||||
_$ProcessCopyWithImpl<$Res, Process>;
|
||||
@useResult
|
||||
$Res call({int uid, String network, String source, String target});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ProcessCopyWithImpl<$Res, $Val extends Process>
|
||||
implements $ProcessCopyWith<$Res> {
|
||||
_$ProcessCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? uid = null,
|
||||
Object? network = null,
|
||||
Object? source = null,
|
||||
Object? target = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
uid: null == uid
|
||||
? _value.uid
|
||||
: uid // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
network: null == network
|
||||
? _value.network
|
||||
: network // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
source: null == source
|
||||
? _value.source
|
||||
: source // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
target: null == target
|
||||
? _value.target
|
||||
: target // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ProcessImplCopyWith<$Res> implements $ProcessCopyWith<$Res> {
|
||||
factory _$$ProcessImplCopyWith(
|
||||
_$ProcessImpl value, $Res Function(_$ProcessImpl) then) =
|
||||
__$$ProcessImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({int uid, String network, String source, String target});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ProcessImplCopyWithImpl<$Res>
|
||||
extends _$ProcessCopyWithImpl<$Res, _$ProcessImpl>
|
||||
implements _$$ProcessImplCopyWith<$Res> {
|
||||
__$$ProcessImplCopyWithImpl(
|
||||
_$ProcessImpl _value, $Res Function(_$ProcessImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? uid = null,
|
||||
Object? network = null,
|
||||
Object? source = null,
|
||||
Object? target = null,
|
||||
}) {
|
||||
return _then(_$ProcessImpl(
|
||||
uid: null == uid
|
||||
? _value.uid
|
||||
: uid // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
network: null == network
|
||||
? _value.network
|
||||
: network // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
source: null == source
|
||||
? _value.source
|
||||
: source // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
target: null == target
|
||||
? _value.target
|
||||
: target // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$ProcessImpl implements _Process {
|
||||
const _$ProcessImpl(
|
||||
{required this.uid,
|
||||
required this.network,
|
||||
required this.source,
|
||||
required this.target});
|
||||
|
||||
factory _$ProcessImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ProcessImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int uid;
|
||||
@override
|
||||
final String network;
|
||||
@override
|
||||
final String source;
|
||||
@override
|
||||
final String target;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'Process(uid: $uid, network: $network, source: $source, target: $target)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ProcessImpl &&
|
||||
(identical(other.uid, uid) || other.uid == uid) &&
|
||||
(identical(other.network, network) || other.network == network) &&
|
||||
(identical(other.source, source) || other.source == source) &&
|
||||
(identical(other.target, target) || other.target == target));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, uid, network, source, target);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ProcessImplCopyWith<_$ProcessImpl> get copyWith =>
|
||||
__$$ProcessImplCopyWithImpl<_$ProcessImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$ProcessImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _Process implements Process {
|
||||
const factory _Process(
|
||||
{required final int uid,
|
||||
required final String network,
|
||||
required final String source,
|
||||
required final String target}) = _$ProcessImpl;
|
||||
|
||||
factory _Process.fromJson(Map<String, dynamic> json) = _$ProcessImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get uid;
|
||||
@override
|
||||
String get network;
|
||||
@override
|
||||
String get source;
|
||||
@override
|
||||
String get target;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$ProcessImplCopyWith<_$ProcessImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
83
lib/models/generated/ffi.g.dart
Normal file
83
lib/models/generated/ffi.g.dart
Normal file
@@ -0,0 +1,83 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of '../ffi.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$UpdateConfigParamsImpl _$$UpdateConfigParamsImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$UpdateConfigParamsImpl(
|
||||
profilePath: json['profile-path'] as String?,
|
||||
config: ClashConfig.fromJson(json['config'] as Map<String, dynamic>),
|
||||
isPatch: json['is-patch'] as bool?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$UpdateConfigParamsImplToJson(
|
||||
_$UpdateConfigParamsImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'profile-path': instance.profilePath,
|
||||
'config': instance.config,
|
||||
'is-patch': instance.isPatch,
|
||||
};
|
||||
|
||||
_$ChangeProxyParamsImpl _$$ChangeProxyParamsImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$ChangeProxyParamsImpl(
|
||||
groupName: json['group-name'] as String,
|
||||
proxyName: json['proxy-name'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ChangeProxyParamsImplToJson(
|
||||
_$ChangeProxyParamsImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'group-name': instance.groupName,
|
||||
'proxy-name': instance.proxyName,
|
||||
};
|
||||
|
||||
_$MessageImpl _$$MessageImplFromJson(Map<String, dynamic> json) =>
|
||||
_$MessageImpl(
|
||||
type: $enumDecode(_$MessageTypeEnumMap, json['type']),
|
||||
data: json['data'],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$MessageImplToJson(_$MessageImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'type': _$MessageTypeEnumMap[instance.type]!,
|
||||
'data': instance.data,
|
||||
};
|
||||
|
||||
const _$MessageTypeEnumMap = {
|
||||
MessageType.log: 'log',
|
||||
MessageType.tun: 'tun',
|
||||
MessageType.delay: 'delay',
|
||||
MessageType.process: 'process',
|
||||
};
|
||||
|
||||
_$DelayImpl _$$DelayImplFromJson(Map<String, dynamic> json) => _$DelayImpl(
|
||||
name: json['name'] as String,
|
||||
value: (json['value'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$DelayImplToJson(_$DelayImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'name': instance.name,
|
||||
'value': instance.value,
|
||||
};
|
||||
|
||||
_$ProcessImpl _$$ProcessImplFromJson(Map<String, dynamic> json) =>
|
||||
_$ProcessImpl(
|
||||
uid: (json['uid'] as num).toInt(),
|
||||
network: json['network'] as String,
|
||||
source: json['source'] as String,
|
||||
target: json['target'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ProcessImplToJson(_$ProcessImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'uid': instance.uid,
|
||||
'network': instance.network,
|
||||
'source': instance.source,
|
||||
'target': instance.target,
|
||||
};
|
||||
25
lib/models/generated/log.g.dart
Normal file
25
lib/models/generated/log.g.dart
Normal file
@@ -0,0 +1,25 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of '../log.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
Log _$LogFromJson(Map<String, dynamic> json) => Log(
|
||||
logLevel: $enumDecode(_$LogLevelEnumMap, json['LogLevel']),
|
||||
payload: json['Payload'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$LogToJson(Log instance) => <String, dynamic>{
|
||||
'LogLevel': _$LogLevelEnumMap[instance.logLevel]!,
|
||||
'Payload': instance.payload,
|
||||
};
|
||||
|
||||
const _$LogLevelEnumMap = {
|
||||
LogLevel.debug: 'debug',
|
||||
LogLevel.info: 'info',
|
||||
LogLevel.warning: 'warning',
|
||||
LogLevel.error: 'error',
|
||||
LogLevel.silent: 'silent',
|
||||
};
|
||||
250
lib/models/generated/navigation.freezed.dart
Normal file
250
lib/models/generated/navigation.freezed.dart
Normal file
@@ -0,0 +1,250 @@
|
||||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of '../navigation.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
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 _$NavigationItem {
|
||||
Icon get icon => throw _privateConstructorUsedError;
|
||||
String get label => throw _privateConstructorUsedError;
|
||||
String? get description => throw _privateConstructorUsedError;
|
||||
Widget get fragment => throw _privateConstructorUsedError;
|
||||
String? get path => throw _privateConstructorUsedError;
|
||||
List<NavigationItemMode> get modes => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
$NavigationItemCopyWith<NavigationItem> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $NavigationItemCopyWith<$Res> {
|
||||
factory $NavigationItemCopyWith(
|
||||
NavigationItem value, $Res Function(NavigationItem) then) =
|
||||
_$NavigationItemCopyWithImpl<$Res, NavigationItem>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{Icon icon,
|
||||
String label,
|
||||
String? description,
|
||||
Widget fragment,
|
||||
String? path,
|
||||
List<NavigationItemMode> modes});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$NavigationItemCopyWithImpl<$Res, $Val extends NavigationItem>
|
||||
implements $NavigationItemCopyWith<$Res> {
|
||||
_$NavigationItemCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? icon = null,
|
||||
Object? label = null,
|
||||
Object? description = freezed,
|
||||
Object? fragment = null,
|
||||
Object? path = freezed,
|
||||
Object? modes = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
icon: null == icon
|
||||
? _value.icon
|
||||
: icon // ignore: cast_nullable_to_non_nullable
|
||||
as Icon,
|
||||
label: null == label
|
||||
? _value.label
|
||||
: label // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
description: freezed == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
fragment: null == fragment
|
||||
? _value.fragment
|
||||
: fragment // ignore: cast_nullable_to_non_nullable
|
||||
as Widget,
|
||||
path: freezed == path
|
||||
? _value.path
|
||||
: path // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
modes: null == modes
|
||||
? _value.modes
|
||||
: modes // ignore: cast_nullable_to_non_nullable
|
||||
as List<NavigationItemMode>,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$NavigationItemImplCopyWith<$Res>
|
||||
implements $NavigationItemCopyWith<$Res> {
|
||||
factory _$$NavigationItemImplCopyWith(_$NavigationItemImpl value,
|
||||
$Res Function(_$NavigationItemImpl) then) =
|
||||
__$$NavigationItemImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{Icon icon,
|
||||
String label,
|
||||
String? description,
|
||||
Widget fragment,
|
||||
String? path,
|
||||
List<NavigationItemMode> modes});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$NavigationItemImplCopyWithImpl<$Res>
|
||||
extends _$NavigationItemCopyWithImpl<$Res, _$NavigationItemImpl>
|
||||
implements _$$NavigationItemImplCopyWith<$Res> {
|
||||
__$$NavigationItemImplCopyWithImpl(
|
||||
_$NavigationItemImpl _value, $Res Function(_$NavigationItemImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? icon = null,
|
||||
Object? label = null,
|
||||
Object? description = freezed,
|
||||
Object? fragment = null,
|
||||
Object? path = freezed,
|
||||
Object? modes = null,
|
||||
}) {
|
||||
return _then(_$NavigationItemImpl(
|
||||
icon: null == icon
|
||||
? _value.icon
|
||||
: icon // ignore: cast_nullable_to_non_nullable
|
||||
as Icon,
|
||||
label: null == label
|
||||
? _value.label
|
||||
: label // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
description: freezed == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
fragment: null == fragment
|
||||
? _value.fragment
|
||||
: fragment // ignore: cast_nullable_to_non_nullable
|
||||
as Widget,
|
||||
path: freezed == path
|
||||
? _value.path
|
||||
: path // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
modes: null == modes
|
||||
? _value._modes
|
||||
: modes // ignore: cast_nullable_to_non_nullable
|
||||
as List<NavigationItemMode>,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$NavigationItemImpl implements _NavigationItem {
|
||||
const _$NavigationItemImpl(
|
||||
{required this.icon,
|
||||
required this.label,
|
||||
this.description,
|
||||
required this.fragment,
|
||||
this.path,
|
||||
final List<NavigationItemMode> modes = const [
|
||||
NavigationItemMode.mobile,
|
||||
NavigationItemMode.desktop
|
||||
]})
|
||||
: _modes = modes;
|
||||
|
||||
@override
|
||||
final Icon icon;
|
||||
@override
|
||||
final String label;
|
||||
@override
|
||||
final String? description;
|
||||
@override
|
||||
final Widget fragment;
|
||||
@override
|
||||
final String? path;
|
||||
final List<NavigationItemMode> _modes;
|
||||
@override
|
||||
@JsonKey()
|
||||
List<NavigationItemMode> get modes {
|
||||
if (_modes is EqualUnmodifiableListView) return _modes;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_modes);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'NavigationItem(icon: $icon, label: $label, description: $description, fragment: $fragment, path: $path, modes: $modes)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$NavigationItemImpl &&
|
||||
(identical(other.icon, icon) || other.icon == icon) &&
|
||||
(identical(other.label, label) || other.label == label) &&
|
||||
(identical(other.description, description) ||
|
||||
other.description == description) &&
|
||||
(identical(other.fragment, fragment) ||
|
||||
other.fragment == fragment) &&
|
||||
(identical(other.path, path) || other.path == path) &&
|
||||
const DeepCollectionEquality().equals(other._modes, _modes));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, icon, label, description,
|
||||
fragment, path, const DeepCollectionEquality().hash(_modes));
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$NavigationItemImplCopyWith<_$NavigationItemImpl> get copyWith =>
|
||||
__$$NavigationItemImplCopyWithImpl<_$NavigationItemImpl>(
|
||||
this, _$identity);
|
||||
}
|
||||
|
||||
abstract class _NavigationItem implements NavigationItem {
|
||||
const factory _NavigationItem(
|
||||
{required final Icon icon,
|
||||
required final String label,
|
||||
final String? description,
|
||||
required final Widget fragment,
|
||||
final String? path,
|
||||
final List<NavigationItemMode> modes}) = _$NavigationItemImpl;
|
||||
|
||||
@override
|
||||
Icon get icon;
|
||||
@override
|
||||
String get label;
|
||||
@override
|
||||
String? get description;
|
||||
@override
|
||||
Widget get fragment;
|
||||
@override
|
||||
String? get path;
|
||||
@override
|
||||
List<NavigationItemMode> get modes;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$NavigationItemImplCopyWith<_$NavigationItemImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
185
lib/models/generated/package.freezed.dart
Normal file
185
lib/models/generated/package.freezed.dart
Normal file
@@ -0,0 +1,185 @@
|
||||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of '../package.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
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');
|
||||
|
||||
Package _$PackageFromJson(Map<String, dynamic> json) {
|
||||
return _Package.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$Package {
|
||||
String get packageName => throw _privateConstructorUsedError;
|
||||
String get label => throw _privateConstructorUsedError;
|
||||
bool get isSystem => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
$PackageCopyWith<Package> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $PackageCopyWith<$Res> {
|
||||
factory $PackageCopyWith(Package value, $Res Function(Package) then) =
|
||||
_$PackageCopyWithImpl<$Res, Package>;
|
||||
@useResult
|
||||
$Res call({String packageName, String label, bool isSystem});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$PackageCopyWithImpl<$Res, $Val extends Package>
|
||||
implements $PackageCopyWith<$Res> {
|
||||
_$PackageCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? packageName = null,
|
||||
Object? label = null,
|
||||
Object? isSystem = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
packageName: null == packageName
|
||||
? _value.packageName
|
||||
: packageName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
label: null == label
|
||||
? _value.label
|
||||
: label // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
isSystem: null == isSystem
|
||||
? _value.isSystem
|
||||
: isSystem // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$PackageImplCopyWith<$Res> implements $PackageCopyWith<$Res> {
|
||||
factory _$$PackageImplCopyWith(
|
||||
_$PackageImpl value, $Res Function(_$PackageImpl) then) =
|
||||
__$$PackageImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String packageName, String label, bool isSystem});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$PackageImplCopyWithImpl<$Res>
|
||||
extends _$PackageCopyWithImpl<$Res, _$PackageImpl>
|
||||
implements _$$PackageImplCopyWith<$Res> {
|
||||
__$$PackageImplCopyWithImpl(
|
||||
_$PackageImpl _value, $Res Function(_$PackageImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? packageName = null,
|
||||
Object? label = null,
|
||||
Object? isSystem = null,
|
||||
}) {
|
||||
return _then(_$PackageImpl(
|
||||
packageName: null == packageName
|
||||
? _value.packageName
|
||||
: packageName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
label: null == label
|
||||
? _value.label
|
||||
: label // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
isSystem: null == isSystem
|
||||
? _value.isSystem
|
||||
: isSystem // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$PackageImpl implements _Package {
|
||||
const _$PackageImpl(
|
||||
{required this.packageName, required this.label, required this.isSystem});
|
||||
|
||||
factory _$PackageImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$PackageImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String packageName;
|
||||
@override
|
||||
final String label;
|
||||
@override
|
||||
final bool isSystem;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'Package(packageName: $packageName, label: $label, isSystem: $isSystem)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$PackageImpl &&
|
||||
(identical(other.packageName, packageName) ||
|
||||
other.packageName == packageName) &&
|
||||
(identical(other.label, label) || other.label == label) &&
|
||||
(identical(other.isSystem, isSystem) ||
|
||||
other.isSystem == isSystem));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, packageName, label, isSystem);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$PackageImplCopyWith<_$PackageImpl> get copyWith =>
|
||||
__$$PackageImplCopyWithImpl<_$PackageImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$PackageImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _Package implements Package {
|
||||
const factory _Package(
|
||||
{required final String packageName,
|
||||
required final String label,
|
||||
required final bool isSystem}) = _$PackageImpl;
|
||||
|
||||
factory _Package.fromJson(Map<String, dynamic> json) = _$PackageImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get packageName;
|
||||
@override
|
||||
String get label;
|
||||
@override
|
||||
bool get isSystem;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$PackageImplCopyWith<_$PackageImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
21
lib/models/generated/package.g.dart
Normal file
21
lib/models/generated/package.g.dart
Normal file
@@ -0,0 +1,21 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of '../package.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$PackageImpl _$$PackageImplFromJson(Map<String, dynamic> json) =>
|
||||
_$PackageImpl(
|
||||
packageName: json['packageName'] as String,
|
||||
label: json['label'] as String,
|
||||
isSystem: json['isSystem'] as bool,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$PackageImplToJson(_$PackageImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'packageName': instance.packageName,
|
||||
'label': instance.label,
|
||||
'isSystem': instance.isSystem,
|
||||
};
|
||||
51
lib/models/generated/profile.g.dart
Normal file
51
lib/models/generated/profile.g.dart
Normal file
@@ -0,0 +1,51 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of '../profile.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
UserInfo _$UserInfoFromJson(Map<String, dynamic> json) => UserInfo(
|
||||
upload: (json['upload'] as num?)?.toInt(),
|
||||
download: (json['download'] as num?)?.toInt(),
|
||||
total: (json['total'] as num?)?.toInt(),
|
||||
expire: (json['expire'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$UserInfoToJson(UserInfo instance) => <String, dynamic>{
|
||||
'upload': instance.upload,
|
||||
'download': instance.download,
|
||||
'total': instance.total,
|
||||
'expire': instance.expire,
|
||||
};
|
||||
|
||||
Profile _$ProfileFromJson(Map<String, dynamic> json) => Profile(
|
||||
id: json['id'] as String?,
|
||||
label: json['label'] as String?,
|
||||
url: json['url'] as String?,
|
||||
userInfo: json['userInfo'] == null
|
||||
? null
|
||||
: UserInfo.fromJson(json['userInfo'] as Map<String, dynamic>),
|
||||
groupName: json['groupName'] as String?,
|
||||
proxyName: json['proxyName'] as String?,
|
||||
lastUpdateDate: json['lastUpdateDate'] == null
|
||||
? null
|
||||
: DateTime.parse(json['lastUpdateDate'] as String),
|
||||
autoUpdateDuration: json['autoUpdateDuration'] == null
|
||||
? null
|
||||
: Duration(microseconds: (json['autoUpdateDuration'] as num).toInt()),
|
||||
autoUpdate: json['autoUpdate'] as bool? ?? true,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ProfileToJson(Profile instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'label': instance.label,
|
||||
'groupName': instance.groupName,
|
||||
'proxyName': instance.proxyName,
|
||||
'url': instance.url,
|
||||
'lastUpdateDate': instance.lastUpdateDate?.toIso8601String(),
|
||||
'autoUpdateDuration': instance.autoUpdateDuration.inMicroseconds,
|
||||
'userInfo': instance.userInfo,
|
||||
'autoUpdate': instance.autoUpdate,
|
||||
};
|
||||
362
lib/models/generated/proxy.freezed.dart
Normal file
362
lib/models/generated/proxy.freezed.dart
Normal file
@@ -0,0 +1,362 @@
|
||||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of '../proxy.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
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');
|
||||
|
||||
Group _$GroupFromJson(Map<String, dynamic> json) {
|
||||
return _Group.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$Group {
|
||||
GroupType get type => throw _privateConstructorUsedError;
|
||||
List<Proxy> get all => throw _privateConstructorUsedError;
|
||||
String? get now => throw _privateConstructorUsedError;
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
$GroupCopyWith<Group> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $GroupCopyWith<$Res> {
|
||||
factory $GroupCopyWith(Group value, $Res Function(Group) then) =
|
||||
_$GroupCopyWithImpl<$Res, Group>;
|
||||
@useResult
|
||||
$Res call({GroupType type, List<Proxy> all, String? now, String name});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$GroupCopyWithImpl<$Res, $Val extends Group>
|
||||
implements $GroupCopyWith<$Res> {
|
||||
_$GroupCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? type = null,
|
||||
Object? all = null,
|
||||
Object? now = freezed,
|
||||
Object? name = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
type: null == type
|
||||
? _value.type
|
||||
: type // ignore: cast_nullable_to_non_nullable
|
||||
as GroupType,
|
||||
all: null == all
|
||||
? _value.all
|
||||
: all // ignore: cast_nullable_to_non_nullable
|
||||
as List<Proxy>,
|
||||
now: freezed == now
|
||||
? _value.now
|
||||
: now // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$GroupImplCopyWith<$Res> implements $GroupCopyWith<$Res> {
|
||||
factory _$$GroupImplCopyWith(
|
||||
_$GroupImpl value, $Res Function(_$GroupImpl) then) =
|
||||
__$$GroupImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({GroupType type, List<Proxy> all, String? now, String name});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$GroupImplCopyWithImpl<$Res>
|
||||
extends _$GroupCopyWithImpl<$Res, _$GroupImpl>
|
||||
implements _$$GroupImplCopyWith<$Res> {
|
||||
__$$GroupImplCopyWithImpl(
|
||||
_$GroupImpl _value, $Res Function(_$GroupImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? type = null,
|
||||
Object? all = null,
|
||||
Object? now = freezed,
|
||||
Object? name = null,
|
||||
}) {
|
||||
return _then(_$GroupImpl(
|
||||
type: null == type
|
||||
? _value.type
|
||||
: type // ignore: cast_nullable_to_non_nullable
|
||||
as GroupType,
|
||||
all: null == all
|
||||
? _value._all
|
||||
: all // ignore: cast_nullable_to_non_nullable
|
||||
as List<Proxy>,
|
||||
now: freezed == now
|
||||
? _value.now
|
||||
: now // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$GroupImpl implements _Group {
|
||||
const _$GroupImpl(
|
||||
{required this.type,
|
||||
final List<Proxy> all = const [],
|
||||
this.now,
|
||||
required this.name})
|
||||
: _all = all;
|
||||
|
||||
factory _$GroupImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$GroupImplFromJson(json);
|
||||
|
||||
@override
|
||||
final GroupType type;
|
||||
final List<Proxy> _all;
|
||||
@override
|
||||
@JsonKey()
|
||||
List<Proxy> get all {
|
||||
if (_all is EqualUnmodifiableListView) return _all;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_all);
|
||||
}
|
||||
|
||||
@override
|
||||
final String? now;
|
||||
@override
|
||||
final String name;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'Group(type: $type, all: $all, now: $now, name: $name)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$GroupImpl &&
|
||||
(identical(other.type, type) || other.type == type) &&
|
||||
const DeepCollectionEquality().equals(other._all, _all) &&
|
||||
(identical(other.now, now) || other.now == now) &&
|
||||
(identical(other.name, name) || other.name == name));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, type, const DeepCollectionEquality().hash(_all), now, name);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$GroupImplCopyWith<_$GroupImpl> get copyWith =>
|
||||
__$$GroupImplCopyWithImpl<_$GroupImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$GroupImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _Group implements Group {
|
||||
const factory _Group(
|
||||
{required final GroupType type,
|
||||
final List<Proxy> all,
|
||||
final String? now,
|
||||
required final String name}) = _$GroupImpl;
|
||||
|
||||
factory _Group.fromJson(Map<String, dynamic> json) = _$GroupImpl.fromJson;
|
||||
|
||||
@override
|
||||
GroupType get type;
|
||||
@override
|
||||
List<Proxy> get all;
|
||||
@override
|
||||
String? get now;
|
||||
@override
|
||||
String get name;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$GroupImplCopyWith<_$GroupImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
Proxy _$ProxyFromJson(Map<String, dynamic> json) {
|
||||
return _Proxy.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$Proxy {
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
String get type => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
$ProxyCopyWith<Proxy> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ProxyCopyWith<$Res> {
|
||||
factory $ProxyCopyWith(Proxy value, $Res Function(Proxy) then) =
|
||||
_$ProxyCopyWithImpl<$Res, Proxy>;
|
||||
@useResult
|
||||
$Res call({String name, String type});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ProxyCopyWithImpl<$Res, $Val extends Proxy>
|
||||
implements $ProxyCopyWith<$Res> {
|
||||
_$ProxyCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? name = null,
|
||||
Object? type = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
type: null == type
|
||||
? _value.type
|
||||
: type // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ProxyImplCopyWith<$Res> implements $ProxyCopyWith<$Res> {
|
||||
factory _$$ProxyImplCopyWith(
|
||||
_$ProxyImpl value, $Res Function(_$ProxyImpl) then) =
|
||||
__$$ProxyImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String name, String type});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ProxyImplCopyWithImpl<$Res>
|
||||
extends _$ProxyCopyWithImpl<$Res, _$ProxyImpl>
|
||||
implements _$$ProxyImplCopyWith<$Res> {
|
||||
__$$ProxyImplCopyWithImpl(
|
||||
_$ProxyImpl _value, $Res Function(_$ProxyImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? name = null,
|
||||
Object? type = null,
|
||||
}) {
|
||||
return _then(_$ProxyImpl(
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
type: null == type
|
||||
? _value.type
|
||||
: type // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$ProxyImpl implements _Proxy {
|
||||
const _$ProxyImpl({this.name = "", this.type = ""});
|
||||
|
||||
factory _$ProxyImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ProxyImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey()
|
||||
final String name;
|
||||
@override
|
||||
@JsonKey()
|
||||
final String type;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'Proxy(name: $name, type: $type)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ProxyImpl &&
|
||||
(identical(other.name, name) || other.name == name) &&
|
||||
(identical(other.type, type) || other.type == type));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, name, type);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ProxyImplCopyWith<_$ProxyImpl> get copyWith =>
|
||||
__$$ProxyImplCopyWithImpl<_$ProxyImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$ProxyImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _Proxy implements Proxy {
|
||||
const factory _Proxy({final String name, final String type}) = _$ProxyImpl;
|
||||
|
||||
factory _Proxy.fromJson(Map<String, dynamic> json) = _$ProxyImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get name;
|
||||
@override
|
||||
String get type;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$ProxyImplCopyWith<_$ProxyImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
42
lib/models/generated/proxy.g.dart
Normal file
42
lib/models/generated/proxy.g.dart
Normal file
@@ -0,0 +1,42 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of '../proxy.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$GroupImpl _$$GroupImplFromJson(Map<String, dynamic> json) => _$GroupImpl(
|
||||
type: $enumDecode(_$GroupTypeEnumMap, json['type']),
|
||||
all: (json['all'] as List<dynamic>?)
|
||||
?.map((e) => Proxy.fromJson(e as Map<String, dynamic>))
|
||||
.toList() ??
|
||||
const [],
|
||||
now: json['now'] as String?,
|
||||
name: json['name'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$GroupImplToJson(_$GroupImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'type': _$GroupTypeEnumMap[instance.type]!,
|
||||
'all': instance.all,
|
||||
'now': instance.now,
|
||||
'name': instance.name,
|
||||
};
|
||||
|
||||
const _$GroupTypeEnumMap = {
|
||||
GroupType.Selector: 'Selector',
|
||||
GroupType.URLTest: 'URLTest',
|
||||
GroupType.Fallback: 'Fallback',
|
||||
};
|
||||
|
||||
_$ProxyImpl _$$ProxyImplFromJson(Map<String, dynamic> json) => _$ProxyImpl(
|
||||
name: json['name'] as String? ?? "",
|
||||
type: json['type'] as String? ?? "",
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ProxyImplToJson(_$ProxyImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'name': instance.name,
|
||||
'type': instance.type,
|
||||
};
|
||||
1742
lib/models/generated/selector.freezed.dart
Normal file
1742
lib/models/generated/selector.freezed.dart
Normal file
File diff suppressed because it is too large
Load Diff
171
lib/models/generated/version.freezed.dart
Normal file
171
lib/models/generated/version.freezed.dart
Normal file
@@ -0,0 +1,171 @@
|
||||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of '../version.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
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');
|
||||
|
||||
VersionInfo _$VersionInfoFromJson(Map<String, dynamic> json) {
|
||||
return _VersionInfo.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$VersionInfo {
|
||||
String get clashName => throw _privateConstructorUsedError;
|
||||
String get version => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
$VersionInfoCopyWith<VersionInfo> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $VersionInfoCopyWith<$Res> {
|
||||
factory $VersionInfoCopyWith(
|
||||
VersionInfo value, $Res Function(VersionInfo) then) =
|
||||
_$VersionInfoCopyWithImpl<$Res, VersionInfo>;
|
||||
@useResult
|
||||
$Res call({String clashName, String version});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$VersionInfoCopyWithImpl<$Res, $Val extends VersionInfo>
|
||||
implements $VersionInfoCopyWith<$Res> {
|
||||
_$VersionInfoCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? clashName = null,
|
||||
Object? version = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
clashName: null == clashName
|
||||
? _value.clashName
|
||||
: clashName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
version: null == version
|
||||
? _value.version
|
||||
: version // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$VersionInfoImplCopyWith<$Res>
|
||||
implements $VersionInfoCopyWith<$Res> {
|
||||
factory _$$VersionInfoImplCopyWith(
|
||||
_$VersionInfoImpl value, $Res Function(_$VersionInfoImpl) then) =
|
||||
__$$VersionInfoImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String clashName, String version});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$VersionInfoImplCopyWithImpl<$Res>
|
||||
extends _$VersionInfoCopyWithImpl<$Res, _$VersionInfoImpl>
|
||||
implements _$$VersionInfoImplCopyWith<$Res> {
|
||||
__$$VersionInfoImplCopyWithImpl(
|
||||
_$VersionInfoImpl _value, $Res Function(_$VersionInfoImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? clashName = null,
|
||||
Object? version = null,
|
||||
}) {
|
||||
return _then(_$VersionInfoImpl(
|
||||
clashName: null == clashName
|
||||
? _value.clashName
|
||||
: clashName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
version: null == version
|
||||
? _value.version
|
||||
: version // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$VersionInfoImpl implements _VersionInfo {
|
||||
const _$VersionInfoImpl({this.clashName = "", this.version = ""});
|
||||
|
||||
factory _$VersionInfoImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$VersionInfoImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey()
|
||||
final String clashName;
|
||||
@override
|
||||
@JsonKey()
|
||||
final String version;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'VersionInfo(clashName: $clashName, version: $version)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$VersionInfoImpl &&
|
||||
(identical(other.clashName, clashName) ||
|
||||
other.clashName == clashName) &&
|
||||
(identical(other.version, version) || other.version == version));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, clashName, version);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$VersionInfoImplCopyWith<_$VersionInfoImpl> get copyWith =>
|
||||
__$$VersionInfoImplCopyWithImpl<_$VersionInfoImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$VersionInfoImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _VersionInfo implements VersionInfo {
|
||||
const factory _VersionInfo({final String clashName, final String version}) =
|
||||
_$VersionInfoImpl;
|
||||
|
||||
factory _VersionInfo.fromJson(Map<String, dynamic> json) =
|
||||
_$VersionInfoImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get clashName;
|
||||
@override
|
||||
String get version;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$VersionInfoImplCopyWith<_$VersionInfoImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
19
lib/models/generated/version.g.dart
Normal file
19
lib/models/generated/version.g.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of '../version.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$VersionInfoImpl _$$VersionInfoImplFromJson(Map<String, dynamic> json) =>
|
||||
_$VersionInfoImpl(
|
||||
clashName: json['clashName'] as String? ?? "",
|
||||
version: json['version'] as String? ?? "",
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$VersionInfoImplToJson(_$VersionInfoImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'clashName': instance.clashName,
|
||||
'version': instance.version,
|
||||
};
|
||||
Reference in New Issue
Block a user