Optimize performance
Update core Optimize core stability Fix linux tun authority check error Fix some issues
This commit is contained in:
567
lib/models/generated/app.freezed.dart
Normal file
567
lib/models/generated/app.freezed.dart
Normal file
@@ -0,0 +1,567 @@
|
||||
// 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 '../app.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 _$AppState {
|
||||
bool get isInit => throw _privateConstructorUsedError;
|
||||
PageLabel get pageLabel => throw _privateConstructorUsedError;
|
||||
List<Package> get packages => throw _privateConstructorUsedError;
|
||||
ColorSchemes get colorSchemes => throw _privateConstructorUsedError;
|
||||
int get sortNum => throw _privateConstructorUsedError;
|
||||
double get viewWidth => throw _privateConstructorUsedError;
|
||||
Map<String, Map<String, int?>> get delayMap =>
|
||||
throw _privateConstructorUsedError;
|
||||
List<Group> get groups => throw _privateConstructorUsedError;
|
||||
int get checkIpNum => throw _privateConstructorUsedError;
|
||||
Brightness? get brightness => throw _privateConstructorUsedError;
|
||||
int? get runTime => throw _privateConstructorUsedError;
|
||||
List<ExternalProvider> get providers => throw _privateConstructorUsedError;
|
||||
String? get localIp => throw _privateConstructorUsedError;
|
||||
FixedList<Connection> get requests => throw _privateConstructorUsedError;
|
||||
int get version => throw _privateConstructorUsedError;
|
||||
FixedList<Log> get logs => throw _privateConstructorUsedError;
|
||||
FixedList<Traffic> get traffics => throw _privateConstructorUsedError;
|
||||
Traffic get totalTraffic => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of AppState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$AppStateCopyWith<AppState> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $AppStateCopyWith<$Res> {
|
||||
factory $AppStateCopyWith(AppState value, $Res Function(AppState) then) =
|
||||
_$AppStateCopyWithImpl<$Res, AppState>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{bool isInit,
|
||||
PageLabel pageLabel,
|
||||
List<Package> packages,
|
||||
ColorSchemes colorSchemes,
|
||||
int sortNum,
|
||||
double viewWidth,
|
||||
Map<String, Map<String, int?>> delayMap,
|
||||
List<Group> groups,
|
||||
int checkIpNum,
|
||||
Brightness? brightness,
|
||||
int? runTime,
|
||||
List<ExternalProvider> providers,
|
||||
String? localIp,
|
||||
FixedList<Connection> requests,
|
||||
int version,
|
||||
FixedList<Log> logs,
|
||||
FixedList<Traffic> traffics,
|
||||
Traffic totalTraffic});
|
||||
|
||||
$ColorSchemesCopyWith<$Res> get colorSchemes;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$AppStateCopyWithImpl<$Res, $Val extends AppState>
|
||||
implements $AppStateCopyWith<$Res> {
|
||||
_$AppStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of AppState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? isInit = null,
|
||||
Object? pageLabel = null,
|
||||
Object? packages = null,
|
||||
Object? colorSchemes = null,
|
||||
Object? sortNum = null,
|
||||
Object? viewWidth = null,
|
||||
Object? delayMap = null,
|
||||
Object? groups = null,
|
||||
Object? checkIpNum = null,
|
||||
Object? brightness = freezed,
|
||||
Object? runTime = freezed,
|
||||
Object? providers = null,
|
||||
Object? localIp = freezed,
|
||||
Object? requests = null,
|
||||
Object? version = null,
|
||||
Object? logs = null,
|
||||
Object? traffics = null,
|
||||
Object? totalTraffic = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
isInit: null == isInit
|
||||
? _value.isInit
|
||||
: isInit // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
pageLabel: null == pageLabel
|
||||
? _value.pageLabel
|
||||
: pageLabel // ignore: cast_nullable_to_non_nullable
|
||||
as PageLabel,
|
||||
packages: null == packages
|
||||
? _value.packages
|
||||
: packages // ignore: cast_nullable_to_non_nullable
|
||||
as List<Package>,
|
||||
colorSchemes: null == colorSchemes
|
||||
? _value.colorSchemes
|
||||
: colorSchemes // ignore: cast_nullable_to_non_nullable
|
||||
as ColorSchemes,
|
||||
sortNum: null == sortNum
|
||||
? _value.sortNum
|
||||
: sortNum // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
viewWidth: null == viewWidth
|
||||
? _value.viewWidth
|
||||
: viewWidth // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
delayMap: null == delayMap
|
||||
? _value.delayMap
|
||||
: delayMap // ignore: cast_nullable_to_non_nullable
|
||||
as Map<String, Map<String, int?>>,
|
||||
groups: null == groups
|
||||
? _value.groups
|
||||
: groups // ignore: cast_nullable_to_non_nullable
|
||||
as List<Group>,
|
||||
checkIpNum: null == checkIpNum
|
||||
? _value.checkIpNum
|
||||
: checkIpNum // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
brightness: freezed == brightness
|
||||
? _value.brightness
|
||||
: brightness // ignore: cast_nullable_to_non_nullable
|
||||
as Brightness?,
|
||||
runTime: freezed == runTime
|
||||
? _value.runTime
|
||||
: runTime // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
providers: null == providers
|
||||
? _value.providers
|
||||
: providers // ignore: cast_nullable_to_non_nullable
|
||||
as List<ExternalProvider>,
|
||||
localIp: freezed == localIp
|
||||
? _value.localIp
|
||||
: localIp // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
requests: null == requests
|
||||
? _value.requests
|
||||
: requests // ignore: cast_nullable_to_non_nullable
|
||||
as FixedList<Connection>,
|
||||
version: null == version
|
||||
? _value.version
|
||||
: version // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
logs: null == logs
|
||||
? _value.logs
|
||||
: logs // ignore: cast_nullable_to_non_nullable
|
||||
as FixedList<Log>,
|
||||
traffics: null == traffics
|
||||
? _value.traffics
|
||||
: traffics // ignore: cast_nullable_to_non_nullable
|
||||
as FixedList<Traffic>,
|
||||
totalTraffic: null == totalTraffic
|
||||
? _value.totalTraffic
|
||||
: totalTraffic // ignore: cast_nullable_to_non_nullable
|
||||
as Traffic,
|
||||
) as $Val);
|
||||
}
|
||||
|
||||
/// Create a copy of AppState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$ColorSchemesCopyWith<$Res> get colorSchemes {
|
||||
return $ColorSchemesCopyWith<$Res>(_value.colorSchemes, (value) {
|
||||
return _then(_value.copyWith(colorSchemes: value) as $Val);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$AppStateImplCopyWith<$Res>
|
||||
implements $AppStateCopyWith<$Res> {
|
||||
factory _$$AppStateImplCopyWith(
|
||||
_$AppStateImpl value, $Res Function(_$AppStateImpl) then) =
|
||||
__$$AppStateImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{bool isInit,
|
||||
PageLabel pageLabel,
|
||||
List<Package> packages,
|
||||
ColorSchemes colorSchemes,
|
||||
int sortNum,
|
||||
double viewWidth,
|
||||
Map<String, Map<String, int?>> delayMap,
|
||||
List<Group> groups,
|
||||
int checkIpNum,
|
||||
Brightness? brightness,
|
||||
int? runTime,
|
||||
List<ExternalProvider> providers,
|
||||
String? localIp,
|
||||
FixedList<Connection> requests,
|
||||
int version,
|
||||
FixedList<Log> logs,
|
||||
FixedList<Traffic> traffics,
|
||||
Traffic totalTraffic});
|
||||
|
||||
@override
|
||||
$ColorSchemesCopyWith<$Res> get colorSchemes;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$AppStateImplCopyWithImpl<$Res>
|
||||
extends _$AppStateCopyWithImpl<$Res, _$AppStateImpl>
|
||||
implements _$$AppStateImplCopyWith<$Res> {
|
||||
__$$AppStateImplCopyWithImpl(
|
||||
_$AppStateImpl _value, $Res Function(_$AppStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of AppState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? isInit = null,
|
||||
Object? pageLabel = null,
|
||||
Object? packages = null,
|
||||
Object? colorSchemes = null,
|
||||
Object? sortNum = null,
|
||||
Object? viewWidth = null,
|
||||
Object? delayMap = null,
|
||||
Object? groups = null,
|
||||
Object? checkIpNum = null,
|
||||
Object? brightness = freezed,
|
||||
Object? runTime = freezed,
|
||||
Object? providers = null,
|
||||
Object? localIp = freezed,
|
||||
Object? requests = null,
|
||||
Object? version = null,
|
||||
Object? logs = null,
|
||||
Object? traffics = null,
|
||||
Object? totalTraffic = null,
|
||||
}) {
|
||||
return _then(_$AppStateImpl(
|
||||
isInit: null == isInit
|
||||
? _value.isInit
|
||||
: isInit // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
pageLabel: null == pageLabel
|
||||
? _value.pageLabel
|
||||
: pageLabel // ignore: cast_nullable_to_non_nullable
|
||||
as PageLabel,
|
||||
packages: null == packages
|
||||
? _value._packages
|
||||
: packages // ignore: cast_nullable_to_non_nullable
|
||||
as List<Package>,
|
||||
colorSchemes: null == colorSchemes
|
||||
? _value.colorSchemes
|
||||
: colorSchemes // ignore: cast_nullable_to_non_nullable
|
||||
as ColorSchemes,
|
||||
sortNum: null == sortNum
|
||||
? _value.sortNum
|
||||
: sortNum // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
viewWidth: null == viewWidth
|
||||
? _value.viewWidth
|
||||
: viewWidth // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
delayMap: null == delayMap
|
||||
? _value._delayMap
|
||||
: delayMap // ignore: cast_nullable_to_non_nullable
|
||||
as Map<String, Map<String, int?>>,
|
||||
groups: null == groups
|
||||
? _value._groups
|
||||
: groups // ignore: cast_nullable_to_non_nullable
|
||||
as List<Group>,
|
||||
checkIpNum: null == checkIpNum
|
||||
? _value.checkIpNum
|
||||
: checkIpNum // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
brightness: freezed == brightness
|
||||
? _value.brightness
|
||||
: brightness // ignore: cast_nullable_to_non_nullable
|
||||
as Brightness?,
|
||||
runTime: freezed == runTime
|
||||
? _value.runTime
|
||||
: runTime // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
providers: null == providers
|
||||
? _value._providers
|
||||
: providers // ignore: cast_nullable_to_non_nullable
|
||||
as List<ExternalProvider>,
|
||||
localIp: freezed == localIp
|
||||
? _value.localIp
|
||||
: localIp // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
requests: null == requests
|
||||
? _value.requests
|
||||
: requests // ignore: cast_nullable_to_non_nullable
|
||||
as FixedList<Connection>,
|
||||
version: null == version
|
||||
? _value.version
|
||||
: version // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
logs: null == logs
|
||||
? _value.logs
|
||||
: logs // ignore: cast_nullable_to_non_nullable
|
||||
as FixedList<Log>,
|
||||
traffics: null == traffics
|
||||
? _value.traffics
|
||||
: traffics // ignore: cast_nullable_to_non_nullable
|
||||
as FixedList<Traffic>,
|
||||
totalTraffic: null == totalTraffic
|
||||
? _value.totalTraffic
|
||||
: totalTraffic // ignore: cast_nullable_to_non_nullable
|
||||
as Traffic,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$AppStateImpl implements _AppState {
|
||||
const _$AppStateImpl(
|
||||
{this.isInit = false,
|
||||
this.pageLabel = PageLabel.dashboard,
|
||||
final List<Package> packages = const [],
|
||||
this.colorSchemes = const ColorSchemes(),
|
||||
this.sortNum = 0,
|
||||
required this.viewWidth,
|
||||
final Map<String, Map<String, int?>> delayMap = const {},
|
||||
final List<Group> groups = const [],
|
||||
this.checkIpNum = 0,
|
||||
this.brightness,
|
||||
this.runTime,
|
||||
final List<ExternalProvider> providers = const [],
|
||||
this.localIp,
|
||||
required this.requests,
|
||||
required this.version,
|
||||
required this.logs,
|
||||
required this.traffics,
|
||||
required this.totalTraffic})
|
||||
: _packages = packages,
|
||||
_delayMap = delayMap,
|
||||
_groups = groups,
|
||||
_providers = providers;
|
||||
|
||||
@override
|
||||
@JsonKey()
|
||||
final bool isInit;
|
||||
@override
|
||||
@JsonKey()
|
||||
final PageLabel pageLabel;
|
||||
final List<Package> _packages;
|
||||
@override
|
||||
@JsonKey()
|
||||
List<Package> get packages {
|
||||
if (_packages is EqualUnmodifiableListView) return _packages;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_packages);
|
||||
}
|
||||
|
||||
@override
|
||||
@JsonKey()
|
||||
final ColorSchemes colorSchemes;
|
||||
@override
|
||||
@JsonKey()
|
||||
final int sortNum;
|
||||
@override
|
||||
final double viewWidth;
|
||||
final Map<String, Map<String, int?>> _delayMap;
|
||||
@override
|
||||
@JsonKey()
|
||||
Map<String, Map<String, int?>> get delayMap {
|
||||
if (_delayMap is EqualUnmodifiableMapView) return _delayMap;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableMapView(_delayMap);
|
||||
}
|
||||
|
||||
final List<Group> _groups;
|
||||
@override
|
||||
@JsonKey()
|
||||
List<Group> get groups {
|
||||
if (_groups is EqualUnmodifiableListView) return _groups;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_groups);
|
||||
}
|
||||
|
||||
@override
|
||||
@JsonKey()
|
||||
final int checkIpNum;
|
||||
@override
|
||||
final Brightness? brightness;
|
||||
@override
|
||||
final int? runTime;
|
||||
final List<ExternalProvider> _providers;
|
||||
@override
|
||||
@JsonKey()
|
||||
List<ExternalProvider> get providers {
|
||||
if (_providers is EqualUnmodifiableListView) return _providers;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_providers);
|
||||
}
|
||||
|
||||
@override
|
||||
final String? localIp;
|
||||
@override
|
||||
final FixedList<Connection> requests;
|
||||
@override
|
||||
final int version;
|
||||
@override
|
||||
final FixedList<Log> logs;
|
||||
@override
|
||||
final FixedList<Traffic> traffics;
|
||||
@override
|
||||
final Traffic totalTraffic;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AppState(isInit: $isInit, pageLabel: $pageLabel, packages: $packages, colorSchemes: $colorSchemes, sortNum: $sortNum, viewWidth: $viewWidth, delayMap: $delayMap, groups: $groups, checkIpNum: $checkIpNum, brightness: $brightness, runTime: $runTime, providers: $providers, localIp: $localIp, requests: $requests, version: $version, logs: $logs, traffics: $traffics, totalTraffic: $totalTraffic)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$AppStateImpl &&
|
||||
(identical(other.isInit, isInit) || other.isInit == isInit) &&
|
||||
(identical(other.pageLabel, pageLabel) ||
|
||||
other.pageLabel == pageLabel) &&
|
||||
const DeepCollectionEquality().equals(other._packages, _packages) &&
|
||||
(identical(other.colorSchemes, colorSchemes) ||
|
||||
other.colorSchemes == colorSchemes) &&
|
||||
(identical(other.sortNum, sortNum) || other.sortNum == sortNum) &&
|
||||
(identical(other.viewWidth, viewWidth) ||
|
||||
other.viewWidth == viewWidth) &&
|
||||
const DeepCollectionEquality().equals(other._delayMap, _delayMap) &&
|
||||
const DeepCollectionEquality().equals(other._groups, _groups) &&
|
||||
(identical(other.checkIpNum, checkIpNum) ||
|
||||
other.checkIpNum == checkIpNum) &&
|
||||
(identical(other.brightness, brightness) ||
|
||||
other.brightness == brightness) &&
|
||||
(identical(other.runTime, runTime) || other.runTime == runTime) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._providers, _providers) &&
|
||||
(identical(other.localIp, localIp) || other.localIp == localIp) &&
|
||||
(identical(other.requests, requests) ||
|
||||
other.requests == requests) &&
|
||||
(identical(other.version, version) || other.version == version) &&
|
||||
(identical(other.logs, logs) || other.logs == logs) &&
|
||||
(identical(other.traffics, traffics) ||
|
||||
other.traffics == traffics) &&
|
||||
(identical(other.totalTraffic, totalTraffic) ||
|
||||
other.totalTraffic == totalTraffic));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
isInit,
|
||||
pageLabel,
|
||||
const DeepCollectionEquality().hash(_packages),
|
||||
colorSchemes,
|
||||
sortNum,
|
||||
viewWidth,
|
||||
const DeepCollectionEquality().hash(_delayMap),
|
||||
const DeepCollectionEquality().hash(_groups),
|
||||
checkIpNum,
|
||||
brightness,
|
||||
runTime,
|
||||
const DeepCollectionEquality().hash(_providers),
|
||||
localIp,
|
||||
requests,
|
||||
version,
|
||||
logs,
|
||||
traffics,
|
||||
totalTraffic);
|
||||
|
||||
/// Create a copy of AppState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$AppStateImplCopyWith<_$AppStateImpl> get copyWith =>
|
||||
__$$AppStateImplCopyWithImpl<_$AppStateImpl>(this, _$identity);
|
||||
}
|
||||
|
||||
abstract class _AppState implements AppState {
|
||||
const factory _AppState(
|
||||
{final bool isInit,
|
||||
final PageLabel pageLabel,
|
||||
final List<Package> packages,
|
||||
final ColorSchemes colorSchemes,
|
||||
final int sortNum,
|
||||
required final double viewWidth,
|
||||
final Map<String, Map<String, int?>> delayMap,
|
||||
final List<Group> groups,
|
||||
final int checkIpNum,
|
||||
final Brightness? brightness,
|
||||
final int? runTime,
|
||||
final List<ExternalProvider> providers,
|
||||
final String? localIp,
|
||||
required final FixedList<Connection> requests,
|
||||
required final int version,
|
||||
required final FixedList<Log> logs,
|
||||
required final FixedList<Traffic> traffics,
|
||||
required final Traffic totalTraffic}) = _$AppStateImpl;
|
||||
|
||||
@override
|
||||
bool get isInit;
|
||||
@override
|
||||
PageLabel get pageLabel;
|
||||
@override
|
||||
List<Package> get packages;
|
||||
@override
|
||||
ColorSchemes get colorSchemes;
|
||||
@override
|
||||
int get sortNum;
|
||||
@override
|
||||
double get viewWidth;
|
||||
@override
|
||||
Map<String, Map<String, int?>> get delayMap;
|
||||
@override
|
||||
List<Group> get groups;
|
||||
@override
|
||||
int get checkIpNum;
|
||||
@override
|
||||
Brightness? get brightness;
|
||||
@override
|
||||
int? get runTime;
|
||||
@override
|
||||
List<ExternalProvider> get providers;
|
||||
@override
|
||||
String? get localIp;
|
||||
@override
|
||||
FixedList<Connection> get requests;
|
||||
@override
|
||||
int get version;
|
||||
@override
|
||||
FixedList<Log> get logs;
|
||||
@override
|
||||
FixedList<Traffic> get traffics;
|
||||
@override
|
||||
Traffic get totalTraffic;
|
||||
|
||||
/// Create a copy of AppState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$AppStateImplCopyWith<_$AppStateImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -6,96 +6,51 @@ part of '../clash_config.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
ClashConfig _$ClashConfigFromJson(Map<String, dynamic> json) => ClashConfig()
|
||||
..mixedPort = (json['mixed-port'] as num?)?.toInt() ?? 7890
|
||||
..mode = $enumDecodeNullable(_$ModeEnumMap, json['mode']) ?? Mode.rule
|
||||
..findProcessMode = $enumDecodeNullable(
|
||||
_$FindProcessModeEnumMap, json['find-process-mode']) ??
|
||||
FindProcessMode.off
|
||||
..allowLan = json['allow-lan'] as bool
|
||||
..logLevel =
|
||||
$enumDecodeNullable(_$LogLevelEnumMap, json['log-level']) ?? LogLevel.info
|
||||
..externalController = json['external-controller'] as String? ?? ''
|
||||
..keepAliveInterval = (json['keep-alive-interval'] as num?)?.toInt() ?? 30
|
||||
..ipv6 = json['ipv6'] as bool? ?? false
|
||||
..geodataLoader = json['geodata-loader'] as String? ?? 'memconservative'
|
||||
..unifiedDelay = json['unified-delay'] as bool? ?? false
|
||||
..tcpConcurrent = json['tcp-concurrent'] as bool? ?? false
|
||||
..tun = Tun.fromJson(json['tun'] as Map<String, dynamic>)
|
||||
..dns = Dns.safeDnsFromJson(json['dns'] as Map<String, Object?>)
|
||||
..rules = (json['rules'] as List<dynamic>).map((e) => e as String).toList()
|
||||
..globalRealUa = json['global-real-ua'] as String?
|
||||
..geoXUrl = (json['geox-url'] as Map<String, dynamic>?)?.map(
|
||||
(k, e) => MapEntry(k, e as String),
|
||||
) ??
|
||||
{
|
||||
'mmdb':
|
||||
'https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip.metadb',
|
||||
'asn':
|
||||
'https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/GeoLite2-ASN.mmdb',
|
||||
'geoip':
|
||||
'https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip.dat',
|
||||
'geosite':
|
||||
'https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geosite.dat'
|
||||
}
|
||||
..hosts = (json['hosts'] as Map<String, dynamic>?)?.map(
|
||||
(k, e) => MapEntry(k, e as String),
|
||||
) ??
|
||||
{}
|
||||
..includeRouteAddress = (json['include-route-address'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList() ??
|
||||
[]
|
||||
..routeMode = $enumDecodeNullable(_$RouteModeEnumMap, json['route-mode']) ??
|
||||
RouteMode.config;
|
||||
_$ProxyGroupImpl _$$ProxyGroupImplFromJson(Map<String, dynamic> json) =>
|
||||
_$ProxyGroupImpl(
|
||||
name: json['name'] as String,
|
||||
type: GroupType.parseProfileType(json['type'] as String),
|
||||
proxies:
|
||||
(json['proxies'] as List<dynamic>?)?.map((e) => e as String).toList(),
|
||||
use: (json['use'] as List<dynamic>?)?.map((e) => e as String).toList(),
|
||||
interval: (json['interval'] as num?)?.toInt(),
|
||||
lazy: json['lazy'] as bool?,
|
||||
url: json['url'] as String?,
|
||||
timeout: (json['timeout'] as num?)?.toInt(),
|
||||
maxFailedTimes: (json['max-failed-times'] as num?)?.toInt(),
|
||||
filter: json['filter'] as String?,
|
||||
excludeFilter: json['expected-filter'] as String?,
|
||||
excludeType: json['exclude-type'] as String?,
|
||||
expectedStatus: (json['expected-status'] as num?)?.toInt(),
|
||||
hidden: json['hidden'] as bool?,
|
||||
icon: json['icon'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ClashConfigToJson(ClashConfig instance) =>
|
||||
Map<String, dynamic> _$$ProxyGroupImplToJson(_$ProxyGroupImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'mixed-port': instance.mixedPort,
|
||||
'mode': _$ModeEnumMap[instance.mode]!,
|
||||
'find-process-mode': _$FindProcessModeEnumMap[instance.findProcessMode]!,
|
||||
'allow-lan': instance.allowLan,
|
||||
'log-level': _$LogLevelEnumMap[instance.logLevel]!,
|
||||
'external-controller': instance.externalController,
|
||||
'keep-alive-interval': instance.keepAliveInterval,
|
||||
'ipv6': instance.ipv6,
|
||||
'geodata-loader': instance.geodataLoader,
|
||||
'unified-delay': instance.unifiedDelay,
|
||||
'tcp-concurrent': instance.tcpConcurrent,
|
||||
'tun': instance.tun,
|
||||
'dns': instance.dns,
|
||||
'rules': instance.rules,
|
||||
'global-ua': instance.globalUa,
|
||||
'global-real-ua': instance.globalRealUa,
|
||||
'geox-url': instance.geoXUrl,
|
||||
'hosts': instance.hosts,
|
||||
'route-address': instance.routeAddress,
|
||||
'include-route-address': instance.includeRouteAddress,
|
||||
'route-mode': _$RouteModeEnumMap[instance.routeMode]!,
|
||||
'name': instance.name,
|
||||
'type': _$GroupTypeEnumMap[instance.type]!,
|
||||
'proxies': instance.proxies,
|
||||
'use': instance.use,
|
||||
'interval': instance.interval,
|
||||
'lazy': instance.lazy,
|
||||
'url': instance.url,
|
||||
'timeout': instance.timeout,
|
||||
'max-failed-times': instance.maxFailedTimes,
|
||||
'filter': instance.filter,
|
||||
'expected-filter': instance.excludeFilter,
|
||||
'exclude-type': instance.excludeType,
|
||||
'expected-status': instance.expectedStatus,
|
||||
'hidden': instance.hidden,
|
||||
'icon': instance.icon,
|
||||
};
|
||||
|
||||
const _$ModeEnumMap = {
|
||||
Mode.rule: 'rule',
|
||||
Mode.global: 'global',
|
||||
Mode.direct: 'direct',
|
||||
};
|
||||
|
||||
const _$FindProcessModeEnumMap = {
|
||||
FindProcessMode.always: 'always',
|
||||
FindProcessMode.off: 'off',
|
||||
};
|
||||
|
||||
const _$LogLevelEnumMap = {
|
||||
LogLevel.debug: 'debug',
|
||||
LogLevel.info: 'info',
|
||||
LogLevel.warning: 'warning',
|
||||
LogLevel.error: 'error',
|
||||
LogLevel.silent: 'silent',
|
||||
};
|
||||
|
||||
const _$RouteModeEnumMap = {
|
||||
RouteMode.bypassPrivate: 'bypassPrivate',
|
||||
RouteMode.config: 'config',
|
||||
const _$GroupTypeEnumMap = {
|
||||
GroupType.Selector: 'Selector',
|
||||
GroupType.URLTest: 'URLTest',
|
||||
GroupType.Fallback: 'Fallback',
|
||||
GroupType.LoadBalance: 'LoadBalance',
|
||||
GroupType.Relay: 'Relay',
|
||||
};
|
||||
|
||||
_$TunImpl _$$TunImplFromJson(Map<String, dynamic> json) => _$TunImpl(
|
||||
@@ -107,6 +62,10 @@ _$TunImpl _$$TunImplFromJson(Map<String, dynamic> json) => _$TunImpl(
|
||||
?.map((e) => e as String)
|
||||
.toList() ??
|
||||
const ["any:53"],
|
||||
routeAddress: (json['route-address'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList() ??
|
||||
const [],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$TunImplToJson(_$TunImpl instance) => <String, dynamic>{
|
||||
@@ -114,6 +73,7 @@ Map<String, dynamic> _$$TunImplToJson(_$TunImpl instance) => <String, dynamic>{
|
||||
'device': instance.device,
|
||||
'stack': _$TunStackEnumMap[instance.stack]!,
|
||||
'dns-hijack': instance.dnsHijack,
|
||||
'route-address': instance.routeAddress,
|
||||
};
|
||||
|
||||
const _$TunStackEnumMap = {
|
||||
@@ -223,3 +183,120 @@ const _$DnsModeEnumMap = {
|
||||
DnsMode.redirHost: 'redir-host',
|
||||
DnsMode.hosts: 'hosts',
|
||||
};
|
||||
|
||||
_$GeoXUrlImpl _$$GeoXUrlImplFromJson(Map<String, dynamic> json) =>
|
||||
_$GeoXUrlImpl(
|
||||
mmdb: json['mmdb'] as String? ??
|
||||
"https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip.metadb",
|
||||
asn: json['asn'] as String? ??
|
||||
"https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip.metadb",
|
||||
geoip: json['geoip'] as String? ??
|
||||
"https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip.dat",
|
||||
geosite: json['geosite'] as String? ??
|
||||
"https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geosite.dat",
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$GeoXUrlImplToJson(_$GeoXUrlImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'mmdb': instance.mmdb,
|
||||
'asn': instance.asn,
|
||||
'geoip': instance.geoip,
|
||||
'geosite': instance.geosite,
|
||||
};
|
||||
|
||||
_$ClashConfigImpl _$$ClashConfigImplFromJson(Map<String, dynamic> json) =>
|
||||
_$ClashConfigImpl(
|
||||
mixedPort: (json['mixed-port'] as num?)?.toInt() ?? defaultMixedPort,
|
||||
mode: $enumDecodeNullable(_$ModeEnumMap, json['mode']) ?? Mode.rule,
|
||||
allowLan: json['allow-lan'] as bool? ?? false,
|
||||
logLevel: $enumDecodeNullable(_$LogLevelEnumMap, json['log-level']) ??
|
||||
LogLevel.info,
|
||||
ipv6: json['ipv6'] as bool? ?? false,
|
||||
findProcessMode: $enumDecodeNullable(
|
||||
_$FindProcessModeEnumMap, json['find-process-mode'],
|
||||
unknownValue: FindProcessMode.off) ??
|
||||
FindProcessMode.off,
|
||||
keepAliveInterval: (json['keep-alive-interval'] as num?)?.toInt() ??
|
||||
defaultKeepAliveInterval,
|
||||
unifiedDelay: json['unified-delay'] as bool? ?? true,
|
||||
tcpConcurrent: json['tcp-concurrent'] as bool? ?? true,
|
||||
tun: json['tun'] == null
|
||||
? defaultTun
|
||||
: Tun.safeFormJson(json['tun'] as Map<String, Object?>?),
|
||||
dns: json['dns'] == null
|
||||
? defaultDns
|
||||
: Dns.safeDnsFromJson(json['dns'] as Map<String, Object?>),
|
||||
geoXUrl: json['geox-url'] == null
|
||||
? defaultGeoXUrl
|
||||
: GeoXUrl.safeFormJson(json['geox-url'] as Map<String, Object?>?),
|
||||
geodataLoader:
|
||||
$enumDecodeNullable(_$GeodataLoaderEnumMap, json['geodata-loader']) ??
|
||||
GeodataLoader.memconservative,
|
||||
proxyGroups: (json['proxy-groups'] as List<dynamic>?)
|
||||
?.map((e) => ProxyGroup.fromJson(e as Map<String, dynamic>))
|
||||
.toList() ??
|
||||
const [],
|
||||
rules:
|
||||
(json['rules'] as List<dynamic>?)?.map((e) => e as String).toList() ??
|
||||
const [],
|
||||
globalUa: json['global-ua'] as String?,
|
||||
externalController: $enumDecodeNullable(
|
||||
_$ExternalControllerStatusEnumMap, json['external-controller']) ??
|
||||
ExternalControllerStatus.close,
|
||||
hosts: (json['hosts'] as Map<String, dynamic>?)?.map(
|
||||
(k, e) => MapEntry(k, e as String),
|
||||
) ??
|
||||
const {},
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ClashConfigImplToJson(_$ClashConfigImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'mixed-port': instance.mixedPort,
|
||||
'mode': _$ModeEnumMap[instance.mode]!,
|
||||
'allow-lan': instance.allowLan,
|
||||
'log-level': _$LogLevelEnumMap[instance.logLevel]!,
|
||||
'ipv6': instance.ipv6,
|
||||
'find-process-mode': _$FindProcessModeEnumMap[instance.findProcessMode]!,
|
||||
'keep-alive-interval': instance.keepAliveInterval,
|
||||
'unified-delay': instance.unifiedDelay,
|
||||
'tcp-concurrent': instance.tcpConcurrent,
|
||||
'tun': instance.tun,
|
||||
'dns': instance.dns,
|
||||
'geox-url': instance.geoXUrl,
|
||||
'geodata-loader': _$GeodataLoaderEnumMap[instance.geodataLoader]!,
|
||||
'proxy-groups': instance.proxyGroups,
|
||||
'rules': instance.rules,
|
||||
'global-ua': instance.globalUa,
|
||||
'external-controller':
|
||||
_$ExternalControllerStatusEnumMap[instance.externalController]!,
|
||||
'hosts': instance.hosts,
|
||||
};
|
||||
|
||||
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',
|
||||
};
|
||||
|
||||
const _$FindProcessModeEnumMap = {
|
||||
FindProcessMode.always: 'always',
|
||||
FindProcessMode.off: 'off',
|
||||
};
|
||||
|
||||
const _$GeodataLoaderEnumMap = {
|
||||
GeodataLoader.standard: 'standard',
|
||||
GeodataLoader.memconservative: 'memconservative',
|
||||
};
|
||||
|
||||
const _$ExternalControllerStatusEnumMap = {
|
||||
ExternalControllerStatus.close: '',
|
||||
ExternalControllerStatus.open: '127.0.0.1:9090',
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@ final _privateConstructorUsedError = UnsupportedError(
|
||||
/// @nodoc
|
||||
mixin _$NavigationItem {
|
||||
Icon get icon => throw _privateConstructorUsedError;
|
||||
String get label => throw _privateConstructorUsedError;
|
||||
PageLabel get label => throw _privateConstructorUsedError;
|
||||
String? get description => throw _privateConstructorUsedError;
|
||||
Widget get fragment => throw _privateConstructorUsedError;
|
||||
bool get keep => throw _privateConstructorUsedError;
|
||||
@@ -39,7 +39,7 @@ abstract class $NavigationItemCopyWith<$Res> {
|
||||
@useResult
|
||||
$Res call(
|
||||
{Icon icon,
|
||||
String label,
|
||||
PageLabel label,
|
||||
String? description,
|
||||
Widget fragment,
|
||||
bool keep,
|
||||
@@ -78,7 +78,7 @@ class _$NavigationItemCopyWithImpl<$Res, $Val extends NavigationItem>
|
||||
label: null == label
|
||||
? _value.label
|
||||
: label // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
as PageLabel,
|
||||
description: freezed == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
@@ -113,7 +113,7 @@ abstract class _$$NavigationItemImplCopyWith<$Res>
|
||||
@useResult
|
||||
$Res call(
|
||||
{Icon icon,
|
||||
String label,
|
||||
PageLabel label,
|
||||
String? description,
|
||||
Widget fragment,
|
||||
bool keep,
|
||||
@@ -150,7 +150,7 @@ class __$$NavigationItemImplCopyWithImpl<$Res>
|
||||
label: null == label
|
||||
? _value.label
|
||||
: label // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
as PageLabel,
|
||||
description: freezed == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
@@ -194,7 +194,7 @@ class _$NavigationItemImpl implements _NavigationItem {
|
||||
@override
|
||||
final Icon icon;
|
||||
@override
|
||||
final String label;
|
||||
final PageLabel label;
|
||||
@override
|
||||
final String? description;
|
||||
@override
|
||||
@@ -251,7 +251,7 @@ class _$NavigationItemImpl implements _NavigationItem {
|
||||
abstract class _NavigationItem implements NavigationItem {
|
||||
const factory _NavigationItem(
|
||||
{required final Icon icon,
|
||||
required final String label,
|
||||
required final PageLabel label,
|
||||
final String? description,
|
||||
required final Widget fragment,
|
||||
final bool keep,
|
||||
@@ -261,7 +261,7 @@ abstract class _NavigationItem implements NavigationItem {
|
||||
@override
|
||||
Icon get icon;
|
||||
@override
|
||||
String get label;
|
||||
PageLabel get label;
|
||||
@override
|
||||
String? get description;
|
||||
@override
|
||||
@@ -1984,6 +1984,186 @@ abstract class _VersionInfo implements VersionInfo {
|
||||
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;
|
||||
String? get now => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Proxy to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of Proxy
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$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, String? now});
|
||||
}
|
||||
|
||||
/// @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;
|
||||
|
||||
/// Create a copy of Proxy
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? name = null,
|
||||
Object? type = null,
|
||||
Object? now = freezed,
|
||||
}) {
|
||||
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,
|
||||
now: freezed == now
|
||||
? _value.now
|
||||
: now // 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, String? now});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ProxyImplCopyWithImpl<$Res>
|
||||
extends _$ProxyCopyWithImpl<$Res, _$ProxyImpl>
|
||||
implements _$$ProxyImplCopyWith<$Res> {
|
||||
__$$ProxyImplCopyWithImpl(
|
||||
_$ProxyImpl _value, $Res Function(_$ProxyImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Proxy
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? name = null,
|
||||
Object? type = null,
|
||||
Object? now = freezed,
|
||||
}) {
|
||||
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,
|
||||
now: freezed == now
|
||||
? _value.now
|
||||
: now // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$ProxyImpl implements _Proxy {
|
||||
const _$ProxyImpl({required this.name, required this.type, this.now});
|
||||
|
||||
factory _$ProxyImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ProxyImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String name;
|
||||
@override
|
||||
final String type;
|
||||
@override
|
||||
final String? now;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'Proxy(name: $name, type: $type, now: $now)';
|
||||
}
|
||||
|
||||
@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) &&
|
||||
(identical(other.now, now) || other.now == now));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, name, type, now);
|
||||
|
||||
/// Create a copy of Proxy
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@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(
|
||||
{required final String name,
|
||||
required final String type,
|
||||
final String? now}) = _$ProxyImpl;
|
||||
|
||||
factory _Proxy.fromJson(Map<String, dynamic> json) = _$ProxyImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get name;
|
||||
@override
|
||||
String get type;
|
||||
@override
|
||||
String? get now;
|
||||
|
||||
/// Create a copy of Proxy
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ProxyImplCopyWith<_$ProxyImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
Group _$GroupFromJson(Map<String, dynamic> json) {
|
||||
return _Group.fromJson(json);
|
||||
}
|
||||
@@ -2270,183 +2450,152 @@ abstract class _Group implements Group {
|
||||
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;
|
||||
String? get now => throw _privateConstructorUsedError;
|
||||
mixin _$ColorSchemes {
|
||||
ColorScheme? get lightColorScheme => throw _privateConstructorUsedError;
|
||||
ColorScheme? get darkColorScheme => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Proxy to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of Proxy
|
||||
/// Create a copy of ColorSchemes
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ProxyCopyWith<Proxy> get copyWith => throw _privateConstructorUsedError;
|
||||
$ColorSchemesCopyWith<ColorSchemes> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ProxyCopyWith<$Res> {
|
||||
factory $ProxyCopyWith(Proxy value, $Res Function(Proxy) then) =
|
||||
_$ProxyCopyWithImpl<$Res, Proxy>;
|
||||
abstract class $ColorSchemesCopyWith<$Res> {
|
||||
factory $ColorSchemesCopyWith(
|
||||
ColorSchemes value, $Res Function(ColorSchemes) then) =
|
||||
_$ColorSchemesCopyWithImpl<$Res, ColorSchemes>;
|
||||
@useResult
|
||||
$Res call({String name, String type, String? now});
|
||||
$Res call({ColorScheme? lightColorScheme, ColorScheme? darkColorScheme});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ProxyCopyWithImpl<$Res, $Val extends Proxy>
|
||||
implements $ProxyCopyWith<$Res> {
|
||||
_$ProxyCopyWithImpl(this._value, this._then);
|
||||
class _$ColorSchemesCopyWithImpl<$Res, $Val extends ColorSchemes>
|
||||
implements $ColorSchemesCopyWith<$Res> {
|
||||
_$ColorSchemesCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of Proxy
|
||||
/// Create a copy of ColorSchemes
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? name = null,
|
||||
Object? type = null,
|
||||
Object? now = freezed,
|
||||
Object? lightColorScheme = freezed,
|
||||
Object? darkColorScheme = freezed,
|
||||
}) {
|
||||
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,
|
||||
now: freezed == now
|
||||
? _value.now
|
||||
: now // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
lightColorScheme: freezed == lightColorScheme
|
||||
? _value.lightColorScheme
|
||||
: lightColorScheme // ignore: cast_nullable_to_non_nullable
|
||||
as ColorScheme?,
|
||||
darkColorScheme: freezed == darkColorScheme
|
||||
? _value.darkColorScheme
|
||||
: darkColorScheme // ignore: cast_nullable_to_non_nullable
|
||||
as ColorScheme?,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ProxyImplCopyWith<$Res> implements $ProxyCopyWith<$Res> {
|
||||
factory _$$ProxyImplCopyWith(
|
||||
_$ProxyImpl value, $Res Function(_$ProxyImpl) then) =
|
||||
__$$ProxyImplCopyWithImpl<$Res>;
|
||||
abstract class _$$ColorSchemesImplCopyWith<$Res>
|
||||
implements $ColorSchemesCopyWith<$Res> {
|
||||
factory _$$ColorSchemesImplCopyWith(
|
||||
_$ColorSchemesImpl value, $Res Function(_$ColorSchemesImpl) then) =
|
||||
__$$ColorSchemesImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String name, String type, String? now});
|
||||
$Res call({ColorScheme? lightColorScheme, ColorScheme? darkColorScheme});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ProxyImplCopyWithImpl<$Res>
|
||||
extends _$ProxyCopyWithImpl<$Res, _$ProxyImpl>
|
||||
implements _$$ProxyImplCopyWith<$Res> {
|
||||
__$$ProxyImplCopyWithImpl(
|
||||
_$ProxyImpl _value, $Res Function(_$ProxyImpl) _then)
|
||||
class __$$ColorSchemesImplCopyWithImpl<$Res>
|
||||
extends _$ColorSchemesCopyWithImpl<$Res, _$ColorSchemesImpl>
|
||||
implements _$$ColorSchemesImplCopyWith<$Res> {
|
||||
__$$ColorSchemesImplCopyWithImpl(
|
||||
_$ColorSchemesImpl _value, $Res Function(_$ColorSchemesImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Proxy
|
||||
/// Create a copy of ColorSchemes
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? name = null,
|
||||
Object? type = null,
|
||||
Object? now = freezed,
|
||||
Object? lightColorScheme = freezed,
|
||||
Object? darkColorScheme = freezed,
|
||||
}) {
|
||||
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,
|
||||
now: freezed == now
|
||||
? _value.now
|
||||
: now // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
return _then(_$ColorSchemesImpl(
|
||||
lightColorScheme: freezed == lightColorScheme
|
||||
? _value.lightColorScheme
|
||||
: lightColorScheme // ignore: cast_nullable_to_non_nullable
|
||||
as ColorScheme?,
|
||||
darkColorScheme: freezed == darkColorScheme
|
||||
? _value.darkColorScheme
|
||||
: darkColorScheme // ignore: cast_nullable_to_non_nullable
|
||||
as ColorScheme?,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$ProxyImpl implements _Proxy {
|
||||
const _$ProxyImpl({required this.name, required this.type, this.now});
|
||||
|
||||
factory _$ProxyImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ProxyImplFromJson(json);
|
||||
class _$ColorSchemesImpl implements _ColorSchemes {
|
||||
const _$ColorSchemesImpl({this.lightColorScheme, this.darkColorScheme});
|
||||
|
||||
@override
|
||||
final String name;
|
||||
final ColorScheme? lightColorScheme;
|
||||
@override
|
||||
final String type;
|
||||
@override
|
||||
final String? now;
|
||||
final ColorScheme? darkColorScheme;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'Proxy(name: $name, type: $type, now: $now)';
|
||||
return 'ColorSchemes(lightColorScheme: $lightColorScheme, darkColorScheme: $darkColorScheme)';
|
||||
}
|
||||
|
||||
@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) &&
|
||||
(identical(other.now, now) || other.now == now));
|
||||
other is _$ColorSchemesImpl &&
|
||||
(identical(other.lightColorScheme, lightColorScheme) ||
|
||||
other.lightColorScheme == lightColorScheme) &&
|
||||
(identical(other.darkColorScheme, darkColorScheme) ||
|
||||
other.darkColorScheme == darkColorScheme));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, name, type, now);
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, lightColorScheme, darkColorScheme);
|
||||
|
||||
/// Create a copy of Proxy
|
||||
/// Create a copy of ColorSchemes
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ProxyImplCopyWith<_$ProxyImpl> get copyWith =>
|
||||
__$$ProxyImplCopyWithImpl<_$ProxyImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$ProxyImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
_$$ColorSchemesImplCopyWith<_$ColorSchemesImpl> get copyWith =>
|
||||
__$$ColorSchemesImplCopyWithImpl<_$ColorSchemesImpl>(this, _$identity);
|
||||
}
|
||||
|
||||
abstract class _Proxy implements Proxy {
|
||||
const factory _Proxy(
|
||||
{required final String name,
|
||||
required final String type,
|
||||
final String? now}) = _$ProxyImpl;
|
||||
|
||||
factory _Proxy.fromJson(Map<String, dynamic> json) = _$ProxyImpl.fromJson;
|
||||
abstract class _ColorSchemes implements ColorSchemes {
|
||||
const factory _ColorSchemes(
|
||||
{final ColorScheme? lightColorScheme,
|
||||
final ColorScheme? darkColorScheme}) = _$ColorSchemesImpl;
|
||||
|
||||
@override
|
||||
String get name;
|
||||
ColorScheme? get lightColorScheme;
|
||||
@override
|
||||
String get type;
|
||||
@override
|
||||
String? get now;
|
||||
ColorScheme? get darkColorScheme;
|
||||
|
||||
/// Create a copy of Proxy
|
||||
/// Create a copy of ColorSchemes
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ProxyImplCopyWith<_$ProxyImpl> get copyWith =>
|
||||
_$$ColorSchemesImplCopyWith<_$ColorSchemesImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
|
||||
@@ -113,6 +113,19 @@ Map<String, dynamic> _$$VersionInfoImplToJson(_$VersionInfoImpl instance) =>
|
||||
'version': instance.version,
|
||||
};
|
||||
|
||||
_$ProxyImpl _$$ProxyImplFromJson(Map<String, dynamic> json) => _$ProxyImpl(
|
||||
name: json['name'] as String,
|
||||
type: json['type'] as String,
|
||||
now: json['now'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ProxyImplToJson(_$ProxyImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'name': instance.name,
|
||||
'type': instance.type,
|
||||
'now': instance.now,
|
||||
};
|
||||
|
||||
_$GroupImpl _$$GroupImplFromJson(Map<String, dynamic> json) => _$GroupImpl(
|
||||
type: $enumDecode(_$GroupTypeEnumMap, json['type']),
|
||||
all: (json['all'] as List<dynamic>?)
|
||||
@@ -145,19 +158,6 @@ const _$GroupTypeEnumMap = {
|
||||
GroupType.Relay: 'Relay',
|
||||
};
|
||||
|
||||
_$ProxyImpl _$$ProxyImplFromJson(Map<String, dynamic> json) => _$ProxyImpl(
|
||||
name: json['name'] as String,
|
||||
type: json['type'] as String,
|
||||
now: json['now'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ProxyImplToJson(_$ProxyImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'name': instance.name,
|
||||
'type': instance.type,
|
||||
'now': instance.now,
|
||||
};
|
||||
|
||||
_$HotKeyActionImpl _$$HotKeyActionImplFromJson(Map<String, dynamic> json) =>
|
||||
_$HotKeyActionImpl(
|
||||
action: $enumDecode(_$HotActionEnumMap, json['action']),
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -6,57 +6,13 @@ part of '../config.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
Config _$ConfigFromJson(Map<String, dynamic> json) => Config()
|
||||
..appSetting =
|
||||
AppSetting.realFromJson(json['appSetting'] as Map<String, Object?>?)
|
||||
..profiles = (json['profiles'] as List<dynamic>?)
|
||||
?.map((e) => Profile.fromJson(e as Map<String, dynamic>))
|
||||
.toList() ??
|
||||
[]
|
||||
..currentProfileId = json['currentProfileId'] as String?
|
||||
..isAccessControl = json['isAccessControl'] as bool? ?? false
|
||||
..accessControl =
|
||||
AccessControl.fromJson(json['accessControl'] as Map<String, dynamic>)
|
||||
..dav = json['dav'] == null
|
||||
? null
|
||||
: DAV.fromJson(json['dav'] as Map<String, dynamic>)
|
||||
..windowProps =
|
||||
WindowProps.fromJson(json['windowProps'] as Map<String, dynamic>?)
|
||||
..vpnProps = VpnProps.fromJson(json['vpnProps'] as Map<String, dynamic>?)
|
||||
..networkProps =
|
||||
NetworkProps.fromJson(json['networkProps'] as Map<String, dynamic>?)
|
||||
..overrideDns = json['overrideDns'] as bool? ?? false
|
||||
..hotKeyActions = (json['hotKeyActions'] as List<dynamic>?)
|
||||
?.map((e) => HotKeyAction.fromJson(e as Map<String, dynamic>))
|
||||
.toList() ??
|
||||
[]
|
||||
..proxiesStyle =
|
||||
ProxiesStyle.fromJson(json['proxiesStyle'] as Map<String, dynamic>?)
|
||||
..themeProps =
|
||||
ThemeProps.realFromJson(json['themeProps'] as Map<String, Object?>?);
|
||||
|
||||
Map<String, dynamic> _$ConfigToJson(Config instance) => <String, dynamic>{
|
||||
'appSetting': instance.appSetting,
|
||||
'profiles': instance.profiles,
|
||||
'currentProfileId': instance.currentProfileId,
|
||||
'isAccessControl': instance.isAccessControl,
|
||||
'accessControl': instance.accessControl,
|
||||
'dav': instance.dav,
|
||||
'windowProps': instance.windowProps,
|
||||
'vpnProps': instance.vpnProps,
|
||||
'networkProps': instance.networkProps,
|
||||
'overrideDns': instance.overrideDns,
|
||||
'hotKeyActions': instance.hotKeyActions,
|
||||
'proxiesStyle': instance.proxiesStyle,
|
||||
'themeProps': instance.themeProps,
|
||||
};
|
||||
|
||||
_$AppSettingImpl _$$AppSettingImplFromJson(Map<String, dynamic> json) =>
|
||||
_$AppSettingImpl(
|
||||
_$AppSettingPropsImpl _$$AppSettingPropsImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$AppSettingPropsImpl(
|
||||
locale: json['locale'] as String?,
|
||||
dashboardWidgets: json['dashboardWidgets'] == null
|
||||
? defaultDashboardWidgets
|
||||
: dashboardWidgetsRealFormJson(json['dashboardWidgets'] as List?),
|
||||
: dashboardWidgetsSafeFormJson(json['dashboardWidgets'] as List?),
|
||||
onlyStatisticsProxy: json['onlyStatisticsProxy'] as bool? ?? false,
|
||||
autoLaunch: json['autoLaunch'] as bool? ?? false,
|
||||
silentLaunch: json['silentLaunch'] as bool? ?? false,
|
||||
@@ -72,7 +28,8 @@ _$AppSettingImpl _$$AppSettingImplFromJson(Map<String, dynamic> json) =>
|
||||
hidden: json['hidden'] as bool? ?? false,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$AppSettingImplToJson(_$AppSettingImpl instance) =>
|
||||
Map<String, dynamic> _$$AppSettingPropsImplToJson(
|
||||
_$AppSettingPropsImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'locale': instance.locale,
|
||||
'dashboardWidgets': instance.dashboardWidgets
|
||||
@@ -106,6 +63,7 @@ const _$DashboardWidgetEnumMap = {
|
||||
|
||||
_$AccessControlImpl _$$AccessControlImplFromJson(Map<String, dynamic> json) =>
|
||||
_$AccessControlImpl(
|
||||
enable: json['enable'] as bool? ?? false,
|
||||
mode: $enumDecodeNullable(_$AccessControlModeEnumMap, json['mode']) ??
|
||||
AccessControlMode.rejectSelected,
|
||||
acceptList: (json['acceptList'] as List<dynamic>?)
|
||||
@@ -123,6 +81,7 @@ _$AccessControlImpl _$$AccessControlImplFromJson(Map<String, dynamic> json) =>
|
||||
|
||||
Map<String, dynamic> _$$AccessControlImplToJson(_$AccessControlImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'enable': instance.enable,
|
||||
'mode': _$AccessControlModeEnumMap[instance.mode]!,
|
||||
'acceptList': instance.acceptList,
|
||||
'rejectList': instance.rejectList,
|
||||
@@ -163,6 +122,10 @@ _$VpnPropsImpl _$$VpnPropsImplFromJson(Map<String, dynamic> json) =>
|
||||
systemProxy: json['systemProxy'] as bool? ?? true,
|
||||
ipv6: json['ipv6'] as bool? ?? false,
|
||||
allowBypass: json['allowBypass'] as bool? ?? true,
|
||||
accessControl: json['accessControl'] == null
|
||||
? defaultAccessControl
|
||||
: AccessControl.fromJson(
|
||||
json['accessControl'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$VpnPropsImplToJson(_$VpnPropsImpl instance) =>
|
||||
@@ -171,6 +134,7 @@ Map<String, dynamic> _$$VpnPropsImplToJson(_$VpnPropsImpl instance) =>
|
||||
'systemProxy': instance.systemProxy,
|
||||
'ipv6': instance.ipv6,
|
||||
'allowBypass': instance.allowBypass,
|
||||
'accessControl': instance.accessControl,
|
||||
};
|
||||
|
||||
_$NetworkPropsImpl _$$NetworkPropsImplFromJson(Map<String, dynamic> json) =>
|
||||
@@ -180,14 +144,22 @@ _$NetworkPropsImpl _$$NetworkPropsImplFromJson(Map<String, dynamic> json) =>
|
||||
?.map((e) => e as String)
|
||||
.toList() ??
|
||||
defaultBypassDomain,
|
||||
routeMode: $enumDecodeNullable(_$RouteModeEnumMap, json['routeMode']) ??
|
||||
RouteMode.bypassPrivate,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$NetworkPropsImplToJson(_$NetworkPropsImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'systemProxy': instance.systemProxy,
|
||||
'bypassDomain': instance.bypassDomain,
|
||||
'routeMode': _$RouteModeEnumMap[instance.routeMode]!,
|
||||
};
|
||||
|
||||
const _$RouteModeEnumMap = {
|
||||
RouteMode.bypassPrivate: 'bypassPrivate',
|
||||
RouteMode.config: 'config',
|
||||
};
|
||||
|
||||
_$ProxiesStyleImpl _$$ProxiesStyleImplFromJson(Map<String, dynamic> json) =>
|
||||
_$ProxiesStyleImpl(
|
||||
type: $enumDecodeNullable(_$ProxiesTypeEnumMap, json['type']) ??
|
||||
@@ -278,3 +250,59 @@ const _$FontFamilyEnumMap = {
|
||||
FontFamily.twEmoji: 'twEmoji',
|
||||
FontFamily.icon: 'icon',
|
||||
};
|
||||
|
||||
_$ConfigImpl _$$ConfigImplFromJson(Map<String, dynamic> json) => _$ConfigImpl(
|
||||
appSetting: json['appSetting'] == null
|
||||
? defaultAppSettingProps
|
||||
: AppSettingProps.safeFromJson(
|
||||
json['appSetting'] as Map<String, Object?>?),
|
||||
profiles: (json['profiles'] as List<dynamic>?)
|
||||
?.map((e) => Profile.fromJson(e as Map<String, dynamic>))
|
||||
.toList() ??
|
||||
const [],
|
||||
hotKeyActions: (json['hotKeyActions'] as List<dynamic>?)
|
||||
?.map((e) => HotKeyAction.fromJson(e as Map<String, dynamic>))
|
||||
.toList() ??
|
||||
const [],
|
||||
currentProfileId: json['currentProfileId'] as String?,
|
||||
overrideDns: json['overrideDns'] as bool? ?? false,
|
||||
dav: json['dav'] == null
|
||||
? null
|
||||
: DAV.fromJson(json['dav'] as Map<String, dynamic>),
|
||||
networkProps: json['networkProps'] == null
|
||||
? defaultNetworkProps
|
||||
: NetworkProps.fromJson(
|
||||
json['networkProps'] as Map<String, dynamic>?),
|
||||
vpnProps: json['vpnProps'] == null
|
||||
? defaultVpnProps
|
||||
: VpnProps.fromJson(json['vpnProps'] as Map<String, dynamic>?),
|
||||
themeProps:
|
||||
ThemeProps.safeFromJson(json['themeProps'] as Map<String, Object?>?),
|
||||
proxiesStyle: json['proxiesStyle'] == null
|
||||
? defaultProxiesStyle
|
||||
: ProxiesStyle.fromJson(
|
||||
json['proxiesStyle'] as Map<String, dynamic>?),
|
||||
windowProps: json['windowProps'] == null
|
||||
? defaultWindowProps
|
||||
: WindowProps.fromJson(json['windowProps'] as Map<String, dynamic>?),
|
||||
patchClashConfig: json['patchClashConfig'] == null
|
||||
? defaultClashConfig
|
||||
: ClashConfig.fromJson(
|
||||
json['patchClashConfig'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ConfigImplToJson(_$ConfigImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'appSetting': instance.appSetting,
|
||||
'profiles': instance.profiles,
|
||||
'hotKeyActions': instance.hotKeyActions,
|
||||
'currentProfileId': instance.currentProfileId,
|
||||
'overrideDns': instance.overrideDns,
|
||||
'dav': instance.dav,
|
||||
'networkProps': instance.networkProps,
|
||||
'vpnProps': instance.vpnProps,
|
||||
'themeProps': instance.themeProps,
|
||||
'proxiesStyle': instance.proxiesStyle,
|
||||
'windowProps': instance.windowProps,
|
||||
'patchClashConfig': instance.patchClashConfig,
|
||||
};
|
||||
|
||||
@@ -20,14 +20,14 @@ CoreState _$CoreStateFromJson(Map<String, dynamic> json) {
|
||||
|
||||
/// @nodoc
|
||||
mixin _$CoreState {
|
||||
bool get enable => throw _privateConstructorUsedError;
|
||||
AccessControl? get accessControl => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "vpn-props")
|
||||
VpnProps get vpnProps => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "only-statistics-proxy")
|
||||
bool get onlyStatisticsProxy => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "current-profile-name")
|
||||
String get currentProfileName => throw _privateConstructorUsedError;
|
||||
bool get allowBypass => throw _privateConstructorUsedError;
|
||||
bool get systemProxy => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "bypass-domain")
|
||||
List<String> get bypassDomain => throw _privateConstructorUsedError;
|
||||
List<String> get routeAddress => throw _privateConstructorUsedError;
|
||||
bool get ipv6 => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this CoreState to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@@ -45,16 +45,12 @@ abstract class $CoreStateCopyWith<$Res> {
|
||||
_$CoreStateCopyWithImpl<$Res, CoreState>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{bool enable,
|
||||
AccessControl? accessControl,
|
||||
String currentProfileName,
|
||||
bool allowBypass,
|
||||
bool systemProxy,
|
||||
List<String> bypassDomain,
|
||||
List<String> routeAddress,
|
||||
bool ipv6});
|
||||
{@JsonKey(name: "vpn-props") VpnProps vpnProps,
|
||||
@JsonKey(name: "only-statistics-proxy") bool onlyStatisticsProxy,
|
||||
@JsonKey(name: "current-profile-name") String currentProfileName,
|
||||
@JsonKey(name: "bypass-domain") List<String> bypassDomain});
|
||||
|
||||
$AccessControlCopyWith<$Res>? get accessControl;
|
||||
$VpnPropsCopyWith<$Res> get vpnProps;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -72,48 +68,28 @@ class _$CoreStateCopyWithImpl<$Res, $Val extends CoreState>
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? enable = null,
|
||||
Object? accessControl = freezed,
|
||||
Object? vpnProps = null,
|
||||
Object? onlyStatisticsProxy = null,
|
||||
Object? currentProfileName = null,
|
||||
Object? allowBypass = null,
|
||||
Object? systemProxy = null,
|
||||
Object? bypassDomain = null,
|
||||
Object? routeAddress = null,
|
||||
Object? ipv6 = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
enable: null == enable
|
||||
? _value.enable
|
||||
: enable // ignore: cast_nullable_to_non_nullable
|
||||
vpnProps: null == vpnProps
|
||||
? _value.vpnProps
|
||||
: vpnProps // ignore: cast_nullable_to_non_nullable
|
||||
as VpnProps,
|
||||
onlyStatisticsProxy: null == onlyStatisticsProxy
|
||||
? _value.onlyStatisticsProxy
|
||||
: onlyStatisticsProxy // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
accessControl: freezed == accessControl
|
||||
? _value.accessControl
|
||||
: accessControl // ignore: cast_nullable_to_non_nullable
|
||||
as AccessControl?,
|
||||
currentProfileName: null == currentProfileName
|
||||
? _value.currentProfileName
|
||||
: currentProfileName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
allowBypass: null == allowBypass
|
||||
? _value.allowBypass
|
||||
: allowBypass // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
systemProxy: null == systemProxy
|
||||
? _value.systemProxy
|
||||
: systemProxy // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
bypassDomain: null == bypassDomain
|
||||
? _value.bypassDomain
|
||||
: bypassDomain // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
routeAddress: null == routeAddress
|
||||
? _value.routeAddress
|
||||
: routeAddress // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
ipv6: null == ipv6
|
||||
? _value.ipv6
|
||||
: ipv6 // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
) as $Val);
|
||||
}
|
||||
|
||||
@@ -121,13 +97,9 @@ class _$CoreStateCopyWithImpl<$Res, $Val extends CoreState>
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$AccessControlCopyWith<$Res>? get accessControl {
|
||||
if (_value.accessControl == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $AccessControlCopyWith<$Res>(_value.accessControl!, (value) {
|
||||
return _then(_value.copyWith(accessControl: value) as $Val);
|
||||
$VpnPropsCopyWith<$Res> get vpnProps {
|
||||
return $VpnPropsCopyWith<$Res>(_value.vpnProps, (value) {
|
||||
return _then(_value.copyWith(vpnProps: value) as $Val);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -141,17 +113,13 @@ abstract class _$$CoreStateImplCopyWith<$Res>
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{bool enable,
|
||||
AccessControl? accessControl,
|
||||
String currentProfileName,
|
||||
bool allowBypass,
|
||||
bool systemProxy,
|
||||
List<String> bypassDomain,
|
||||
List<String> routeAddress,
|
||||
bool ipv6});
|
||||
{@JsonKey(name: "vpn-props") VpnProps vpnProps,
|
||||
@JsonKey(name: "only-statistics-proxy") bool onlyStatisticsProxy,
|
||||
@JsonKey(name: "current-profile-name") String currentProfileName,
|
||||
@JsonKey(name: "bypass-domain") List<String> bypassDomain});
|
||||
|
||||
@override
|
||||
$AccessControlCopyWith<$Res>? get accessControl;
|
||||
$VpnPropsCopyWith<$Res> get vpnProps;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -167,48 +135,28 @@ class __$$CoreStateImplCopyWithImpl<$Res>
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? enable = null,
|
||||
Object? accessControl = freezed,
|
||||
Object? vpnProps = null,
|
||||
Object? onlyStatisticsProxy = null,
|
||||
Object? currentProfileName = null,
|
||||
Object? allowBypass = null,
|
||||
Object? systemProxy = null,
|
||||
Object? bypassDomain = null,
|
||||
Object? routeAddress = null,
|
||||
Object? ipv6 = null,
|
||||
}) {
|
||||
return _then(_$CoreStateImpl(
|
||||
enable: null == enable
|
||||
? _value.enable
|
||||
: enable // ignore: cast_nullable_to_non_nullable
|
||||
vpnProps: null == vpnProps
|
||||
? _value.vpnProps
|
||||
: vpnProps // ignore: cast_nullable_to_non_nullable
|
||||
as VpnProps,
|
||||
onlyStatisticsProxy: null == onlyStatisticsProxy
|
||||
? _value.onlyStatisticsProxy
|
||||
: onlyStatisticsProxy // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
accessControl: freezed == accessControl
|
||||
? _value.accessControl
|
||||
: accessControl // ignore: cast_nullable_to_non_nullable
|
||||
as AccessControl?,
|
||||
currentProfileName: null == currentProfileName
|
||||
? _value.currentProfileName
|
||||
: currentProfileName // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
allowBypass: null == allowBypass
|
||||
? _value.allowBypass
|
||||
: allowBypass // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
systemProxy: null == systemProxy
|
||||
? _value.systemProxy
|
||||
: systemProxy // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
bypassDomain: null == bypassDomain
|
||||
? _value._bypassDomain
|
||||
: bypassDomain // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
routeAddress: null == routeAddress
|
||||
? _value._routeAddress
|
||||
: routeAddress // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
ipv6: null == ipv6
|
||||
? _value.ipv6
|
||||
: ipv6 // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -217,52 +165,37 @@ class __$$CoreStateImplCopyWithImpl<$Res>
|
||||
@JsonSerializable()
|
||||
class _$CoreStateImpl implements _CoreState {
|
||||
const _$CoreStateImpl(
|
||||
{required this.enable,
|
||||
this.accessControl,
|
||||
required this.currentProfileName,
|
||||
required this.allowBypass,
|
||||
required this.systemProxy,
|
||||
required final List<String> bypassDomain,
|
||||
required final List<String> routeAddress,
|
||||
required this.ipv6})
|
||||
: _bypassDomain = bypassDomain,
|
||||
_routeAddress = routeAddress;
|
||||
{@JsonKey(name: "vpn-props") required this.vpnProps,
|
||||
@JsonKey(name: "only-statistics-proxy") required this.onlyStatisticsProxy,
|
||||
@JsonKey(name: "current-profile-name") required this.currentProfileName,
|
||||
@JsonKey(name: "bypass-domain")
|
||||
final List<String> bypassDomain = const []})
|
||||
: _bypassDomain = bypassDomain;
|
||||
|
||||
factory _$CoreStateImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$CoreStateImplFromJson(json);
|
||||
|
||||
@override
|
||||
final bool enable;
|
||||
@JsonKey(name: "vpn-props")
|
||||
final VpnProps vpnProps;
|
||||
@override
|
||||
final AccessControl? accessControl;
|
||||
@JsonKey(name: "only-statistics-proxy")
|
||||
final bool onlyStatisticsProxy;
|
||||
@override
|
||||
@JsonKey(name: "current-profile-name")
|
||||
final String currentProfileName;
|
||||
@override
|
||||
final bool allowBypass;
|
||||
@override
|
||||
final bool systemProxy;
|
||||
final List<String> _bypassDomain;
|
||||
@override
|
||||
@JsonKey(name: "bypass-domain")
|
||||
List<String> get bypassDomain {
|
||||
if (_bypassDomain is EqualUnmodifiableListView) return _bypassDomain;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_bypassDomain);
|
||||
}
|
||||
|
||||
final List<String> _routeAddress;
|
||||
@override
|
||||
List<String> get routeAddress {
|
||||
if (_routeAddress is EqualUnmodifiableListView) return _routeAddress;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_routeAddress);
|
||||
}
|
||||
|
||||
@override
|
||||
final bool ipv6;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'CoreState(enable: $enable, accessControl: $accessControl, currentProfileName: $currentProfileName, allowBypass: $allowBypass, systemProxy: $systemProxy, bypassDomain: $bypassDomain, routeAddress: $routeAddress, ipv6: $ipv6)';
|
||||
return 'CoreState(vpnProps: $vpnProps, onlyStatisticsProxy: $onlyStatisticsProxy, currentProfileName: $currentProfileName, bypassDomain: $bypassDomain)';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -270,34 +203,20 @@ class _$CoreStateImpl implements _CoreState {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$CoreStateImpl &&
|
||||
(identical(other.enable, enable) || other.enable == enable) &&
|
||||
(identical(other.accessControl, accessControl) ||
|
||||
other.accessControl == accessControl) &&
|
||||
(identical(other.vpnProps, vpnProps) ||
|
||||
other.vpnProps == vpnProps) &&
|
||||
(identical(other.onlyStatisticsProxy, onlyStatisticsProxy) ||
|
||||
other.onlyStatisticsProxy == onlyStatisticsProxy) &&
|
||||
(identical(other.currentProfileName, currentProfileName) ||
|
||||
other.currentProfileName == currentProfileName) &&
|
||||
(identical(other.allowBypass, allowBypass) ||
|
||||
other.allowBypass == allowBypass) &&
|
||||
(identical(other.systemProxy, systemProxy) ||
|
||||
other.systemProxy == systemProxy) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._bypassDomain, _bypassDomain) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._routeAddress, _routeAddress) &&
|
||||
(identical(other.ipv6, ipv6) || other.ipv6 == ipv6));
|
||||
.equals(other._bypassDomain, _bypassDomain));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
enable,
|
||||
accessControl,
|
||||
currentProfileName,
|
||||
allowBypass,
|
||||
systemProxy,
|
||||
const DeepCollectionEquality().hash(_bypassDomain),
|
||||
const DeepCollectionEquality().hash(_routeAddress),
|
||||
ipv6);
|
||||
int get hashCode => Object.hash(runtimeType, vpnProps, onlyStatisticsProxy,
|
||||
currentProfileName, const DeepCollectionEquality().hash(_bypassDomain));
|
||||
|
||||
/// Create a copy of CoreState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -317,34 +236,29 @@ class _$CoreStateImpl implements _CoreState {
|
||||
|
||||
abstract class _CoreState implements CoreState {
|
||||
const factory _CoreState(
|
||||
{required final bool enable,
|
||||
final AccessControl? accessControl,
|
||||
required final String currentProfileName,
|
||||
required final bool allowBypass,
|
||||
required final bool systemProxy,
|
||||
required final List<String> bypassDomain,
|
||||
required final List<String> routeAddress,
|
||||
required final bool ipv6}) = _$CoreStateImpl;
|
||||
{@JsonKey(name: "vpn-props") required final VpnProps vpnProps,
|
||||
@JsonKey(name: "only-statistics-proxy")
|
||||
required final bool onlyStatisticsProxy,
|
||||
@JsonKey(name: "current-profile-name")
|
||||
required final String currentProfileName,
|
||||
@JsonKey(name: "bypass-domain") final List<String> bypassDomain}) =
|
||||
_$CoreStateImpl;
|
||||
|
||||
factory _CoreState.fromJson(Map<String, dynamic> json) =
|
||||
_$CoreStateImpl.fromJson;
|
||||
|
||||
@override
|
||||
bool get enable;
|
||||
@JsonKey(name: "vpn-props")
|
||||
VpnProps get vpnProps;
|
||||
@override
|
||||
AccessControl? get accessControl;
|
||||
@JsonKey(name: "only-statistics-proxy")
|
||||
bool get onlyStatisticsProxy;
|
||||
@override
|
||||
@JsonKey(name: "current-profile-name")
|
||||
String get currentProfileName;
|
||||
@override
|
||||
bool get allowBypass;
|
||||
@override
|
||||
bool get systemProxy;
|
||||
@override
|
||||
@JsonKey(name: "bypass-domain")
|
||||
List<String> get bypassDomain;
|
||||
@override
|
||||
List<String> get routeAddress;
|
||||
@override
|
||||
bool get ipv6;
|
||||
|
||||
/// Create a copy of CoreState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -592,7 +506,7 @@ class _$AndroidVpnOptionsImpl implements _AndroidVpnOptions {
|
||||
required final List<String> bypassDomain,
|
||||
required this.ipv4Address,
|
||||
required this.ipv6Address,
|
||||
required final List<String> routeAddress,
|
||||
final List<String> routeAddress = const [],
|
||||
required this.dnsServerAddress})
|
||||
: _bypassDomain = bypassDomain,
|
||||
_routeAddress = routeAddress;
|
||||
@@ -624,6 +538,7 @@ class _$AndroidVpnOptionsImpl implements _AndroidVpnOptions {
|
||||
final String ipv6Address;
|
||||
final List<String> _routeAddress;
|
||||
@override
|
||||
@JsonKey()
|
||||
List<String> get routeAddress {
|
||||
if (_routeAddress is EqualUnmodifiableListView) return _routeAddress;
|
||||
// ignore: implicit_dynamic_type
|
||||
@@ -705,7 +620,7 @@ abstract class _AndroidVpnOptions implements AndroidVpnOptions {
|
||||
required final List<String> bypassDomain,
|
||||
required final String ipv4Address,
|
||||
required final String ipv6Address,
|
||||
required final List<String> routeAddress,
|
||||
final List<String> routeAddress,
|
||||
required final String dnsServerAddress}) = _$AndroidVpnOptionsImpl;
|
||||
|
||||
factory _AndroidVpnOptions.fromJson(Map<String, dynamic> json) =
|
||||
@@ -748,16 +663,12 @@ ConfigExtendedParams _$ConfigExtendedParamsFromJson(Map<String, dynamic> json) {
|
||||
mixin _$ConfigExtendedParams {
|
||||
@JsonKey(name: "is-patch")
|
||||
bool get isPatch => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "is-compatible")
|
||||
bool get isCompatible => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "selected-map")
|
||||
Map<String, String> get selectedMap => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "override-dns")
|
||||
bool get overrideDns => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "test-url")
|
||||
String get testUrl => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "only-statistics-proxy")
|
||||
bool get onlyStatisticsProxy => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this ConfigExtendedParams to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@@ -777,11 +688,9 @@ abstract class $ConfigExtendedParamsCopyWith<$Res> {
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "is-patch") bool isPatch,
|
||||
@JsonKey(name: "is-compatible") bool isCompatible,
|
||||
@JsonKey(name: "selected-map") Map<String, String> selectedMap,
|
||||
@JsonKey(name: "override-dns") bool overrideDns,
|
||||
@JsonKey(name: "test-url") String testUrl,
|
||||
@JsonKey(name: "only-statistics-proxy") bool onlyStatisticsProxy});
|
||||
@JsonKey(name: "test-url") String testUrl});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -801,21 +710,15 @@ class _$ConfigExtendedParamsCopyWithImpl<$Res,
|
||||
@override
|
||||
$Res call({
|
||||
Object? isPatch = null,
|
||||
Object? isCompatible = null,
|
||||
Object? selectedMap = null,
|
||||
Object? overrideDns = null,
|
||||
Object? testUrl = null,
|
||||
Object? onlyStatisticsProxy = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
isPatch: null == isPatch
|
||||
? _value.isPatch
|
||||
: isPatch // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
isCompatible: null == isCompatible
|
||||
? _value.isCompatible
|
||||
: isCompatible // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
selectedMap: null == selectedMap
|
||||
? _value.selectedMap
|
||||
: selectedMap // ignore: cast_nullable_to_non_nullable
|
||||
@@ -828,10 +731,6 @@ class _$ConfigExtendedParamsCopyWithImpl<$Res,
|
||||
? _value.testUrl
|
||||
: testUrl // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
onlyStatisticsProxy: null == onlyStatisticsProxy
|
||||
? _value.onlyStatisticsProxy
|
||||
: onlyStatisticsProxy // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
@@ -846,11 +745,9 @@ abstract class _$$ConfigExtendedParamsImplCopyWith<$Res>
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "is-patch") bool isPatch,
|
||||
@JsonKey(name: "is-compatible") bool isCompatible,
|
||||
@JsonKey(name: "selected-map") Map<String, String> selectedMap,
|
||||
@JsonKey(name: "override-dns") bool overrideDns,
|
||||
@JsonKey(name: "test-url") String testUrl,
|
||||
@JsonKey(name: "only-statistics-proxy") bool onlyStatisticsProxy});
|
||||
@JsonKey(name: "test-url") String testUrl});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -867,21 +764,15 @@ class __$$ConfigExtendedParamsImplCopyWithImpl<$Res>
|
||||
@override
|
||||
$Res call({
|
||||
Object? isPatch = null,
|
||||
Object? isCompatible = null,
|
||||
Object? selectedMap = null,
|
||||
Object? overrideDns = null,
|
||||
Object? testUrl = null,
|
||||
Object? onlyStatisticsProxy = null,
|
||||
}) {
|
||||
return _then(_$ConfigExtendedParamsImpl(
|
||||
isPatch: null == isPatch
|
||||
? _value.isPatch
|
||||
: isPatch // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
isCompatible: null == isCompatible
|
||||
? _value.isCompatible
|
||||
: isCompatible // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
selectedMap: null == selectedMap
|
||||
? _value._selectedMap
|
||||
: selectedMap // ignore: cast_nullable_to_non_nullable
|
||||
@@ -894,10 +785,6 @@ class __$$ConfigExtendedParamsImplCopyWithImpl<$Res>
|
||||
? _value.testUrl
|
||||
: testUrl // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
onlyStatisticsProxy: null == onlyStatisticsProxy
|
||||
? _value.onlyStatisticsProxy
|
||||
: onlyStatisticsProxy // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -907,13 +794,10 @@ class __$$ConfigExtendedParamsImplCopyWithImpl<$Res>
|
||||
class _$ConfigExtendedParamsImpl implements _ConfigExtendedParams {
|
||||
const _$ConfigExtendedParamsImpl(
|
||||
{@JsonKey(name: "is-patch") required this.isPatch,
|
||||
@JsonKey(name: "is-compatible") required this.isCompatible,
|
||||
@JsonKey(name: "selected-map")
|
||||
required final Map<String, String> selectedMap,
|
||||
@JsonKey(name: "override-dns") required this.overrideDns,
|
||||
@JsonKey(name: "test-url") required this.testUrl,
|
||||
@JsonKey(name: "only-statistics-proxy")
|
||||
required this.onlyStatisticsProxy})
|
||||
@JsonKey(name: "test-url") required this.testUrl})
|
||||
: _selectedMap = selectedMap;
|
||||
|
||||
factory _$ConfigExtendedParamsImpl.fromJson(Map<String, dynamic> json) =>
|
||||
@@ -922,9 +806,6 @@ class _$ConfigExtendedParamsImpl implements _ConfigExtendedParams {
|
||||
@override
|
||||
@JsonKey(name: "is-patch")
|
||||
final bool isPatch;
|
||||
@override
|
||||
@JsonKey(name: "is-compatible")
|
||||
final bool isCompatible;
|
||||
final Map<String, String> _selectedMap;
|
||||
@override
|
||||
@JsonKey(name: "selected-map")
|
||||
@@ -940,13 +821,10 @@ class _$ConfigExtendedParamsImpl implements _ConfigExtendedParams {
|
||||
@override
|
||||
@JsonKey(name: "test-url")
|
||||
final String testUrl;
|
||||
@override
|
||||
@JsonKey(name: "only-statistics-proxy")
|
||||
final bool onlyStatisticsProxy;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ConfigExtendedParams(isPatch: $isPatch, isCompatible: $isCompatible, selectedMap: $selectedMap, overrideDns: $overrideDns, testUrl: $testUrl, onlyStatisticsProxy: $onlyStatisticsProxy)';
|
||||
return 'ConfigExtendedParams(isPatch: $isPatch, selectedMap: $selectedMap, overrideDns: $overrideDns, testUrl: $testUrl)';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -955,27 +833,17 @@ class _$ConfigExtendedParamsImpl implements _ConfigExtendedParams {
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ConfigExtendedParamsImpl &&
|
||||
(identical(other.isPatch, isPatch) || other.isPatch == isPatch) &&
|
||||
(identical(other.isCompatible, isCompatible) ||
|
||||
other.isCompatible == isCompatible) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._selectedMap, _selectedMap) &&
|
||||
(identical(other.overrideDns, overrideDns) ||
|
||||
other.overrideDns == overrideDns) &&
|
||||
(identical(other.testUrl, testUrl) || other.testUrl == testUrl) &&
|
||||
(identical(other.onlyStatisticsProxy, onlyStatisticsProxy) ||
|
||||
other.onlyStatisticsProxy == onlyStatisticsProxy));
|
||||
(identical(other.testUrl, testUrl) || other.testUrl == testUrl));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
isPatch,
|
||||
isCompatible,
|
||||
const DeepCollectionEquality().hash(_selectedMap),
|
||||
overrideDns,
|
||||
testUrl,
|
||||
onlyStatisticsProxy);
|
||||
int get hashCode => Object.hash(runtimeType, isPatch,
|
||||
const DeepCollectionEquality().hash(_selectedMap), overrideDns, testUrl);
|
||||
|
||||
/// Create a copy of ConfigExtendedParams
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -997,14 +865,12 @@ class _$ConfigExtendedParamsImpl implements _ConfigExtendedParams {
|
||||
|
||||
abstract class _ConfigExtendedParams implements ConfigExtendedParams {
|
||||
const factory _ConfigExtendedParams(
|
||||
{@JsonKey(name: "is-patch") required final bool isPatch,
|
||||
@JsonKey(name: "is-compatible") required final bool isCompatible,
|
||||
@JsonKey(name: "selected-map")
|
||||
required final Map<String, String> selectedMap,
|
||||
@JsonKey(name: "override-dns") required final bool overrideDns,
|
||||
@JsonKey(name: "test-url") required final String testUrl,
|
||||
@JsonKey(name: "only-statistics-proxy")
|
||||
required final bool onlyStatisticsProxy}) = _$ConfigExtendedParamsImpl;
|
||||
{@JsonKey(name: "is-patch") required final bool isPatch,
|
||||
@JsonKey(name: "selected-map")
|
||||
required final Map<String, String> selectedMap,
|
||||
@JsonKey(name: "override-dns") required final bool overrideDns,
|
||||
@JsonKey(name: "test-url") required final String testUrl}) =
|
||||
_$ConfigExtendedParamsImpl;
|
||||
|
||||
factory _ConfigExtendedParams.fromJson(Map<String, dynamic> json) =
|
||||
_$ConfigExtendedParamsImpl.fromJson;
|
||||
@@ -1013,9 +879,6 @@ abstract class _ConfigExtendedParams implements ConfigExtendedParams {
|
||||
@JsonKey(name: "is-patch")
|
||||
bool get isPatch;
|
||||
@override
|
||||
@JsonKey(name: "is-compatible")
|
||||
bool get isCompatible;
|
||||
@override
|
||||
@JsonKey(name: "selected-map")
|
||||
Map<String, String> get selectedMap;
|
||||
@override
|
||||
@@ -1024,9 +887,6 @@ abstract class _ConfigExtendedParams implements ConfigExtendedParams {
|
||||
@override
|
||||
@JsonKey(name: "test-url")
|
||||
String get testUrl;
|
||||
@override
|
||||
@JsonKey(name: "only-statistics-proxy")
|
||||
bool get onlyStatisticsProxy;
|
||||
|
||||
/// Create a copy of ConfigExtendedParams
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -1068,6 +928,7 @@ abstract class $UpdateConfigParamsCopyWith<$Res> {
|
||||
ClashConfig config,
|
||||
ConfigExtendedParams params});
|
||||
|
||||
$ClashConfigCopyWith<$Res> get config;
|
||||
$ConfigExtendedParamsCopyWith<$Res> get params;
|
||||
}
|
||||
|
||||
@@ -1106,6 +967,16 @@ class _$UpdateConfigParamsCopyWithImpl<$Res, $Val extends UpdateConfigParams>
|
||||
) as $Val);
|
||||
}
|
||||
|
||||
/// Create a copy of UpdateConfigParams
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$ClashConfigCopyWith<$Res> get config {
|
||||
return $ClashConfigCopyWith<$Res>(_value.config, (value) {
|
||||
return _then(_value.copyWith(config: value) as $Val);
|
||||
});
|
||||
}
|
||||
|
||||
/// Create a copy of UpdateConfigParams
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@@ -1130,6 +1001,8 @@ abstract class _$$UpdateConfigParamsImplCopyWith<$Res>
|
||||
ClashConfig config,
|
||||
ConfigExtendedParams params});
|
||||
|
||||
@override
|
||||
$ClashConfigCopyWith<$Res> get config;
|
||||
@override
|
||||
$ConfigExtendedParamsCopyWith<$Res> get params;
|
||||
}
|
||||
|
||||
@@ -8,33 +8,21 @@ part of '../core.dart';
|
||||
|
||||
_$CoreStateImpl _$$CoreStateImplFromJson(Map<String, dynamic> json) =>
|
||||
_$CoreStateImpl(
|
||||
enable: json['enable'] as bool,
|
||||
accessControl: json['accessControl'] == null
|
||||
? null
|
||||
: AccessControl.fromJson(
|
||||
json['accessControl'] as Map<String, dynamic>),
|
||||
currentProfileName: json['currentProfileName'] as String,
|
||||
allowBypass: json['allowBypass'] as bool,
|
||||
systemProxy: json['systemProxy'] as bool,
|
||||
bypassDomain: (json['bypassDomain'] as List<dynamic>)
|
||||
.map((e) => e as String)
|
||||
.toList(),
|
||||
routeAddress: (json['routeAddress'] as List<dynamic>)
|
||||
.map((e) => e as String)
|
||||
.toList(),
|
||||
ipv6: json['ipv6'] as bool,
|
||||
vpnProps: VpnProps.fromJson(json['vpn-props'] as Map<String, dynamic>?),
|
||||
onlyStatisticsProxy: json['only-statistics-proxy'] as bool,
|
||||
currentProfileName: json['current-profile-name'] as String,
|
||||
bypassDomain: (json['bypass-domain'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList() ??
|
||||
const [],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$CoreStateImplToJson(_$CoreStateImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'enable': instance.enable,
|
||||
'accessControl': instance.accessControl,
|
||||
'currentProfileName': instance.currentProfileName,
|
||||
'allowBypass': instance.allowBypass,
|
||||
'systemProxy': instance.systemProxy,
|
||||
'bypassDomain': instance.bypassDomain,
|
||||
'routeAddress': instance.routeAddress,
|
||||
'ipv6': instance.ipv6,
|
||||
'vpn-props': instance.vpnProps,
|
||||
'only-statistics-proxy': instance.onlyStatisticsProxy,
|
||||
'current-profile-name': instance.currentProfileName,
|
||||
'bypass-domain': instance.bypassDomain,
|
||||
};
|
||||
|
||||
_$AndroidVpnOptionsImpl _$$AndroidVpnOptionsImplFromJson(
|
||||
@@ -53,9 +41,10 @@ _$AndroidVpnOptionsImpl _$$AndroidVpnOptionsImplFromJson(
|
||||
.toList(),
|
||||
ipv4Address: json['ipv4Address'] as String,
|
||||
ipv6Address: json['ipv6Address'] as String,
|
||||
routeAddress: (json['routeAddress'] as List<dynamic>)
|
||||
.map((e) => e as String)
|
||||
.toList(),
|
||||
routeAddress: (json['routeAddress'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList() ??
|
||||
const [],
|
||||
dnsServerAddress: json['dnsServerAddress'] as String,
|
||||
);
|
||||
|
||||
@@ -78,22 +67,18 @@ _$ConfigExtendedParamsImpl _$$ConfigExtendedParamsImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$ConfigExtendedParamsImpl(
|
||||
isPatch: json['is-patch'] as bool,
|
||||
isCompatible: json['is-compatible'] as bool,
|
||||
selectedMap: Map<String, String>.from(json['selected-map'] as Map),
|
||||
overrideDns: json['override-dns'] as bool,
|
||||
testUrl: json['test-url'] as String,
|
||||
onlyStatisticsProxy: json['only-statistics-proxy'] as bool,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ConfigExtendedParamsImplToJson(
|
||||
_$ConfigExtendedParamsImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'is-patch': instance.isPatch,
|
||||
'is-compatible': instance.isCompatible,
|
||||
'selected-map': instance.selectedMap,
|
||||
'override-dns': instance.overrideDns,
|
||||
'test-url': instance.testUrl,
|
||||
'only-statistics-proxy': instance.onlyStatisticsProxy,
|
||||
};
|
||||
|
||||
_$UpdateConfigParamsImpl _$$UpdateConfigParamsImplFromJson(
|
||||
@@ -345,6 +330,7 @@ const _$ActionMethodEnumMap = {
|
||||
ActionMethod.stopListener: 'stopListener',
|
||||
ActionMethod.getCountryCode: 'getCountryCode',
|
||||
ActionMethod.getMemory: 'getMemory',
|
||||
ActionMethod.getProfile: 'getProfile',
|
||||
ActionMethod.setFdMap: 'setFdMap',
|
||||
ActionMethod.setProcessMap: 'setProcessMap',
|
||||
ActionMethod.setState: 'setState',
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user