bump: Flutter 3.32.1 Rust 1.87.0

fix: rsi launcher patch 2.4.0
This commit is contained in:
xkeyC 2025-05-31 17:27:21 +08:00
parent 2139bfb652
commit 5d735632bf
48 changed files with 5239 additions and 5455 deletions

View File

@ -1,4 +1,5 @@
rust_input: rust/src/api/**/*.rs rust_input: rust/src/api/**/*.rs
dart_output: lib/common/rust/ dart_output: lib/common/rust/
full_dep: true full_dep: true
web: false web: false
enable_lifetime: true

View File

@ -41,7 +41,7 @@ part 'app.g.dart';
part 'app.freezed.dart'; part 'app.freezed.dart';
@freezed @freezed
class AppGlobalState with _$AppGlobalState { abstract class AppGlobalState with _$AppGlobalState {
const factory AppGlobalState({ const factory AppGlobalState({
String? deviceUUID, String? deviceUUID,
String? applicationSupportDir, String? applicationSupportDir,
@ -348,7 +348,7 @@ class AppGlobalModel extends _$AppGlobalModel {
} }
@freezed @freezed
class ThemeConf with _$ThemeConf { abstract class ThemeConf with _$ThemeConf {
const factory ThemeConf({ const factory ThemeConf({
@Default(Color(0xbf132431)) Color backgroundColor, @Default(Color(0xbf132431)) Color backgroundColor,
@Default(Color(0xf2132431)) Color menuColor, @Default(Color(0xf2132431)) Color menuColor,

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file // coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint // ignore_for_file: type=lint
@ -9,225 +10,32 @@ part of 'app.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; 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 /// @nodoc
mixin _$AppGlobalState { mixin _$AppGlobalState {
String? get deviceUUID => throw _privateConstructorUsedError; String? get deviceUUID;
String? get applicationSupportDir => throw _privateConstructorUsedError; String? get applicationSupportDir;
String? get applicationBinaryModuleDir => throw _privateConstructorUsedError; String? get applicationBinaryModuleDir;
AppVersionData? get networkVersionData => throw _privateConstructorUsedError; AppVersionData? get networkVersionData;
ThemeConf get themeConf => throw _privateConstructorUsedError; ThemeConf get themeConf;
Locale? get appLocale => throw _privateConstructorUsedError; Locale? get appLocale;
Box<dynamic>? get appConfBox => throw _privateConstructorUsedError; Box? get appConfBox;
/// Create a copy of AppGlobalState /// Create a copy of AppGlobalState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$AppGlobalStateCopyWith<AppGlobalState> get copyWith => $AppGlobalStateCopyWith<AppGlobalState> get copyWith =>
throw _privateConstructorUsedError; _$AppGlobalStateCopyWithImpl<AppGlobalState>(
} this as AppGlobalState, _$identity);
/// @nodoc
abstract class $AppGlobalStateCopyWith<$Res> {
factory $AppGlobalStateCopyWith(
AppGlobalState value, $Res Function(AppGlobalState) then) =
_$AppGlobalStateCopyWithImpl<$Res, AppGlobalState>;
@useResult
$Res call(
{String? deviceUUID,
String? applicationSupportDir,
String? applicationBinaryModuleDir,
AppVersionData? networkVersionData,
ThemeConf themeConf,
Locale? appLocale,
Box<dynamic>? appConfBox});
$ThemeConfCopyWith<$Res> get themeConf;
}
/// @nodoc
class _$AppGlobalStateCopyWithImpl<$Res, $Val extends AppGlobalState>
implements $AppGlobalStateCopyWith<$Res> {
_$AppGlobalStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of AppGlobalState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? deviceUUID = freezed,
Object? applicationSupportDir = freezed,
Object? applicationBinaryModuleDir = freezed,
Object? networkVersionData = freezed,
Object? themeConf = null,
Object? appLocale = freezed,
Object? appConfBox = freezed,
}) {
return _then(_value.copyWith(
deviceUUID: freezed == deviceUUID
? _value.deviceUUID
: deviceUUID // ignore: cast_nullable_to_non_nullable
as String?,
applicationSupportDir: freezed == applicationSupportDir
? _value.applicationSupportDir
: applicationSupportDir // ignore: cast_nullable_to_non_nullable
as String?,
applicationBinaryModuleDir: freezed == applicationBinaryModuleDir
? _value.applicationBinaryModuleDir
: applicationBinaryModuleDir // ignore: cast_nullable_to_non_nullable
as String?,
networkVersionData: freezed == networkVersionData
? _value.networkVersionData
: networkVersionData // ignore: cast_nullable_to_non_nullable
as AppVersionData?,
themeConf: null == themeConf
? _value.themeConf
: themeConf // ignore: cast_nullable_to_non_nullable
as ThemeConf,
appLocale: freezed == appLocale
? _value.appLocale
: appLocale // ignore: cast_nullable_to_non_nullable
as Locale?,
appConfBox: freezed == appConfBox
? _value.appConfBox
: appConfBox // ignore: cast_nullable_to_non_nullable
as Box<dynamic>?,
) as $Val);
}
/// Create a copy of AppGlobalState
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$ThemeConfCopyWith<$Res> get themeConf {
return $ThemeConfCopyWith<$Res>(_value.themeConf, (value) {
return _then(_value.copyWith(themeConf: value) as $Val);
});
}
}
/// @nodoc
abstract class _$$AppGlobalStateImplCopyWith<$Res>
implements $AppGlobalStateCopyWith<$Res> {
factory _$$AppGlobalStateImplCopyWith(_$AppGlobalStateImpl value,
$Res Function(_$AppGlobalStateImpl) then) =
__$$AppGlobalStateImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{String? deviceUUID,
String? applicationSupportDir,
String? applicationBinaryModuleDir,
AppVersionData? networkVersionData,
ThemeConf themeConf,
Locale? appLocale,
Box<dynamic>? appConfBox});
@override
$ThemeConfCopyWith<$Res> get themeConf;
}
/// @nodoc
class __$$AppGlobalStateImplCopyWithImpl<$Res>
extends _$AppGlobalStateCopyWithImpl<$Res, _$AppGlobalStateImpl>
implements _$$AppGlobalStateImplCopyWith<$Res> {
__$$AppGlobalStateImplCopyWithImpl(
_$AppGlobalStateImpl _value, $Res Function(_$AppGlobalStateImpl) _then)
: super(_value, _then);
/// Create a copy of AppGlobalState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? deviceUUID = freezed,
Object? applicationSupportDir = freezed,
Object? applicationBinaryModuleDir = freezed,
Object? networkVersionData = freezed,
Object? themeConf = null,
Object? appLocale = freezed,
Object? appConfBox = freezed,
}) {
return _then(_$AppGlobalStateImpl(
deviceUUID: freezed == deviceUUID
? _value.deviceUUID
: deviceUUID // ignore: cast_nullable_to_non_nullable
as String?,
applicationSupportDir: freezed == applicationSupportDir
? _value.applicationSupportDir
: applicationSupportDir // ignore: cast_nullable_to_non_nullable
as String?,
applicationBinaryModuleDir: freezed == applicationBinaryModuleDir
? _value.applicationBinaryModuleDir
: applicationBinaryModuleDir // ignore: cast_nullable_to_non_nullable
as String?,
networkVersionData: freezed == networkVersionData
? _value.networkVersionData
: networkVersionData // ignore: cast_nullable_to_non_nullable
as AppVersionData?,
themeConf: null == themeConf
? _value.themeConf
: themeConf // ignore: cast_nullable_to_non_nullable
as ThemeConf,
appLocale: freezed == appLocale
? _value.appLocale
: appLocale // ignore: cast_nullable_to_non_nullable
as Locale?,
appConfBox: freezed == appConfBox
? _value.appConfBox
: appConfBox // ignore: cast_nullable_to_non_nullable
as Box<dynamic>?,
));
}
}
/// @nodoc
class _$AppGlobalStateImpl implements _AppGlobalState {
const _$AppGlobalStateImpl(
{this.deviceUUID,
this.applicationSupportDir,
this.applicationBinaryModuleDir,
this.networkVersionData,
this.themeConf = const ThemeConf(),
this.appLocale,
this.appConfBox});
@override
final String? deviceUUID;
@override
final String? applicationSupportDir;
@override
final String? applicationBinaryModuleDir;
@override
final AppVersionData? networkVersionData;
@override
@JsonKey()
final ThemeConf themeConf;
@override
final Locale? appLocale;
@override
final Box<dynamic>? appConfBox;
@override
String toString() {
return 'AppGlobalState(deviceUUID: $deviceUUID, applicationSupportDir: $applicationSupportDir, applicationBinaryModuleDir: $applicationBinaryModuleDir, networkVersionData: $networkVersionData, themeConf: $themeConf, appLocale: $appLocale, appConfBox: $appConfBox)';
}
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$AppGlobalStateImpl && other is AppGlobalState &&
(identical(other.deviceUUID, deviceUUID) || (identical(other.deviceUUID, deviceUUID) ||
other.deviceUUID == deviceUUID) && other.deviceUUID == deviceUUID) &&
(identical(other.applicationSupportDir, applicationSupportDir) || (identical(other.applicationSupportDir, applicationSupportDir) ||
@ -257,124 +65,305 @@ class _$AppGlobalStateImpl implements _AppGlobalState {
appLocale, appLocale,
appConfBox); appConfBox);
/// Create a copy of AppGlobalState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') String toString() {
_$$AppGlobalStateImplCopyWith<_$AppGlobalStateImpl> get copyWith => return 'AppGlobalState(deviceUUID: $deviceUUID, applicationSupportDir: $applicationSupportDir, applicationBinaryModuleDir: $applicationBinaryModuleDir, networkVersionData: $networkVersionData, themeConf: $themeConf, appLocale: $appLocale, appConfBox: $appConfBox)';
__$$AppGlobalStateImplCopyWithImpl<_$AppGlobalStateImpl>(
this, _$identity);
}
abstract class _AppGlobalState implements AppGlobalState {
const factory _AppGlobalState(
{final String? deviceUUID,
final String? applicationSupportDir,
final String? applicationBinaryModuleDir,
final AppVersionData? networkVersionData,
final ThemeConf themeConf,
final Locale? appLocale,
final Box<dynamic>? appConfBox}) = _$AppGlobalStateImpl;
@override
String? get deviceUUID;
@override
String? get applicationSupportDir;
@override
String? get applicationBinaryModuleDir;
@override
AppVersionData? get networkVersionData;
@override
ThemeConf get themeConf;
@override
Locale? get appLocale;
@override
Box<dynamic>? get appConfBox;
/// Create a copy of AppGlobalState
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$AppGlobalStateImplCopyWith<_$AppGlobalStateImpl> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
mixin _$ThemeConf {
Color get backgroundColor => throw _privateConstructorUsedError;
Color get menuColor => throw _privateConstructorUsedError;
Color get micaColor => throw _privateConstructorUsedError;
/// Create a copy of ThemeConf
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ThemeConfCopyWith<ThemeConf> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ThemeConfCopyWith<$Res> {
factory $ThemeConfCopyWith(ThemeConf value, $Res Function(ThemeConf) then) =
_$ThemeConfCopyWithImpl<$Res, ThemeConf>;
@useResult
$Res call({Color backgroundColor, Color menuColor, Color micaColor});
}
/// @nodoc
class _$ThemeConfCopyWithImpl<$Res, $Val extends ThemeConf>
implements $ThemeConfCopyWith<$Res> {
_$ThemeConfCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of ThemeConf
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? backgroundColor = null,
Object? menuColor = null,
Object? micaColor = null,
}) {
return _then(_value.copyWith(
backgroundColor: null == backgroundColor
? _value.backgroundColor
: backgroundColor // ignore: cast_nullable_to_non_nullable
as Color,
menuColor: null == menuColor
? _value.menuColor
: menuColor // ignore: cast_nullable_to_non_nullable
as Color,
micaColor: null == micaColor
? _value.micaColor
: micaColor // ignore: cast_nullable_to_non_nullable
as Color,
) as $Val);
} }
} }
/// @nodoc /// @nodoc
abstract class _$$ThemeConfImplCopyWith<$Res> abstract mixin class $AppGlobalStateCopyWith<$Res> {
implements $ThemeConfCopyWith<$Res> { factory $AppGlobalStateCopyWith(
factory _$$ThemeConfImplCopyWith( AppGlobalState value, $Res Function(AppGlobalState) _then) =
_$ThemeConfImpl value, $Res Function(_$ThemeConfImpl) then) = _$AppGlobalStateCopyWithImpl;
__$$ThemeConfImplCopyWithImpl<$Res>; @useResult
$Res call(
{String? deviceUUID,
String? applicationSupportDir,
String? applicationBinaryModuleDir,
AppVersionData? networkVersionData,
ThemeConf themeConf,
Locale? appLocale,
Box? appConfBox});
$ThemeConfCopyWith<$Res> get themeConf;
}
/// @nodoc
class _$AppGlobalStateCopyWithImpl<$Res>
implements $AppGlobalStateCopyWith<$Res> {
_$AppGlobalStateCopyWithImpl(this._self, this._then);
final AppGlobalState _self;
final $Res Function(AppGlobalState) _then;
/// Create a copy of AppGlobalState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override @override
$Res call({
Object? deviceUUID = freezed,
Object? applicationSupportDir = freezed,
Object? applicationBinaryModuleDir = freezed,
Object? networkVersionData = freezed,
Object? themeConf = null,
Object? appLocale = freezed,
Object? appConfBox = freezed,
}) {
return _then(_self.copyWith(
deviceUUID: freezed == deviceUUID
? _self.deviceUUID
: deviceUUID // ignore: cast_nullable_to_non_nullable
as String?,
applicationSupportDir: freezed == applicationSupportDir
? _self.applicationSupportDir
: applicationSupportDir // ignore: cast_nullable_to_non_nullable
as String?,
applicationBinaryModuleDir: freezed == applicationBinaryModuleDir
? _self.applicationBinaryModuleDir
: applicationBinaryModuleDir // ignore: cast_nullable_to_non_nullable
as String?,
networkVersionData: freezed == networkVersionData
? _self.networkVersionData
: networkVersionData // ignore: cast_nullable_to_non_nullable
as AppVersionData?,
themeConf: null == themeConf
? _self.themeConf
: themeConf // ignore: cast_nullable_to_non_nullable
as ThemeConf,
appLocale: freezed == appLocale
? _self.appLocale
: appLocale // ignore: cast_nullable_to_non_nullable
as Locale?,
appConfBox: freezed == appConfBox
? _self.appConfBox
: appConfBox // ignore: cast_nullable_to_non_nullable
as Box?,
));
}
/// Create a copy of AppGlobalState
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$ThemeConfCopyWith<$Res> get themeConf {
return $ThemeConfCopyWith<$Res>(_self.themeConf, (value) {
return _then(_self.copyWith(themeConf: value));
});
}
}
/// @nodoc
class _AppGlobalState implements AppGlobalState {
const _AppGlobalState(
{this.deviceUUID,
this.applicationSupportDir,
this.applicationBinaryModuleDir,
this.networkVersionData,
this.themeConf = const ThemeConf(),
this.appLocale,
this.appConfBox});
@override
final String? deviceUUID;
@override
final String? applicationSupportDir;
@override
final String? applicationBinaryModuleDir;
@override
final AppVersionData? networkVersionData;
@override
@JsonKey()
final ThemeConf themeConf;
@override
final Locale? appLocale;
@override
final Box? appConfBox;
/// Create a copy of AppGlobalState
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$AppGlobalStateCopyWith<_AppGlobalState> get copyWith =>
__$AppGlobalStateCopyWithImpl<_AppGlobalState>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _AppGlobalState &&
(identical(other.deviceUUID, deviceUUID) ||
other.deviceUUID == deviceUUID) &&
(identical(other.applicationSupportDir, applicationSupportDir) ||
other.applicationSupportDir == applicationSupportDir) &&
(identical(other.applicationBinaryModuleDir,
applicationBinaryModuleDir) ||
other.applicationBinaryModuleDir ==
applicationBinaryModuleDir) &&
(identical(other.networkVersionData, networkVersionData) ||
other.networkVersionData == networkVersionData) &&
(identical(other.themeConf, themeConf) ||
other.themeConf == themeConf) &&
(identical(other.appLocale, appLocale) ||
other.appLocale == appLocale) &&
(identical(other.appConfBox, appConfBox) ||
other.appConfBox == appConfBox));
}
@override
int get hashCode => Object.hash(
runtimeType,
deviceUUID,
applicationSupportDir,
applicationBinaryModuleDir,
networkVersionData,
themeConf,
appLocale,
appConfBox);
@override
String toString() {
return 'AppGlobalState(deviceUUID: $deviceUUID, applicationSupportDir: $applicationSupportDir, applicationBinaryModuleDir: $applicationBinaryModuleDir, networkVersionData: $networkVersionData, themeConf: $themeConf, appLocale: $appLocale, appConfBox: $appConfBox)';
}
}
/// @nodoc
abstract mixin class _$AppGlobalStateCopyWith<$Res>
implements $AppGlobalStateCopyWith<$Res> {
factory _$AppGlobalStateCopyWith(
_AppGlobalState value, $Res Function(_AppGlobalState) _then) =
__$AppGlobalStateCopyWithImpl;
@override
@useResult
$Res call(
{String? deviceUUID,
String? applicationSupportDir,
String? applicationBinaryModuleDir,
AppVersionData? networkVersionData,
ThemeConf themeConf,
Locale? appLocale,
Box? appConfBox});
@override
$ThemeConfCopyWith<$Res> get themeConf;
}
/// @nodoc
class __$AppGlobalStateCopyWithImpl<$Res>
implements _$AppGlobalStateCopyWith<$Res> {
__$AppGlobalStateCopyWithImpl(this._self, this._then);
final _AppGlobalState _self;
final $Res Function(_AppGlobalState) _then;
/// Create a copy of AppGlobalState
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$Res call({
Object? deviceUUID = freezed,
Object? applicationSupportDir = freezed,
Object? applicationBinaryModuleDir = freezed,
Object? networkVersionData = freezed,
Object? themeConf = null,
Object? appLocale = freezed,
Object? appConfBox = freezed,
}) {
return _then(_AppGlobalState(
deviceUUID: freezed == deviceUUID
? _self.deviceUUID
: deviceUUID // ignore: cast_nullable_to_non_nullable
as String?,
applicationSupportDir: freezed == applicationSupportDir
? _self.applicationSupportDir
: applicationSupportDir // ignore: cast_nullable_to_non_nullable
as String?,
applicationBinaryModuleDir: freezed == applicationBinaryModuleDir
? _self.applicationBinaryModuleDir
: applicationBinaryModuleDir // ignore: cast_nullable_to_non_nullable
as String?,
networkVersionData: freezed == networkVersionData
? _self.networkVersionData
: networkVersionData // ignore: cast_nullable_to_non_nullable
as AppVersionData?,
themeConf: null == themeConf
? _self.themeConf
: themeConf // ignore: cast_nullable_to_non_nullable
as ThemeConf,
appLocale: freezed == appLocale
? _self.appLocale
: appLocale // ignore: cast_nullable_to_non_nullable
as Locale?,
appConfBox: freezed == appConfBox
? _self.appConfBox
: appConfBox // ignore: cast_nullable_to_non_nullable
as Box?,
));
}
/// Create a copy of AppGlobalState
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$ThemeConfCopyWith<$Res> get themeConf {
return $ThemeConfCopyWith<$Res>(_self.themeConf, (value) {
return _then(_self.copyWith(themeConf: value));
});
}
}
/// @nodoc
mixin _$ThemeConf {
Color get backgroundColor;
Color get menuColor;
Color get micaColor;
/// Create a copy of ThemeConf
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$ThemeConfCopyWith<ThemeConf> get copyWith =>
_$ThemeConfCopyWithImpl<ThemeConf>(this as ThemeConf, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is ThemeConf &&
(identical(other.backgroundColor, backgroundColor) ||
other.backgroundColor == backgroundColor) &&
(identical(other.menuColor, menuColor) ||
other.menuColor == menuColor) &&
(identical(other.micaColor, micaColor) ||
other.micaColor == micaColor));
}
@override
int get hashCode =>
Object.hash(runtimeType, backgroundColor, menuColor, micaColor);
@override
String toString() {
return 'ThemeConf(backgroundColor: $backgroundColor, menuColor: $menuColor, micaColor: $micaColor)';
}
}
/// @nodoc
abstract mixin class $ThemeConfCopyWith<$Res> {
factory $ThemeConfCopyWith(ThemeConf value, $Res Function(ThemeConf) _then) =
_$ThemeConfCopyWithImpl;
@useResult @useResult
$Res call({Color backgroundColor, Color menuColor, Color micaColor}); $Res call({Color backgroundColor, Color menuColor, Color micaColor});
} }
/// @nodoc /// @nodoc
class __$$ThemeConfImplCopyWithImpl<$Res> class _$ThemeConfCopyWithImpl<$Res> implements $ThemeConfCopyWith<$Res> {
extends _$ThemeConfCopyWithImpl<$Res, _$ThemeConfImpl> _$ThemeConfCopyWithImpl(this._self, this._then);
implements _$$ThemeConfImplCopyWith<$Res> {
__$$ThemeConfImplCopyWithImpl( final ThemeConf _self;
_$ThemeConfImpl _value, $Res Function(_$ThemeConfImpl) _then) final $Res Function(ThemeConf) _then;
: super(_value, _then);
/// Create a copy of ThemeConf /// Create a copy of ThemeConf
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -385,17 +374,17 @@ class __$$ThemeConfImplCopyWithImpl<$Res>
Object? menuColor = null, Object? menuColor = null,
Object? micaColor = null, Object? micaColor = null,
}) { }) {
return _then(_$ThemeConfImpl( return _then(_self.copyWith(
backgroundColor: null == backgroundColor backgroundColor: null == backgroundColor
? _value.backgroundColor ? _self.backgroundColor
: backgroundColor // ignore: cast_nullable_to_non_nullable : backgroundColor // ignore: cast_nullable_to_non_nullable
as Color, as Color,
menuColor: null == menuColor menuColor: null == menuColor
? _value.menuColor ? _self.menuColor
: menuColor // ignore: cast_nullable_to_non_nullable : menuColor // ignore: cast_nullable_to_non_nullable
as Color, as Color,
micaColor: null == micaColor micaColor: null == micaColor
? _value.micaColor ? _self.micaColor
: micaColor // ignore: cast_nullable_to_non_nullable : micaColor // ignore: cast_nullable_to_non_nullable
as Color, as Color,
)); ));
@ -404,8 +393,8 @@ class __$$ThemeConfImplCopyWithImpl<$Res>
/// @nodoc /// @nodoc
class _$ThemeConfImpl implements _ThemeConf { class _ThemeConf implements ThemeConf {
const _$ThemeConfImpl( const _ThemeConf(
{this.backgroundColor = const Color(0xbf132431), {this.backgroundColor = const Color(0xbf132431),
this.menuColor = const Color(0xf2132431), this.menuColor = const Color(0xf2132431),
this.micaColor = const Color(0xff0a3142)}); this.micaColor = const Color(0xff0a3142)});
@ -420,16 +409,19 @@ class _$ThemeConfImpl implements _ThemeConf {
@JsonKey() @JsonKey()
final Color micaColor; final Color micaColor;
/// Create a copy of ThemeConf
/// with the given fields replaced by the non-null parameter values.
@override @override
String toString() { @JsonKey(includeFromJson: false, includeToJson: false)
return 'ThemeConf(backgroundColor: $backgroundColor, menuColor: $menuColor, micaColor: $micaColor)'; @pragma('vm:prefer-inline')
} _$ThemeConfCopyWith<_ThemeConf> get copyWith =>
__$ThemeConfCopyWithImpl<_ThemeConf>(this, _$identity);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$ThemeConfImpl && other is _ThemeConf &&
(identical(other.backgroundColor, backgroundColor) || (identical(other.backgroundColor, backgroundColor) ||
other.backgroundColor == backgroundColor) && other.backgroundColor == backgroundColor) &&
(identical(other.menuColor, menuColor) || (identical(other.menuColor, menuColor) ||
@ -442,32 +434,54 @@ class _$ThemeConfImpl implements _ThemeConf {
int get hashCode => int get hashCode =>
Object.hash(runtimeType, backgroundColor, menuColor, micaColor); Object.hash(runtimeType, backgroundColor, menuColor, micaColor);
@override
String toString() {
return 'ThemeConf(backgroundColor: $backgroundColor, menuColor: $menuColor, micaColor: $micaColor)';
}
}
/// @nodoc
abstract mixin class _$ThemeConfCopyWith<$Res>
implements $ThemeConfCopyWith<$Res> {
factory _$ThemeConfCopyWith(
_ThemeConf value, $Res Function(_ThemeConf) _then) =
__$ThemeConfCopyWithImpl;
@override
@useResult
$Res call({Color backgroundColor, Color menuColor, Color micaColor});
}
/// @nodoc
class __$ThemeConfCopyWithImpl<$Res> implements _$ThemeConfCopyWith<$Res> {
__$ThemeConfCopyWithImpl(this._self, this._then);
final _ThemeConf _self;
final $Res Function(_ThemeConf) _then;
/// Create a copy of ThemeConf /// Create a copy of ThemeConf
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$ThemeConfImplCopyWith<_$ThemeConfImpl> get copyWith => $Res call({
__$$ThemeConfImplCopyWithImpl<_$ThemeConfImpl>(this, _$identity); Object? backgroundColor = null,
Object? menuColor = null,
Object? micaColor = null,
}) {
return _then(_ThemeConf(
backgroundColor: null == backgroundColor
? _self.backgroundColor
: backgroundColor // ignore: cast_nullable_to_non_nullable
as Color,
menuColor: null == menuColor
? _self.menuColor
: menuColor // ignore: cast_nullable_to_non_nullable
as Color,
micaColor: null == micaColor
? _self.micaColor
: micaColor // ignore: cast_nullable_to_non_nullable
as Color,
));
}
} }
abstract class _ThemeConf implements ThemeConf { // dart format on
const factory _ThemeConf(
{final Color backgroundColor,
final Color menuColor,
final Color micaColor}) = _$ThemeConfImpl;
@override
Color get backgroundColor;
@override
Color get menuColor;
@override
Color get micaColor;
/// Create a copy of ThemeConf
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ThemeConfImplCopyWith<_$ThemeConfImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@ -9,16 +9,14 @@ class SystemHelper {
static initPowershellPath() async { static initPowershellPath() async {
try { try {
var result = await Process.run(powershellPath, ["echo", "pong"]); var result = await Process.run(powershellPath, ["echo", "pong"]);
if (!result.stdout.toString().startsWith("pong") && if (!result.stdout.toString().startsWith("pong") && powershellPath == "powershell.exe") {
powershellPath == "powershell.exe") {
throw "powershell check failed"; throw "powershell check failed";
} }
} catch (e) { } catch (e) {
Map<String, String> envVars = Platform.environment; Map<String, String> envVars = Platform.environment;
final systemRoot = envVars["SYSTEMROOT"]; final systemRoot = envVars["SYSTEMROOT"];
if (systemRoot != null) { if (systemRoot != null) {
final autoSearchPath = final autoSearchPath = "$systemRoot\\System32\\WindowsPowerShell\\v1.0\\powershell.exe";
"$systemRoot\\System32\\WindowsPowerShell\\v1.0\\powershell.exe";
dPrint("auto search powershell path === $autoSearchPath"); dPrint("auto search powershell path === $autoSearchPath");
powershellPath = autoSearchPath; powershellPath = autoSearchPath;
} }
@ -35,8 +33,7 @@ class SystemHelper {
"\"ForcedPhysicalSectorSizeInBytes\"" "\"ForcedPhysicalSectorSizeInBytes\""
]); ]);
dPrint("checkNvmePatchStatus result ==== ${result.stdout}"); dPrint("checkNvmePatchStatus result ==== ${result.stdout}");
if (result.stderr == "" && if (result.stderr == "" && result.stdout.toString().contains("{* 4095}")) {
result.stdout.toString().contains("{* 4095}")) {
return true; return true;
} else { } else {
return false; return false;
@ -100,9 +97,8 @@ class SystemHelper {
"$programDataPath\\Microsoft\\Windows\\Start Menu\\Programs\\Roberts Space Industries\\RSI Launcher.lnk"; "$programDataPath\\Microsoft\\Windows\\Start Menu\\Programs\\Roberts Space Industries\\RSI Launcher.lnk";
final rsiLinkFile = File(rsiFilePath); final rsiLinkFile = File(rsiFilePath);
if (await rsiLinkFile.exists()) { if (await rsiLinkFile.exists()) {
final r = await Process.run(SystemHelper.powershellPath, [ final r = await Process.run(SystemHelper.powershellPath,
"(New-Object -ComObject WScript.Shell).CreateShortcut(\"$rsiFilePath\").targetpath" ["(New-Object -ComObject WScript.Shell).CreateShortcut(\"$rsiFilePath\").targetpath"]);
]);
if (r.stdout.toString().contains("RSI Launcher.exe")) { if (r.stdout.toString().contains("RSI Launcher.exe")) {
final start = r.stdout.toString().split("RSI Launcher.exe"); final start = r.stdout.toString().split("RSI Launcher.exe");
if (skipEXE) { if (skipEXE) {
@ -115,8 +111,7 @@ class SystemHelper {
} }
static killRSILauncher() async { static killRSILauncher() async {
var psr = await Process.run( var psr = await Process.run(powershellPath, ["ps", "\"RSI Launcher\"", "|select -expand id"]);
powershellPath, ["ps", "\"RSI Launcher\"", "|select -expand id"]);
if (psr.stderr == "") { if (psr.stderr == "") {
for (var value in (psr.stdout ?? "").toString().split("\n")) { for (var value in (psr.stdout ?? "").toString().split("\n")) {
dPrint(value); dPrint(value);
@ -128,11 +123,20 @@ class SystemHelper {
} }
static Future<List<String>> getPID(String name) async { static Future<List<String>> getPID(String name) async {
final r = await Process.run(powershellPath, ["(ps $name).Id"]); try {
final str = r.stdout.toString().trim(); final r = await Process.run(powershellPath, ["(ps $name).Id"]);
dPrint(str); if (r.stderr.toString().trim().isNotEmpty) {
if (str.isEmpty) return []; dPrint("getPID Error: ${r.stderr}");
return str.split("\n"); return [];
}
final str = r.stdout.toString().trim();
dPrint("getPID result: $str");
if (str.isEmpty) return [];
return str.split("\n");
} catch (e) {
dPrint("getPID Error: $e");
return [];
}
} }
static checkAndLaunchRSILauncher(String path) async { static checkAndLaunchRSILauncher(String path) async {
@ -157,28 +161,23 @@ class SystemHelper {
} }
static Future<int> getSystemMemorySizeGB() async { static Future<int> getSystemMemorySizeGB() async {
final r = await Process.run(powershellPath, [ final r = await Process.run(
"(Get-CimInstance Win32_PhysicalMemory | Measure-Object -Property capacity -Sum).sum /1gb" powershellPath, ["(Get-CimInstance Win32_PhysicalMemory | Measure-Object -Property capacity -Sum).sum /1gb"]);
]);
return int.tryParse(r.stdout.toString().trim()) ?? 0; return int.tryParse(r.stdout.toString().trim()) ?? 0;
} }
static Future<String> getSystemCimInstance(String win32InstanceName, static Future<String> getSystemCimInstance(String win32InstanceName, {pathName = "Name"}) async {
{pathName = "Name"}) async { final r = await Process.run(powershellPath, ["(Get-CimInstance $win32InstanceName).$pathName"]);
final r = await Process.run(
powershellPath, ["(Get-CimInstance $win32InstanceName).$pathName"]);
return r.stdout.toString().trim(); return r.stdout.toString().trim();
} }
static Future<String> getSystemName() async { static Future<String> getSystemName() async {
final r = await Process.run( final r = await Process.run(powershellPath, ["(Get-ComputerInfo | Select-Object -expand OsName)"]);
powershellPath, ["(Get-ComputerInfo | Select-Object -expand OsName)"]);
return r.stdout.toString().trim(); return r.stdout.toString().trim();
} }
static Future<String> getCpuName() async { static Future<String> getCpuName() async {
final r = await Process.run( final r = await Process.run(powershellPath, ["(Get-WmiObject -Class Win32_Processor).Name"]);
powershellPath, ["(Get-WmiObject -Class Win32_Processor).Name"]);
return r.stdout.toString().trim(); return r.stdout.toString().trim();
} }
@ -197,8 +196,7 @@ foreach ($adapter in $adapterMemory) {
} }
static Future<String> getDiskInfo() async { static Future<String> getDiskInfo() async {
return (await Process.run(powershellPath, return (await Process.run(powershellPath, ["Get-PhysicalDisk | format-table BusType,FriendlyName,Size"]))
["Get-PhysicalDisk | format-table BusType,FriendlyName,Size"]))
.stdout .stdout
.toString() .toString()
.trim(); .trim();
@ -228,17 +226,15 @@ foreach ($adapter in $adapterMemory) {
} }
static Future<int> getNumberOfLogicalProcessors() async { static Future<int> getNumberOfLogicalProcessors() async {
final cpuNumberResult = await Process.run(powershellPath, final cpuNumberResult =
["(Get-WmiObject -Class Win32_Processor).NumberOfLogicalProcessors"]); await Process.run(powershellPath, ["(Get-WmiObject -Class Win32_Processor).NumberOfLogicalProcessors"]);
if (cpuNumberResult.exitCode != 0) return 0; if (cpuNumberResult.exitCode != 0) return 0;
return int.tryParse(cpuNumberResult.stdout.toString().trim()) ?? 0; return int.tryParse(cpuNumberResult.stdout.toString().trim()) ?? 0;
} }
static Future<String?> getCpuAffinity() async { static Future<String?> getCpuAffinity() async {
final confBox = await Hive.openBox("app_conf"); final confBox = await Hive.openBox("app_conf");
final eCoreCount = int.tryParse( final eCoreCount = int.tryParse(confBox.get("gameLaunch_eCore_count", defaultValue: "0")) ?? 0;
confBox.get("gameLaunch_eCore_count", defaultValue: "0")) ??
0;
final cpuNumber = await getNumberOfLogicalProcessors(); final cpuNumber = await getNumberOfLogicalProcessors();
if (cpuNumber == 0 || eCoreCount == 0 || eCoreCount > cpuNumber) { if (cpuNumber == 0 || eCoreCount == 0 || eCoreCount > cpuNumber) {
return null; return null;
@ -255,17 +251,14 @@ foreach ($adapter in $adapterMemory) {
final binaryString = sb.toString(); final binaryString = sb.toString();
int hexDigits = (binaryString.length / 4).ceil(); int hexDigits = (binaryString.length / 4).ceil();
dPrint("Affinity sb ==== $sb"); dPrint("Affinity sb ==== $sb");
return int.parse(binaryString, radix: 2) return int.parse(binaryString, radix: 2).toRadixString(16).padLeft(hexDigits, '0').toUpperCase();
.toRadixString(16)
.padLeft(hexDigits, '0')
.toUpperCase();
} }
static Future openDir(path, {bool isFile = false}) async { static Future openDir(path, {bool isFile = false}) async {
dPrint("SystemHelper.openDir path === $path"); dPrint("SystemHelper.openDir path === $path");
if (Platform.isWindows) { if (Platform.isWindows) {
await Process.run(SystemHelper.powershellPath, await Process.run(
["explorer.exe", isFile ? "/select,$path" : "\"/select,\"$path\"\""]); SystemHelper.powershellPath, ["explorer.exe", isFile ? "/select,$path" : "\"/select,\"$path\"\""]);
} }
} }

View File

@ -18,7 +18,7 @@ part 'multi_window_manager.freezed.dart';
part 'multi_window_manager.g.dart'; part 'multi_window_manager.g.dart';
@freezed @freezed
class MultiWindowAppState with _$MultiWindowAppState { abstract class MultiWindowAppState with _$MultiWindowAppState {
const factory MultiWindowAppState({ const factory MultiWindowAppState({
required String backgroundColor, required String backgroundColor,
required String menuColor, required String menuColor,

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file // coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint // ignore_for_file: type=lint
@ -9,107 +10,70 @@ part of 'multi_window_manager.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; 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');
MultiWindowAppState _$MultiWindowAppStateFromJson(Map<String, dynamic> json) {
return _MultiWindowAppState.fromJson(json);
}
/// @nodoc /// @nodoc
mixin _$MultiWindowAppState { mixin _$MultiWindowAppState {
String get backgroundColor => throw _privateConstructorUsedError; String get backgroundColor;
String get menuColor => throw _privateConstructorUsedError; String get menuColor;
String get micaColor => throw _privateConstructorUsedError; String get micaColor;
List<String> get gameInstallPaths => throw _privateConstructorUsedError; List<String> get gameInstallPaths;
String? get languageCode => throw _privateConstructorUsedError; String? get languageCode;
String? get countryCode => throw _privateConstructorUsedError; String? get countryCode;
/// Serializes this MultiWindowAppState to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of MultiWindowAppState /// Create a copy of MultiWindowAppState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
$MultiWindowAppStateCopyWith<MultiWindowAppState> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $MultiWindowAppStateCopyWith<$Res> {
factory $MultiWindowAppStateCopyWith(
MultiWindowAppState value, $Res Function(MultiWindowAppState) then) =
_$MultiWindowAppStateCopyWithImpl<$Res, MultiWindowAppState>;
@useResult
$Res call(
{String backgroundColor,
String menuColor,
String micaColor,
List<String> gameInstallPaths,
String? languageCode,
String? countryCode});
}
/// @nodoc
class _$MultiWindowAppStateCopyWithImpl<$Res, $Val extends MultiWindowAppState>
implements $MultiWindowAppStateCopyWith<$Res> {
_$MultiWindowAppStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of MultiWindowAppState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
$MultiWindowAppStateCopyWith<MultiWindowAppState> get copyWith =>
_$MultiWindowAppStateCopyWithImpl<MultiWindowAppState>(
this as MultiWindowAppState, _$identity);
/// Serializes this MultiWindowAppState to a JSON map.
Map<String, dynamic> toJson();
@override @override
$Res call({ bool operator ==(Object other) {
Object? backgroundColor = null, return identical(this, other) ||
Object? menuColor = null, (other.runtimeType == runtimeType &&
Object? micaColor = null, other is MultiWindowAppState &&
Object? gameInstallPaths = null, (identical(other.backgroundColor, backgroundColor) ||
Object? languageCode = freezed, other.backgroundColor == backgroundColor) &&
Object? countryCode = freezed, (identical(other.menuColor, menuColor) ||
}) { other.menuColor == menuColor) &&
return _then(_value.copyWith( (identical(other.micaColor, micaColor) ||
backgroundColor: null == backgroundColor other.micaColor == micaColor) &&
? _value.backgroundColor const DeepCollectionEquality()
: backgroundColor // ignore: cast_nullable_to_non_nullable .equals(other.gameInstallPaths, gameInstallPaths) &&
as String, (identical(other.languageCode, languageCode) ||
menuColor: null == menuColor other.languageCode == languageCode) &&
? _value.menuColor (identical(other.countryCode, countryCode) ||
: menuColor // ignore: cast_nullable_to_non_nullable other.countryCode == countryCode));
as String, }
micaColor: null == micaColor
? _value.micaColor @JsonKey(includeFromJson: false, includeToJson: false)
: micaColor // ignore: cast_nullable_to_non_nullable @override
as String, int get hashCode => Object.hash(
gameInstallPaths: null == gameInstallPaths runtimeType,
? _value.gameInstallPaths backgroundColor,
: gameInstallPaths // ignore: cast_nullable_to_non_nullable menuColor,
as List<String>, micaColor,
languageCode: freezed == languageCode const DeepCollectionEquality().hash(gameInstallPaths),
? _value.languageCode languageCode,
: languageCode // ignore: cast_nullable_to_non_nullable countryCode);
as String?,
countryCode: freezed == countryCode @override
? _value.countryCode String toString() {
: countryCode // ignore: cast_nullable_to_non_nullable return 'MultiWindowAppState(backgroundColor: $backgroundColor, menuColor: $menuColor, micaColor: $micaColor, gameInstallPaths: $gameInstallPaths, languageCode: $languageCode, countryCode: $countryCode)';
as String?,
) as $Val);
} }
} }
/// @nodoc /// @nodoc
abstract class _$$MultiWindowAppStateImplCopyWith<$Res> abstract mixin class $MultiWindowAppStateCopyWith<$Res> {
implements $MultiWindowAppStateCopyWith<$Res> { factory $MultiWindowAppStateCopyWith(
factory _$$MultiWindowAppStateImplCopyWith(_$MultiWindowAppStateImpl value, MultiWindowAppState value, $Res Function(MultiWindowAppState) _then) =
$Res Function(_$MultiWindowAppStateImpl) then) = _$MultiWindowAppStateCopyWithImpl;
__$$MultiWindowAppStateImplCopyWithImpl<$Res>;
@override
@useResult @useResult
$Res call( $Res call(
{String backgroundColor, {String backgroundColor,
@ -121,12 +85,12 @@ abstract class _$$MultiWindowAppStateImplCopyWith<$Res>
} }
/// @nodoc /// @nodoc
class __$$MultiWindowAppStateImplCopyWithImpl<$Res> class _$MultiWindowAppStateCopyWithImpl<$Res>
extends _$MultiWindowAppStateCopyWithImpl<$Res, _$MultiWindowAppStateImpl> implements $MultiWindowAppStateCopyWith<$Res> {
implements _$$MultiWindowAppStateImplCopyWith<$Res> { _$MultiWindowAppStateCopyWithImpl(this._self, this._then);
__$$MultiWindowAppStateImplCopyWithImpl(_$MultiWindowAppStateImpl _value,
$Res Function(_$MultiWindowAppStateImpl) _then) final MultiWindowAppState _self;
: super(_value, _then); final $Res Function(MultiWindowAppState) _then;
/// Create a copy of MultiWindowAppState /// Create a copy of MultiWindowAppState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -140,29 +104,29 @@ class __$$MultiWindowAppStateImplCopyWithImpl<$Res>
Object? languageCode = freezed, Object? languageCode = freezed,
Object? countryCode = freezed, Object? countryCode = freezed,
}) { }) {
return _then(_$MultiWindowAppStateImpl( return _then(_self.copyWith(
backgroundColor: null == backgroundColor backgroundColor: null == backgroundColor
? _value.backgroundColor ? _self.backgroundColor
: backgroundColor // ignore: cast_nullable_to_non_nullable : backgroundColor // ignore: cast_nullable_to_non_nullable
as String, as String,
menuColor: null == menuColor menuColor: null == menuColor
? _value.menuColor ? _self.menuColor
: menuColor // ignore: cast_nullable_to_non_nullable : menuColor // ignore: cast_nullable_to_non_nullable
as String, as String,
micaColor: null == micaColor micaColor: null == micaColor
? _value.micaColor ? _self.micaColor
: micaColor // ignore: cast_nullable_to_non_nullable : micaColor // ignore: cast_nullable_to_non_nullable
as String, as String,
gameInstallPaths: null == gameInstallPaths gameInstallPaths: null == gameInstallPaths
? _value._gameInstallPaths ? _self.gameInstallPaths
: gameInstallPaths // ignore: cast_nullable_to_non_nullable : gameInstallPaths // ignore: cast_nullable_to_non_nullable
as List<String>, as List<String>,
languageCode: freezed == languageCode languageCode: freezed == languageCode
? _value.languageCode ? _self.languageCode
: languageCode // ignore: cast_nullable_to_non_nullable : languageCode // ignore: cast_nullable_to_non_nullable
as String?, as String?,
countryCode: freezed == countryCode countryCode: freezed == countryCode
? _value.countryCode ? _self.countryCode
: countryCode // ignore: cast_nullable_to_non_nullable : countryCode // ignore: cast_nullable_to_non_nullable
as String?, as String?,
)); ));
@ -171,8 +135,8 @@ class __$$MultiWindowAppStateImplCopyWithImpl<$Res>
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _$MultiWindowAppStateImpl implements _MultiWindowAppState { class _MultiWindowAppState implements MultiWindowAppState {
const _$MultiWindowAppStateImpl( const _MultiWindowAppState(
{required this.backgroundColor, {required this.backgroundColor,
required this.menuColor, required this.menuColor,
required this.micaColor, required this.micaColor,
@ -180,9 +144,8 @@ class _$MultiWindowAppStateImpl implements _MultiWindowAppState {
this.languageCode, this.languageCode,
this.countryCode}) this.countryCode})
: _gameInstallPaths = gameInstallPaths; : _gameInstallPaths = gameInstallPaths;
factory _MultiWindowAppState.fromJson(Map<String, dynamic> json) =>
factory _$MultiWindowAppStateImpl.fromJson(Map<String, dynamic> json) => _$MultiWindowAppStateFromJson(json);
_$$MultiWindowAppStateImplFromJson(json);
@override @override
final String backgroundColor; final String backgroundColor;
@ -204,16 +167,27 @@ class _$MultiWindowAppStateImpl implements _MultiWindowAppState {
@override @override
final String? countryCode; final String? countryCode;
/// Create a copy of MultiWindowAppState
/// with the given fields replaced by the non-null parameter values.
@override @override
String toString() { @JsonKey(includeFromJson: false, includeToJson: false)
return 'MultiWindowAppState(backgroundColor: $backgroundColor, menuColor: $menuColor, micaColor: $micaColor, gameInstallPaths: $gameInstallPaths, languageCode: $languageCode, countryCode: $countryCode)'; @pragma('vm:prefer-inline')
_$MultiWindowAppStateCopyWith<_MultiWindowAppState> get copyWith =>
__$MultiWindowAppStateCopyWithImpl<_MultiWindowAppState>(
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$MultiWindowAppStateToJson(
this,
);
} }
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$MultiWindowAppStateImpl && other is _MultiWindowAppState &&
(identical(other.backgroundColor, backgroundColor) || (identical(other.backgroundColor, backgroundColor) ||
other.backgroundColor == backgroundColor) && other.backgroundColor == backgroundColor) &&
(identical(other.menuColor, menuColor) || (identical(other.menuColor, menuColor) ||
@ -239,52 +213,76 @@ class _$MultiWindowAppStateImpl implements _MultiWindowAppState {
languageCode, languageCode,
countryCode); countryCode);
/// Create a copy of MultiWindowAppState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') String toString() {
_$$MultiWindowAppStateImplCopyWith<_$MultiWindowAppStateImpl> get copyWith => return 'MultiWindowAppState(backgroundColor: $backgroundColor, menuColor: $menuColor, micaColor: $micaColor, gameInstallPaths: $gameInstallPaths, languageCode: $languageCode, countryCode: $countryCode)';
__$$MultiWindowAppStateImplCopyWithImpl<_$MultiWindowAppStateImpl>(
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$MultiWindowAppStateImplToJson(
this,
);
} }
} }
abstract class _MultiWindowAppState implements MultiWindowAppState { /// @nodoc
const factory _MultiWindowAppState( abstract mixin class _$MultiWindowAppStateCopyWith<$Res>
{required final String backgroundColor, implements $MultiWindowAppStateCopyWith<$Res> {
required final String menuColor, factory _$MultiWindowAppStateCopyWith(_MultiWindowAppState value,
required final String micaColor, $Res Function(_MultiWindowAppState) _then) =
required final List<String> gameInstallPaths, __$MultiWindowAppStateCopyWithImpl;
final String? languageCode, @override
final String? countryCode}) = _$MultiWindowAppStateImpl; @useResult
$Res call(
{String backgroundColor,
String menuColor,
String micaColor,
List<String> gameInstallPaths,
String? languageCode,
String? countryCode});
}
factory _MultiWindowAppState.fromJson(Map<String, dynamic> json) = /// @nodoc
_$MultiWindowAppStateImpl.fromJson; class __$MultiWindowAppStateCopyWithImpl<$Res>
implements _$MultiWindowAppStateCopyWith<$Res> {
__$MultiWindowAppStateCopyWithImpl(this._self, this._then);
@override final _MultiWindowAppState _self;
String get backgroundColor; final $Res Function(_MultiWindowAppState) _then;
@override
String get menuColor;
@override
String get micaColor;
@override
List<String> get gameInstallPaths;
@override
String? get languageCode;
@override
String? get countryCode;
/// Create a copy of MultiWindowAppState /// Create a copy of MultiWindowAppState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@override @override
@JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline')
_$$MultiWindowAppStateImplCopyWith<_$MultiWindowAppStateImpl> get copyWith => $Res call({
throw _privateConstructorUsedError; Object? backgroundColor = null,
Object? menuColor = null,
Object? micaColor = null,
Object? gameInstallPaths = null,
Object? languageCode = freezed,
Object? countryCode = freezed,
}) {
return _then(_MultiWindowAppState(
backgroundColor: null == backgroundColor
? _self.backgroundColor
: backgroundColor // ignore: cast_nullable_to_non_nullable
as String,
menuColor: null == menuColor
? _self.menuColor
: menuColor // ignore: cast_nullable_to_non_nullable
as String,
micaColor: null == micaColor
? _self.micaColor
: micaColor // ignore: cast_nullable_to_non_nullable
as String,
gameInstallPaths: null == gameInstallPaths
? _self._gameInstallPaths
: gameInstallPaths // ignore: cast_nullable_to_non_nullable
as List<String>,
languageCode: freezed == languageCode
? _self.languageCode
: languageCode // ignore: cast_nullable_to_non_nullable
as String?,
countryCode: freezed == countryCode
? _self.countryCode
: countryCode // ignore: cast_nullable_to_non_nullable
as String?,
));
}
} }
// dart format on

View File

@ -6,9 +6,8 @@ part of 'multi_window_manager.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_$MultiWindowAppStateImpl _$$MultiWindowAppStateImplFromJson( _MultiWindowAppState _$MultiWindowAppStateFromJson(Map<String, dynamic> json) =>
Map<String, dynamic> json) => _MultiWindowAppState(
_$MultiWindowAppStateImpl(
backgroundColor: json['backgroundColor'] as String, backgroundColor: json['backgroundColor'] as String,
menuColor: json['menuColor'] as String, menuColor: json['menuColor'] as String,
micaColor: json['micaColor'] as String, micaColor: json['micaColor'] as String,
@ -19,8 +18,8 @@ _$MultiWindowAppStateImpl _$$MultiWindowAppStateImplFromJson(
countryCode: json['countryCode'] as String?, countryCode: json['countryCode'] as String?,
); );
Map<String, dynamic> _$$MultiWindowAppStateImplToJson( Map<String, dynamic> _$MultiWindowAppStateToJson(
_$MultiWindowAppStateImpl instance) => _MultiWindowAppState instance) =>
<String, dynamic>{ <String, dynamic>{
'backgroundColor': instance.backgroundColor, 'backgroundColor': instance.backgroundColor,
'menuColor': instance.menuColor, 'menuColor': instance.menuColor,

View File

@ -5,7 +5,7 @@ part 'nav_api_data.freezed.dart';
part 'nav_api_data.g.dart'; part 'nav_api_data.g.dart';
@freezed @freezed
class NavApiDocsItemData with _$NavApiDocsItemData { abstract class NavApiDocsItemData with _$NavApiDocsItemData {
const factory NavApiDocsItemData({ const factory NavApiDocsItemData({
@Default('') @JsonKey(name: 'id') String id, @Default('') @JsonKey(name: 'id') String id,
@Default('') @JsonKey(name: 'name') String name, @Default('') @JsonKey(name: 'name') String name,
@ -31,7 +31,7 @@ class NavApiDocsItemData with _$NavApiDocsItemData {
} }
@freezed @freezed
class NavApiDocsItemImageData with _$NavApiDocsItemImageData { abstract class NavApiDocsItemImageData with _$NavApiDocsItemImageData {
const factory NavApiDocsItemImageData({ const factory NavApiDocsItemImageData({
@Default('') @JsonKey(name: 'id') String id, @Default('') @JsonKey(name: 'id') String id,
@Default(NavApiDocsItemImageCreatedByData()) @Default(NavApiDocsItemImageCreatedByData())
@ -63,7 +63,7 @@ class NavApiDocsItemImageData with _$NavApiDocsItemImageData {
} }
@freezed @freezed
class NavApiDocsItemImageCreatedByData with _$NavApiDocsItemImageCreatedByData { abstract class NavApiDocsItemImageCreatedByData with _$NavApiDocsItemImageCreatedByData {
const factory NavApiDocsItemImageCreatedByData({ const factory NavApiDocsItemImageCreatedByData({
@Default('') @JsonKey(name: 'id') String id, @Default('') @JsonKey(name: 'id') String id,
@Default('') @JsonKey(name: 'sub') String sub, @Default('') @JsonKey(name: 'sub') String sub,
@ -87,7 +87,7 @@ class NavApiDocsItemImageCreatedByData with _$NavApiDocsItemImageCreatedByData {
} }
@freezed @freezed
class NavApiDocsItemImageSizesThumbnailData abstract class NavApiDocsItemImageSizesThumbnailData
with _$NavApiDocsItemImageSizesThumbnailData { with _$NavApiDocsItemImageSizesThumbnailData {
const factory NavApiDocsItemImageSizesThumbnailData({ const factory NavApiDocsItemImageSizesThumbnailData({
@Default('') @JsonKey(name: 'url') String url, @Default('') @JsonKey(name: 'url') String url,
@ -106,7 +106,7 @@ class NavApiDocsItemImageSizesThumbnailData
} }
@freezed @freezed
class NavApiDocsItemImageSizesData with _$NavApiDocsItemImageSizesData { abstract class NavApiDocsItemImageSizesData with _$NavApiDocsItemImageSizesData {
const factory NavApiDocsItemImageSizesData({ const factory NavApiDocsItemImageSizesData({
@Default(NavApiDocsItemImageSizesThumbnailData()) @Default(NavApiDocsItemImageSizesThumbnailData())
@JsonKey(name: 'thumbnail') @JsonKey(name: 'thumbnail')
@ -132,7 +132,7 @@ class NavApiDocsItemImageSizesData with _$NavApiDocsItemImageSizesData {
} }
@freezed @freezed
class NavApiDocsItemImageSizesPreloadData abstract class NavApiDocsItemImageSizesPreloadData
with _$NavApiDocsItemImageSizesPreloadData { with _$NavApiDocsItemImageSizesPreloadData {
const factory NavApiDocsItemImageSizesPreloadData({ const factory NavApiDocsItemImageSizesPreloadData({
@JsonKey(name: 'url') dynamic url, @JsonKey(name: 'url') dynamic url,
@ -151,7 +151,7 @@ class NavApiDocsItemImageSizesPreloadData
} }
@freezed @freezed
class NavApiDocsItemImageSizesCardData with _$NavApiDocsItemImageSizesCardData { abstract class NavApiDocsItemImageSizesCardData with _$NavApiDocsItemImageSizesCardData {
const factory NavApiDocsItemImageSizesCardData({ const factory NavApiDocsItemImageSizesCardData({
@Default('') @JsonKey(name: 'url') String url, @Default('') @JsonKey(name: 'url') String url,
@Default(0) @JsonKey(name: 'width') int width, @Default(0) @JsonKey(name: 'width') int width,
@ -169,7 +169,7 @@ class NavApiDocsItemImageSizesCardData with _$NavApiDocsItemImageSizesCardData {
} }
@freezed @freezed
class NavApiDocsItemImageSizesTabletData abstract class NavApiDocsItemImageSizesTabletData
with _$NavApiDocsItemImageSizesTabletData { with _$NavApiDocsItemImageSizesTabletData {
const factory NavApiDocsItemImageSizesTabletData({ const factory NavApiDocsItemImageSizesTabletData({
@Default('') @JsonKey(name: 'url') String url, @Default('') @JsonKey(name: 'url') String url,
@ -188,7 +188,7 @@ class NavApiDocsItemImageSizesTabletData
} }
@freezed @freezed
class NavApiDocsItemImageSizesAvatarData abstract class NavApiDocsItemImageSizesAvatarData
with _$NavApiDocsItemImageSizesAvatarData { with _$NavApiDocsItemImageSizesAvatarData {
const factory NavApiDocsItemImageSizesAvatarData({ const factory NavApiDocsItemImageSizesAvatarData({
@Default('') @JsonKey(name: 'url') String url, @Default('') @JsonKey(name: 'url') String url,
@ -207,7 +207,7 @@ class NavApiDocsItemImageSizesAvatarData
} }
@freezed @freezed
class NavApiDocsItemTagsItemData with _$NavApiDocsItemTagsItemData { abstract class NavApiDocsItemTagsItemData with _$NavApiDocsItemTagsItemData {
const factory NavApiDocsItemTagsItemData({ const factory NavApiDocsItemTagsItemData({
@Default('') @JsonKey(name: 'id') String id, @Default('') @JsonKey(name: 'id') String id,
@Default('') @JsonKey(name: 'name') String name, @Default('') @JsonKey(name: 'name') String name,
@ -223,7 +223,7 @@ class NavApiDocsItemTagsItemData with _$NavApiDocsItemTagsItemData {
} }
@freezed @freezed
class NavApiData with _$NavApiData { abstract class NavApiData with _$NavApiData {
const factory NavApiData({ const factory NavApiData({
@Default(<NavApiDocsItemData>[]) @Default(<NavApiDocsItemData>[])
@JsonKey(name: 'docs') @JsonKey(name: 'docs')

File diff suppressed because it is too large Load Diff

View File

@ -6,9 +6,8 @@ part of 'nav_api_data.dart';
// JsonSerializableGenerator // JsonSerializableGenerator
// ************************************************************************** // **************************************************************************
_$NavApiDocsItemDataImpl _$$NavApiDocsItemDataImplFromJson( _NavApiDocsItemData _$NavApiDocsItemDataFromJson(Map<String, dynamic> json) =>
Map<String, dynamic> json) => _NavApiDocsItemData(
_$NavApiDocsItemDataImpl(
id: json['id'] as String? ?? '', id: json['id'] as String? ?? '',
name: json['name'] as String? ?? '', name: json['name'] as String? ?? '',
slug: json['slug'] as String? ?? '', slug: json['slug'] as String? ?? '',
@ -29,8 +28,7 @@ _$NavApiDocsItemDataImpl _$$NavApiDocsItemDataImplFromJson(
createdAt: json['createdAt'] as String? ?? '', createdAt: json['createdAt'] as String? ?? '',
); );
Map<String, dynamic> _$$NavApiDocsItemDataImplToJson( Map<String, dynamic> _$NavApiDocsItemDataToJson(_NavApiDocsItemData instance) =>
_$NavApiDocsItemDataImpl instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'name': instance.name, 'name': instance.name,
@ -45,9 +43,9 @@ Map<String, dynamic> _$$NavApiDocsItemDataImplToJson(
'createdAt': instance.createdAt, 'createdAt': instance.createdAt,
}; };
_$NavApiDocsItemImageDataImpl _$$NavApiDocsItemImageDataImplFromJson( _NavApiDocsItemImageData _$NavApiDocsItemImageDataFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$NavApiDocsItemImageDataImpl( _NavApiDocsItemImageData(
id: json['id'] as String? ?? '', id: json['id'] as String? ?? '',
createdBy: json['createdBy'] == null createdBy: json['createdBy'] == null
? const NavApiDocsItemImageCreatedByData() ? const NavApiDocsItemImageCreatedByData()
@ -73,8 +71,8 @@ _$NavApiDocsItemImageDataImpl _$$NavApiDocsItemImageDataImplFromJson(
json['sizes'] as Map<String, dynamic>), json['sizes'] as Map<String, dynamic>),
); );
Map<String, dynamic> _$$NavApiDocsItemImageDataImplToJson( Map<String, dynamic> _$NavApiDocsItemImageDataToJson(
_$NavApiDocsItemImageDataImpl instance) => _NavApiDocsItemImageData instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'createdBy': instance.createdBy, 'createdBy': instance.createdBy,
@ -95,29 +93,27 @@ Map<String, dynamic> _$$NavApiDocsItemImageDataImplToJson(
'sizes': instance.sizes, 'sizes': instance.sizes,
}; };
_$NavApiDocsItemImageCreatedByDataImpl _NavApiDocsItemImageCreatedByData _$NavApiDocsItemImageCreatedByDataFromJson(
_$$NavApiDocsItemImageCreatedByDataImplFromJson( Map<String, dynamic> json) =>
Map<String, dynamic> json) => _NavApiDocsItemImageCreatedByData(
_$NavApiDocsItemImageCreatedByDataImpl( id: json['id'] as String? ?? '',
id: json['id'] as String? ?? '', sub: json['sub'] as String? ?? '',
sub: json['sub'] as String? ?? '', externalProvider: json['external_provider'] as String? ?? '',
externalProvider: json['external_provider'] as String? ?? '', username: json['username'] as String? ?? '',
username: json['username'] as String? ?? '', name: json['name'] as String? ?? '',
name: json['name'] as String? ?? '', roles:
roles: (json['roles'] as List<dynamic>?) (json['roles'] as List<dynamic>?)?.map((e) => e as String).toList() ??
?.map((e) => e as String)
.toList() ??
const <String>[], const <String>[],
avatarUrl: json['avatar_url'] as String? ?? '', avatarUrl: json['avatar_url'] as String? ?? '',
updatedAt: json['updatedAt'] as String? ?? '', updatedAt: json['updatedAt'] as String? ?? '',
createdAt: json['createdAt'] as String? ?? '', createdAt: json['createdAt'] as String? ?? '',
email: json['email'] as String? ?? '', email: json['email'] as String? ?? '',
loginAttempts: (json['loginAttempts'] as num?)?.toInt() ?? 0, loginAttempts: (json['loginAttempts'] as num?)?.toInt() ?? 0,
avatar: json['avatar'] as String? ?? '', avatar: json['avatar'] as String? ?? '',
); );
Map<String, dynamic> _$$NavApiDocsItemImageCreatedByDataImplToJson( Map<String, dynamic> _$NavApiDocsItemImageCreatedByDataToJson(
_$NavApiDocsItemImageCreatedByDataImpl instance) => _NavApiDocsItemImageCreatedByData instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'sub': instance.sub, 'sub': instance.sub,
@ -133,10 +129,10 @@ Map<String, dynamic> _$$NavApiDocsItemImageCreatedByDataImplToJson(
'avatar': instance.avatar, 'avatar': instance.avatar,
}; };
_$NavApiDocsItemImageSizesThumbnailDataImpl _NavApiDocsItemImageSizesThumbnailData
_$$NavApiDocsItemImageSizesThumbnailDataImplFromJson( _$NavApiDocsItemImageSizesThumbnailDataFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$NavApiDocsItemImageSizesThumbnailDataImpl( _NavApiDocsItemImageSizesThumbnailData(
url: json['url'] as String? ?? '', url: json['url'] as String? ?? '',
width: (json['width'] as num?)?.toInt() ?? 0, width: (json['width'] as num?)?.toInt() ?? 0,
height: (json['height'] as num?)?.toInt() ?? 0, height: (json['height'] as num?)?.toInt() ?? 0,
@ -145,8 +141,8 @@ _$NavApiDocsItemImageSizesThumbnailDataImpl
filename: json['filename'] as String? ?? '', filename: json['filename'] as String? ?? '',
); );
Map<String, dynamic> _$$NavApiDocsItemImageSizesThumbnailDataImplToJson( Map<String, dynamic> _$NavApiDocsItemImageSizesThumbnailDataToJson(
_$NavApiDocsItemImageSizesThumbnailDataImpl instance) => _NavApiDocsItemImageSizesThumbnailData instance) =>
<String, dynamic>{ <String, dynamic>{
'url': instance.url, 'url': instance.url,
'width': instance.width, 'width': instance.width,
@ -156,9 +152,9 @@ Map<String, dynamic> _$$NavApiDocsItemImageSizesThumbnailDataImplToJson(
'filename': instance.filename, 'filename': instance.filename,
}; };
_$NavApiDocsItemImageSizesDataImpl _$$NavApiDocsItemImageSizesDataImplFromJson( _NavApiDocsItemImageSizesData _$NavApiDocsItemImageSizesDataFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$NavApiDocsItemImageSizesDataImpl( _NavApiDocsItemImageSizesData(
thumbnail: json['thumbnail'] == null thumbnail: json['thumbnail'] == null
? const NavApiDocsItemImageSizesThumbnailData() ? const NavApiDocsItemImageSizesThumbnailData()
: NavApiDocsItemImageSizesThumbnailData.fromJson( : NavApiDocsItemImageSizesThumbnailData.fromJson(
@ -181,8 +177,8 @@ _$NavApiDocsItemImageSizesDataImpl _$$NavApiDocsItemImageSizesDataImplFromJson(
json['avatar'] as Map<String, dynamic>), json['avatar'] as Map<String, dynamic>),
); );
Map<String, dynamic> _$$NavApiDocsItemImageSizesDataImplToJson( Map<String, dynamic> _$NavApiDocsItemImageSizesDataToJson(
_$NavApiDocsItemImageSizesDataImpl instance) => _NavApiDocsItemImageSizesData instance) =>
<String, dynamic>{ <String, dynamic>{
'thumbnail': instance.thumbnail, 'thumbnail': instance.thumbnail,
'preload': instance.preload, 'preload': instance.preload,
@ -191,10 +187,9 @@ Map<String, dynamic> _$$NavApiDocsItemImageSizesDataImplToJson(
'avatar': instance.avatar, 'avatar': instance.avatar,
}; };
_$NavApiDocsItemImageSizesPreloadDataImpl _NavApiDocsItemImageSizesPreloadData
_$$NavApiDocsItemImageSizesPreloadDataImplFromJson( _$NavApiDocsItemImageSizesPreloadDataFromJson(Map<String, dynamic> json) =>
Map<String, dynamic> json) => _NavApiDocsItemImageSizesPreloadData(
_$NavApiDocsItemImageSizesPreloadDataImpl(
url: json['url'], url: json['url'],
width: json['width'], width: json['width'],
height: json['height'], height: json['height'],
@ -203,8 +198,8 @@ _$NavApiDocsItemImageSizesPreloadDataImpl
filename: json['filename'], filename: json['filename'],
); );
Map<String, dynamic> _$$NavApiDocsItemImageSizesPreloadDataImplToJson( Map<String, dynamic> _$NavApiDocsItemImageSizesPreloadDataToJson(
_$NavApiDocsItemImageSizesPreloadDataImpl instance) => _NavApiDocsItemImageSizesPreloadData instance) =>
<String, dynamic>{ <String, dynamic>{
'url': instance.url, 'url': instance.url,
'width': instance.width, 'width': instance.width,
@ -214,78 +209,75 @@ Map<String, dynamic> _$$NavApiDocsItemImageSizesPreloadDataImplToJson(
'filename': instance.filename, 'filename': instance.filename,
}; };
_$NavApiDocsItemImageSizesCardDataImpl _NavApiDocsItemImageSizesCardData _$NavApiDocsItemImageSizesCardDataFromJson(
_$$NavApiDocsItemImageSizesCardDataImplFromJson(
Map<String, dynamic> json) =>
_$NavApiDocsItemImageSizesCardDataImpl(
url: json['url'] as String? ?? '',
width: (json['width'] as num?)?.toInt() ?? 0,
height: (json['height'] as num?)?.toInt() ?? 0,
mimeType: json['mimeType'] as String? ?? '',
filesize: (json['filesize'] as num?)?.toInt() ?? 0,
filename: json['filename'] as String? ?? '',
);
Map<String, dynamic> _$$NavApiDocsItemImageSizesCardDataImplToJson(
_$NavApiDocsItemImageSizesCardDataImpl instance) =>
<String, dynamic>{
'url': instance.url,
'width': instance.width,
'height': instance.height,
'mimeType': instance.mimeType,
'filesize': instance.filesize,
'filename': instance.filename,
};
_$NavApiDocsItemImageSizesTabletDataImpl
_$$NavApiDocsItemImageSizesTabletDataImplFromJson(
Map<String, dynamic> json) =>
_$NavApiDocsItemImageSizesTabletDataImpl(
url: json['url'] as String? ?? '',
width: (json['width'] as num?)?.toInt() ?? 0,
height: (json['height'] as num?)?.toInt() ?? 0,
mimeType: json['mimeType'] as String? ?? '',
filesize: (json['filesize'] as num?)?.toInt() ?? 0,
filename: json['filename'] as String? ?? '',
);
Map<String, dynamic> _$$NavApiDocsItemImageSizesTabletDataImplToJson(
_$NavApiDocsItemImageSizesTabletDataImpl instance) =>
<String, dynamic>{
'url': instance.url,
'width': instance.width,
'height': instance.height,
'mimeType': instance.mimeType,
'filesize': instance.filesize,
'filename': instance.filename,
};
_$NavApiDocsItemImageSizesAvatarDataImpl
_$$NavApiDocsItemImageSizesAvatarDataImplFromJson(
Map<String, dynamic> json) =>
_$NavApiDocsItemImageSizesAvatarDataImpl(
url: json['url'] as String? ?? '',
width: (json['width'] as num?)?.toInt() ?? 0,
height: (json['height'] as num?)?.toInt() ?? 0,
mimeType: json['mimeType'] as String? ?? '',
filesize: (json['filesize'] as num?)?.toInt() ?? 0,
filename: json['filename'] as String? ?? '',
);
Map<String, dynamic> _$$NavApiDocsItemImageSizesAvatarDataImplToJson(
_$NavApiDocsItemImageSizesAvatarDataImpl instance) =>
<String, dynamic>{
'url': instance.url,
'width': instance.width,
'height': instance.height,
'mimeType': instance.mimeType,
'filesize': instance.filesize,
'filename': instance.filename,
};
_$NavApiDocsItemTagsItemDataImpl _$$NavApiDocsItemTagsItemDataImplFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
_$NavApiDocsItemTagsItemDataImpl( _NavApiDocsItemImageSizesCardData(
url: json['url'] as String? ?? '',
width: (json['width'] as num?)?.toInt() ?? 0,
height: (json['height'] as num?)?.toInt() ?? 0,
mimeType: json['mimeType'] as String? ?? '',
filesize: (json['filesize'] as num?)?.toInt() ?? 0,
filename: json['filename'] as String? ?? '',
);
Map<String, dynamic> _$NavApiDocsItemImageSizesCardDataToJson(
_NavApiDocsItemImageSizesCardData instance) =>
<String, dynamic>{
'url': instance.url,
'width': instance.width,
'height': instance.height,
'mimeType': instance.mimeType,
'filesize': instance.filesize,
'filename': instance.filename,
};
_NavApiDocsItemImageSizesTabletData
_$NavApiDocsItemImageSizesTabletDataFromJson(Map<String, dynamic> json) =>
_NavApiDocsItemImageSizesTabletData(
url: json['url'] as String? ?? '',
width: (json['width'] as num?)?.toInt() ?? 0,
height: (json['height'] as num?)?.toInt() ?? 0,
mimeType: json['mimeType'] as String? ?? '',
filesize: (json['filesize'] as num?)?.toInt() ?? 0,
filename: json['filename'] as String? ?? '',
);
Map<String, dynamic> _$NavApiDocsItemImageSizesTabletDataToJson(
_NavApiDocsItemImageSizesTabletData instance) =>
<String, dynamic>{
'url': instance.url,
'width': instance.width,
'height': instance.height,
'mimeType': instance.mimeType,
'filesize': instance.filesize,
'filename': instance.filename,
};
_NavApiDocsItemImageSizesAvatarData
_$NavApiDocsItemImageSizesAvatarDataFromJson(Map<String, dynamic> json) =>
_NavApiDocsItemImageSizesAvatarData(
url: json['url'] as String? ?? '',
width: (json['width'] as num?)?.toInt() ?? 0,
height: (json['height'] as num?)?.toInt() ?? 0,
mimeType: json['mimeType'] as String? ?? '',
filesize: (json['filesize'] as num?)?.toInt() ?? 0,
filename: json['filename'] as String? ?? '',
);
Map<String, dynamic> _$NavApiDocsItemImageSizesAvatarDataToJson(
_NavApiDocsItemImageSizesAvatarData instance) =>
<String, dynamic>{
'url': instance.url,
'width': instance.width,
'height': instance.height,
'mimeType': instance.mimeType,
'filesize': instance.filesize,
'filename': instance.filename,
};
_NavApiDocsItemTagsItemData _$NavApiDocsItemTagsItemDataFromJson(
Map<String, dynamic> json) =>
_NavApiDocsItemTagsItemData(
id: json['id'] as String? ?? '', id: json['id'] as String? ?? '',
name: json['name'] as String? ?? '', name: json['name'] as String? ?? '',
slug: json['slug'] as String? ?? '', slug: json['slug'] as String? ?? '',
@ -293,8 +285,8 @@ _$NavApiDocsItemTagsItemDataImpl _$$NavApiDocsItemTagsItemDataImplFromJson(
createdAt: json['createdAt'] as String? ?? '', createdAt: json['createdAt'] as String? ?? '',
); );
Map<String, dynamic> _$$NavApiDocsItemTagsItemDataImplToJson( Map<String, dynamic> _$NavApiDocsItemTagsItemDataToJson(
_$NavApiDocsItemTagsItemDataImpl instance) => _NavApiDocsItemTagsItemData instance) =>
<String, dynamic>{ <String, dynamic>{
'id': instance.id, 'id': instance.id,
'name': instance.name, 'name': instance.name,
@ -303,8 +295,7 @@ Map<String, dynamic> _$$NavApiDocsItemTagsItemDataImplToJson(
'createdAt': instance.createdAt, 'createdAt': instance.createdAt,
}; };
_$NavApiDataImpl _$$NavApiDataImplFromJson(Map<String, dynamic> json) => _NavApiData _$NavApiDataFromJson(Map<String, dynamic> json) => _NavApiData(
_$NavApiDataImpl(
docs: (json['docs'] as List<dynamic>?) docs: (json['docs'] as List<dynamic>?)
?.map( ?.map(
(e) => NavApiDocsItemData.fromJson(e as Map<String, dynamic>)) (e) => NavApiDocsItemData.fromJson(e as Map<String, dynamic>))
@ -321,7 +312,7 @@ _$NavApiDataImpl _$$NavApiDataImplFromJson(Map<String, dynamic> json) =>
totalPages: (json['totalPages'] as num?)?.toInt() ?? 0, totalPages: (json['totalPages'] as num?)?.toInt() ?? 0,
); );
Map<String, dynamic> _$$NavApiDataImplToJson(_$NavApiDataImpl instance) => Map<String, dynamic> _$NavApiDataToJson(_NavApiData instance) =>
<String, dynamic>{ <String, dynamic>{
'docs': instance.docs, 'docs': instance.docs,
'hasNextPage': instance.hasNextPage, 'hasNextPage': instance.hasNextPage,

View File

@ -19,7 +19,7 @@ part 'aria2c.g.dart';
part 'aria2c.freezed.dart'; part 'aria2c.freezed.dart';
@freezed @freezed
class Aria2cModelState with _$Aria2cModelState { abstract class Aria2cModelState with _$Aria2cModelState {
const factory Aria2cModelState({ const factory Aria2cModelState({
required String aria2cDir, required String aria2cDir,
Aria2c? aria2c, Aria2c? aria2c,

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file // coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint // ignore_for_file: type=lint
@ -9,139 +10,25 @@ part of 'aria2c.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; 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 /// @nodoc
mixin _$Aria2cModelState { mixin _$Aria2cModelState implements DiagnosticableTreeMixin {
String get aria2cDir => throw _privateConstructorUsedError; String get aria2cDir;
Aria2c? get aria2c => throw _privateConstructorUsedError; Aria2c? get aria2c;
Aria2GlobalStat? get aria2globalStat => throw _privateConstructorUsedError; Aria2GlobalStat? get aria2globalStat;
/// Create a copy of Aria2cModelState /// Create a copy of Aria2cModelState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$Aria2cModelStateCopyWith<Aria2cModelState> get copyWith => $Aria2cModelStateCopyWith<Aria2cModelState> get copyWith =>
throw _privateConstructorUsedError; _$Aria2cModelStateCopyWithImpl<Aria2cModelState>(
} this as Aria2cModelState, _$identity);
/// @nodoc
abstract class $Aria2cModelStateCopyWith<$Res> {
factory $Aria2cModelStateCopyWith(
Aria2cModelState value, $Res Function(Aria2cModelState) then) =
_$Aria2cModelStateCopyWithImpl<$Res, Aria2cModelState>;
@useResult
$Res call(
{String aria2cDir, Aria2c? aria2c, Aria2GlobalStat? aria2globalStat});
}
/// @nodoc
class _$Aria2cModelStateCopyWithImpl<$Res, $Val extends Aria2cModelState>
implements $Aria2cModelStateCopyWith<$Res> {
_$Aria2cModelStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of Aria2cModelState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? aria2cDir = null,
Object? aria2c = freezed,
Object? aria2globalStat = freezed,
}) {
return _then(_value.copyWith(
aria2cDir: null == aria2cDir
? _value.aria2cDir
: aria2cDir // ignore: cast_nullable_to_non_nullable
as String,
aria2c: freezed == aria2c
? _value.aria2c
: aria2c // ignore: cast_nullable_to_non_nullable
as Aria2c?,
aria2globalStat: freezed == aria2globalStat
? _value.aria2globalStat
: aria2globalStat // ignore: cast_nullable_to_non_nullable
as Aria2GlobalStat?,
) as $Val);
}
}
/// @nodoc
abstract class _$$Aria2cModelStateImplCopyWith<$Res>
implements $Aria2cModelStateCopyWith<$Res> {
factory _$$Aria2cModelStateImplCopyWith(_$Aria2cModelStateImpl value,
$Res Function(_$Aria2cModelStateImpl) then) =
__$$Aria2cModelStateImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{String aria2cDir, Aria2c? aria2c, Aria2GlobalStat? aria2globalStat});
}
/// @nodoc
class __$$Aria2cModelStateImplCopyWithImpl<$Res>
extends _$Aria2cModelStateCopyWithImpl<$Res, _$Aria2cModelStateImpl>
implements _$$Aria2cModelStateImplCopyWith<$Res> {
__$$Aria2cModelStateImplCopyWithImpl(_$Aria2cModelStateImpl _value,
$Res Function(_$Aria2cModelStateImpl) _then)
: super(_value, _then);
/// Create a copy of Aria2cModelState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? aria2cDir = null,
Object? aria2c = freezed,
Object? aria2globalStat = freezed,
}) {
return _then(_$Aria2cModelStateImpl(
aria2cDir: null == aria2cDir
? _value.aria2cDir
: aria2cDir // ignore: cast_nullable_to_non_nullable
as String,
aria2c: freezed == aria2c
? _value.aria2c
: aria2c // ignore: cast_nullable_to_non_nullable
as Aria2c?,
aria2globalStat: freezed == aria2globalStat
? _value.aria2globalStat
: aria2globalStat // ignore: cast_nullable_to_non_nullable
as Aria2GlobalStat?,
));
}
}
/// @nodoc
class _$Aria2cModelStateImpl
with DiagnosticableTreeMixin
implements _Aria2cModelState {
const _$Aria2cModelStateImpl(
{required this.aria2cDir, this.aria2c, this.aria2globalStat});
@override
final String aria2cDir;
@override
final Aria2c? aria2c;
@override
final Aria2GlobalStat? aria2globalStat;
@override
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
return 'Aria2cModelState(aria2cDir: $aria2cDir, aria2c: $aria2c, aria2globalStat: $aria2globalStat)';
}
@override @override
void debugFillProperties(DiagnosticPropertiesBuilder properties) { void debugFillProperties(DiagnosticPropertiesBuilder properties) {
super.debugFillProperties(properties);
properties properties
..add(DiagnosticsProperty('type', 'Aria2cModelState')) ..add(DiagnosticsProperty('type', 'Aria2cModelState'))
..add(DiagnosticsProperty('aria2cDir', aria2cDir)) ..add(DiagnosticsProperty('aria2cDir', aria2cDir))
@ -153,7 +40,7 @@ class _$Aria2cModelStateImpl
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$Aria2cModelStateImpl && other is Aria2cModelState &&
(identical(other.aria2cDir, aria2cDir) || (identical(other.aria2cDir, aria2cDir) ||
other.aria2cDir == aria2cDir) && other.aria2cDir == aria2cDir) &&
(identical(other.aria2c, aria2c) || other.aria2c == aria2c) && (identical(other.aria2c, aria2c) || other.aria2c == aria2c) &&
@ -165,33 +52,154 @@ class _$Aria2cModelStateImpl
int get hashCode => int get hashCode =>
Object.hash(runtimeType, aria2cDir, aria2c, aria2globalStat); Object.hash(runtimeType, aria2cDir, aria2c, aria2globalStat);
@override
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
return 'Aria2cModelState(aria2cDir: $aria2cDir, aria2c: $aria2c, aria2globalStat: $aria2globalStat)';
}
}
/// @nodoc
abstract mixin class $Aria2cModelStateCopyWith<$Res> {
factory $Aria2cModelStateCopyWith(
Aria2cModelState value, $Res Function(Aria2cModelState) _then) =
_$Aria2cModelStateCopyWithImpl;
@useResult
$Res call(
{String aria2cDir, Aria2c? aria2c, Aria2GlobalStat? aria2globalStat});
}
/// @nodoc
class _$Aria2cModelStateCopyWithImpl<$Res>
implements $Aria2cModelStateCopyWith<$Res> {
_$Aria2cModelStateCopyWithImpl(this._self, this._then);
final Aria2cModelState _self;
final $Res Function(Aria2cModelState) _then;
/// Create a copy of Aria2cModelState /// Create a copy of Aria2cModelState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? aria2cDir = null,
Object? aria2c = freezed,
Object? aria2globalStat = freezed,
}) {
return _then(_self.copyWith(
aria2cDir: null == aria2cDir
? _self.aria2cDir
: aria2cDir // ignore: cast_nullable_to_non_nullable
as String,
aria2c: freezed == aria2c
? _self.aria2c
: aria2c // ignore: cast_nullable_to_non_nullable
as Aria2c?,
aria2globalStat: freezed == aria2globalStat
? _self.aria2globalStat
: aria2globalStat // ignore: cast_nullable_to_non_nullable
as Aria2GlobalStat?,
));
}
}
/// @nodoc
class _Aria2cModelState
with DiagnosticableTreeMixin
implements Aria2cModelState {
const _Aria2cModelState(
{required this.aria2cDir, this.aria2c, this.aria2globalStat});
@override
final String aria2cDir;
@override
final Aria2c? aria2c;
@override
final Aria2GlobalStat? aria2globalStat;
/// Create a copy of Aria2cModelState
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$Aria2cModelStateCopyWith<_Aria2cModelState> get copyWith =>
__$Aria2cModelStateCopyWithImpl<_Aria2cModelState>(this, _$identity);
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
properties
..add(DiagnosticsProperty('type', 'Aria2cModelState'))
..add(DiagnosticsProperty('aria2cDir', aria2cDir))
..add(DiagnosticsProperty('aria2c', aria2c))
..add(DiagnosticsProperty('aria2globalStat', aria2globalStat));
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _Aria2cModelState &&
(identical(other.aria2cDir, aria2cDir) ||
other.aria2cDir == aria2cDir) &&
(identical(other.aria2c, aria2c) || other.aria2c == aria2c) &&
(identical(other.aria2globalStat, aria2globalStat) ||
other.aria2globalStat == aria2globalStat));
}
@override
int get hashCode =>
Object.hash(runtimeType, aria2cDir, aria2c, aria2globalStat);
@override
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
return 'Aria2cModelState(aria2cDir: $aria2cDir, aria2c: $aria2c, aria2globalStat: $aria2globalStat)';
}
}
/// @nodoc
abstract mixin class _$Aria2cModelStateCopyWith<$Res>
implements $Aria2cModelStateCopyWith<$Res> {
factory _$Aria2cModelStateCopyWith(
_Aria2cModelState value, $Res Function(_Aria2cModelState) _then) =
__$Aria2cModelStateCopyWithImpl;
@override
@useResult
$Res call(
{String aria2cDir, Aria2c? aria2c, Aria2GlobalStat? aria2globalStat});
}
/// @nodoc
class __$Aria2cModelStateCopyWithImpl<$Res>
implements _$Aria2cModelStateCopyWith<$Res> {
__$Aria2cModelStateCopyWithImpl(this._self, this._then);
final _Aria2cModelState _self;
final $Res Function(_Aria2cModelState) _then;
/// Create a copy of Aria2cModelState
/// with the given fields replaced by the non-null parameter values.
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$Aria2cModelStateImplCopyWith<_$Aria2cModelStateImpl> get copyWith => $Res call({
__$$Aria2cModelStateImplCopyWithImpl<_$Aria2cModelStateImpl>( Object? aria2cDir = null,
this, _$identity); Object? aria2c = freezed,
Object? aria2globalStat = freezed,
}) {
return _then(_Aria2cModelState(
aria2cDir: null == aria2cDir
? _self.aria2cDir
: aria2cDir // ignore: cast_nullable_to_non_nullable
as String,
aria2c: freezed == aria2c
? _self.aria2c
: aria2c // ignore: cast_nullable_to_non_nullable
as Aria2c?,
aria2globalStat: freezed == aria2globalStat
? _self.aria2globalStat
: aria2globalStat // ignore: cast_nullable_to_non_nullable
as Aria2GlobalStat?,
));
}
} }
abstract class _Aria2cModelState implements Aria2cModelState { // dart format on
const factory _Aria2cModelState(
{required final String aria2cDir,
final Aria2c? aria2c,
final Aria2GlobalStat? aria2globalStat}) = _$Aria2cModelStateImpl;
@override
String get aria2cDir;
@override
Aria2c? get aria2c;
@override
Aria2GlobalStat? get aria2globalStat;
/// Create a copy of Aria2cModelState
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$Aria2cModelStateImplCopyWith<_$Aria2cModelStateImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@ -22,7 +22,7 @@ part 'unp4kc.freezed.dart';
part 'unp4kc.g.dart'; part 'unp4kc.g.dart';
@freezed @freezed
class Unp4kcState with _$Unp4kcState { abstract class Unp4kcState with _$Unp4kcState {
const factory Unp4kcState({ const factory Unp4kcState({
required bool startUp, required bool startUp,
Map<String, AppUnp4kP4kItemData>? files, Map<String, AppUnp4kP4kItemData>? files,

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file // coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint // ignore_for_file: type=lint
@ -9,109 +10,78 @@ part of 'unp4kc.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; 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 /// @nodoc
mixin _$Unp4kcState { mixin _$Unp4kcState implements DiagnosticableTreeMixin {
bool get startUp => throw _privateConstructorUsedError; bool get startUp;
Map<String, AppUnp4kP4kItemData>? get files => Map<String, AppUnp4kP4kItemData>? get files;
throw _privateConstructorUsedError; MemoryFileSystem? get fs;
MemoryFileSystem? get fs => throw _privateConstructorUsedError; String get curPath;
String get curPath => throw _privateConstructorUsedError; String? get endMessage;
String? get endMessage => throw _privateConstructorUsedError; MapEntry<String, String>? get tempOpenFile;
MapEntry<String, String>? get tempOpenFile => String get errorMessage;
throw _privateConstructorUsedError;
String get errorMessage => throw _privateConstructorUsedError;
/// Create a copy of Unp4kcState /// Create a copy of Unp4kcState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
$Unp4kcStateCopyWith<Unp4kcState> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $Unp4kcStateCopyWith<$Res> {
factory $Unp4kcStateCopyWith(
Unp4kcState value, $Res Function(Unp4kcState) then) =
_$Unp4kcStateCopyWithImpl<$Res, Unp4kcState>;
@useResult
$Res call(
{bool startUp,
Map<String, AppUnp4kP4kItemData>? files,
MemoryFileSystem? fs,
String curPath,
String? endMessage,
MapEntry<String, String>? tempOpenFile,
String errorMessage});
}
/// @nodoc
class _$Unp4kcStateCopyWithImpl<$Res, $Val extends Unp4kcState>
implements $Unp4kcStateCopyWith<$Res> {
_$Unp4kcStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of Unp4kcState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
$Unp4kcStateCopyWith<Unp4kcState> get copyWith =>
_$Unp4kcStateCopyWithImpl<Unp4kcState>(this as Unp4kcState, _$identity);
@override @override
$Res call({ void debugFillProperties(DiagnosticPropertiesBuilder properties) {
Object? startUp = null, properties
Object? files = freezed, ..add(DiagnosticsProperty('type', 'Unp4kcState'))
Object? fs = freezed, ..add(DiagnosticsProperty('startUp', startUp))
Object? curPath = null, ..add(DiagnosticsProperty('files', files))
Object? endMessage = freezed, ..add(DiagnosticsProperty('fs', fs))
Object? tempOpenFile = freezed, ..add(DiagnosticsProperty('curPath', curPath))
Object? errorMessage = null, ..add(DiagnosticsProperty('endMessage', endMessage))
}) { ..add(DiagnosticsProperty('tempOpenFile', tempOpenFile))
return _then(_value.copyWith( ..add(DiagnosticsProperty('errorMessage', errorMessage));
startUp: null == startUp }
? _value.startUp
: startUp // ignore: cast_nullable_to_non_nullable @override
as bool, bool operator ==(Object other) {
files: freezed == files return identical(this, other) ||
? _value.files (other.runtimeType == runtimeType &&
: files // ignore: cast_nullable_to_non_nullable other is Unp4kcState &&
as Map<String, AppUnp4kP4kItemData>?, (identical(other.startUp, startUp) || other.startUp == startUp) &&
fs: freezed == fs const DeepCollectionEquality().equals(other.files, files) &&
? _value.fs (identical(other.fs, fs) || other.fs == fs) &&
: fs // ignore: cast_nullable_to_non_nullable (identical(other.curPath, curPath) || other.curPath == curPath) &&
as MemoryFileSystem?, (identical(other.endMessage, endMessage) ||
curPath: null == curPath other.endMessage == endMessage) &&
? _value.curPath (identical(other.tempOpenFile, tempOpenFile) ||
: curPath // ignore: cast_nullable_to_non_nullable other.tempOpenFile == tempOpenFile) &&
as String, (identical(other.errorMessage, errorMessage) ||
endMessage: freezed == endMessage other.errorMessage == errorMessage));
? _value.endMessage }
: endMessage // ignore: cast_nullable_to_non_nullable
as String?, @override
tempOpenFile: freezed == tempOpenFile int get hashCode => Object.hash(
? _value.tempOpenFile runtimeType,
: tempOpenFile // ignore: cast_nullable_to_non_nullable startUp,
as MapEntry<String, String>?, const DeepCollectionEquality().hash(files),
errorMessage: null == errorMessage fs,
? _value.errorMessage curPath,
: errorMessage // ignore: cast_nullable_to_non_nullable endMessage,
as String, tempOpenFile,
) as $Val); errorMessage);
@override
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
return 'Unp4kcState(startUp: $startUp, files: $files, fs: $fs, curPath: $curPath, endMessage: $endMessage, tempOpenFile: $tempOpenFile, errorMessage: $errorMessage)';
} }
} }
/// @nodoc /// @nodoc
abstract class _$$Unp4kcStateImplCopyWith<$Res> abstract mixin class $Unp4kcStateCopyWith<$Res> {
implements $Unp4kcStateCopyWith<$Res> { factory $Unp4kcStateCopyWith(
factory _$$Unp4kcStateImplCopyWith( Unp4kcState value, $Res Function(Unp4kcState) _then) =
_$Unp4kcStateImpl value, $Res Function(_$Unp4kcStateImpl) then) = _$Unp4kcStateCopyWithImpl;
__$$Unp4kcStateImplCopyWithImpl<$Res>;
@override
@useResult @useResult
$Res call( $Res call(
{bool startUp, {bool startUp,
@ -124,12 +94,11 @@ abstract class _$$Unp4kcStateImplCopyWith<$Res>
} }
/// @nodoc /// @nodoc
class __$$Unp4kcStateImplCopyWithImpl<$Res> class _$Unp4kcStateCopyWithImpl<$Res> implements $Unp4kcStateCopyWith<$Res> {
extends _$Unp4kcStateCopyWithImpl<$Res, _$Unp4kcStateImpl> _$Unp4kcStateCopyWithImpl(this._self, this._then);
implements _$$Unp4kcStateImplCopyWith<$Res> {
__$$Unp4kcStateImplCopyWithImpl( final Unp4kcState _self;
_$Unp4kcStateImpl _value, $Res Function(_$Unp4kcStateImpl) _then) final $Res Function(Unp4kcState) _then;
: super(_value, _then);
/// Create a copy of Unp4kcState /// Create a copy of Unp4kcState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -144,33 +113,33 @@ class __$$Unp4kcStateImplCopyWithImpl<$Res>
Object? tempOpenFile = freezed, Object? tempOpenFile = freezed,
Object? errorMessage = null, Object? errorMessage = null,
}) { }) {
return _then(_$Unp4kcStateImpl( return _then(_self.copyWith(
startUp: null == startUp startUp: null == startUp
? _value.startUp ? _self.startUp
: startUp // ignore: cast_nullable_to_non_nullable : startUp // ignore: cast_nullable_to_non_nullable
as bool, as bool,
files: freezed == files files: freezed == files
? _value._files ? _self.files
: files // ignore: cast_nullable_to_non_nullable : files // ignore: cast_nullable_to_non_nullable
as Map<String, AppUnp4kP4kItemData>?, as Map<String, AppUnp4kP4kItemData>?,
fs: freezed == fs fs: freezed == fs
? _value.fs ? _self.fs
: fs // ignore: cast_nullable_to_non_nullable : fs // ignore: cast_nullable_to_non_nullable
as MemoryFileSystem?, as MemoryFileSystem?,
curPath: null == curPath curPath: null == curPath
? _value.curPath ? _self.curPath
: curPath // ignore: cast_nullable_to_non_nullable : curPath // ignore: cast_nullable_to_non_nullable
as String, as String,
endMessage: freezed == endMessage endMessage: freezed == endMessage
? _value.endMessage ? _self.endMessage
: endMessage // ignore: cast_nullable_to_non_nullable : endMessage // ignore: cast_nullable_to_non_nullable
as String?, as String?,
tempOpenFile: freezed == tempOpenFile tempOpenFile: freezed == tempOpenFile
? _value.tempOpenFile ? _self.tempOpenFile
: tempOpenFile // ignore: cast_nullable_to_non_nullable : tempOpenFile // ignore: cast_nullable_to_non_nullable
as MapEntry<String, String>?, as MapEntry<String, String>?,
errorMessage: null == errorMessage errorMessage: null == errorMessage
? _value.errorMessage ? _self.errorMessage
: errorMessage // ignore: cast_nullable_to_non_nullable : errorMessage // ignore: cast_nullable_to_non_nullable
as String, as String,
)); ));
@ -179,8 +148,8 @@ class __$$Unp4kcStateImplCopyWithImpl<$Res>
/// @nodoc /// @nodoc
class _$Unp4kcStateImpl with DiagnosticableTreeMixin implements _Unp4kcState { class _Unp4kcState with DiagnosticableTreeMixin implements Unp4kcState {
const _$Unp4kcStateImpl( const _Unp4kcState(
{required this.startUp, {required this.startUp,
final Map<String, AppUnp4kP4kItemData>? files, final Map<String, AppUnp4kP4kItemData>? files,
this.fs, this.fs,
@ -214,14 +183,16 @@ class _$Unp4kcStateImpl with DiagnosticableTreeMixin implements _Unp4kcState {
@JsonKey() @JsonKey()
final String errorMessage; final String errorMessage;
/// Create a copy of Unp4kcState
/// with the given fields replaced by the non-null parameter values.
@override @override
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { @JsonKey(includeFromJson: false, includeToJson: false)
return 'Unp4kcState(startUp: $startUp, files: $files, fs: $fs, curPath: $curPath, endMessage: $endMessage, tempOpenFile: $tempOpenFile, errorMessage: $errorMessage)'; @pragma('vm:prefer-inline')
} _$Unp4kcStateCopyWith<_Unp4kcState> get copyWith =>
__$Unp4kcStateCopyWithImpl<_Unp4kcState>(this, _$identity);
@override @override
void debugFillProperties(DiagnosticPropertiesBuilder properties) { void debugFillProperties(DiagnosticPropertiesBuilder properties) {
super.debugFillProperties(properties);
properties properties
..add(DiagnosticsProperty('type', 'Unp4kcState')) ..add(DiagnosticsProperty('type', 'Unp4kcState'))
..add(DiagnosticsProperty('startUp', startUp)) ..add(DiagnosticsProperty('startUp', startUp))
@ -237,7 +208,7 @@ class _$Unp4kcStateImpl with DiagnosticableTreeMixin implements _Unp4kcState {
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$Unp4kcStateImpl && other is _Unp4kcState &&
(identical(other.startUp, startUp) || other.startUp == startUp) && (identical(other.startUp, startUp) || other.startUp == startUp) &&
const DeepCollectionEquality().equals(other._files, _files) && const DeepCollectionEquality().equals(other._files, _files) &&
(identical(other.fs, fs) || other.fs == fs) && (identical(other.fs, fs) || other.fs == fs) &&
@ -261,44 +232,81 @@ class _$Unp4kcStateImpl with DiagnosticableTreeMixin implements _Unp4kcState {
tempOpenFile, tempOpenFile,
errorMessage); errorMessage);
@override
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
return 'Unp4kcState(startUp: $startUp, files: $files, fs: $fs, curPath: $curPath, endMessage: $endMessage, tempOpenFile: $tempOpenFile, errorMessage: $errorMessage)';
}
}
/// @nodoc
abstract mixin class _$Unp4kcStateCopyWith<$Res>
implements $Unp4kcStateCopyWith<$Res> {
factory _$Unp4kcStateCopyWith(
_Unp4kcState value, $Res Function(_Unp4kcState) _then) =
__$Unp4kcStateCopyWithImpl;
@override
@useResult
$Res call(
{bool startUp,
Map<String, AppUnp4kP4kItemData>? files,
MemoryFileSystem? fs,
String curPath,
String? endMessage,
MapEntry<String, String>? tempOpenFile,
String errorMessage});
}
/// @nodoc
class __$Unp4kcStateCopyWithImpl<$Res> implements _$Unp4kcStateCopyWith<$Res> {
__$Unp4kcStateCopyWithImpl(this._self, this._then);
final _Unp4kcState _self;
final $Res Function(_Unp4kcState) _then;
/// Create a copy of Unp4kcState /// Create a copy of Unp4kcState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$Unp4kcStateImplCopyWith<_$Unp4kcStateImpl> get copyWith => $Res call({
__$$Unp4kcStateImplCopyWithImpl<_$Unp4kcStateImpl>(this, _$identity); Object? startUp = null,
Object? files = freezed,
Object? fs = freezed,
Object? curPath = null,
Object? endMessage = freezed,
Object? tempOpenFile = freezed,
Object? errorMessage = null,
}) {
return _then(_Unp4kcState(
startUp: null == startUp
? _self.startUp
: startUp // ignore: cast_nullable_to_non_nullable
as bool,
files: freezed == files
? _self._files
: files // ignore: cast_nullable_to_non_nullable
as Map<String, AppUnp4kP4kItemData>?,
fs: freezed == fs
? _self.fs
: fs // ignore: cast_nullable_to_non_nullable
as MemoryFileSystem?,
curPath: null == curPath
? _self.curPath
: curPath // ignore: cast_nullable_to_non_nullable
as String,
endMessage: freezed == endMessage
? _self.endMessage
: endMessage // ignore: cast_nullable_to_non_nullable
as String?,
tempOpenFile: freezed == tempOpenFile
? _self.tempOpenFile
: tempOpenFile // ignore: cast_nullable_to_non_nullable
as MapEntry<String, String>?,
errorMessage: null == errorMessage
? _self.errorMessage
: errorMessage // ignore: cast_nullable_to_non_nullable
as String,
));
}
} }
abstract class _Unp4kcState implements Unp4kcState { // dart format on
const factory _Unp4kcState(
{required final bool startUp,
final Map<String, AppUnp4kP4kItemData>? files,
final MemoryFileSystem? fs,
required final String curPath,
final String? endMessage,
final MapEntry<String, String>? tempOpenFile,
final String errorMessage}) = _$Unp4kcStateImpl;
@override
bool get startUp;
@override
Map<String, AppUnp4kP4kItemData>? get files;
@override
MemoryFileSystem? get fs;
@override
String get curPath;
@override
String? get endMessage;
@override
MapEntry<String, String>? get tempOpenFile;
@override
String get errorMessage;
/// Create a copy of Unp4kcState
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$Unp4kcStateImplCopyWith<_$Unp4kcStateImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@ -22,7 +22,7 @@ part 'home_game_login_dialog_ui_model.freezed.dart';
part 'home_game_login_dialog_ui_model.g.dart'; part 'home_game_login_dialog_ui_model.g.dart';
@freezed @freezed
class HomeGameLoginState with _$HomeGameLoginState { abstract class HomeGameLoginState with _$HomeGameLoginState {
factory HomeGameLoginState({ factory HomeGameLoginState({
required int loginStatus, required int loginStatus,
String? nickname, String? nickname,

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file // coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint // ignore_for_file: type=lint
@ -9,121 +10,79 @@ part of 'home_game_login_dialog_ui_model.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; 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 /// @nodoc
mixin _$HomeGameLoginState { mixin _$HomeGameLoginState {
int get loginStatus => throw _privateConstructorUsedError; int get loginStatus;
String? get nickname => throw _privateConstructorUsedError; String? get nickname;
String? get avatarUrl => throw _privateConstructorUsedError; String? get avatarUrl;
String? get authToken => throw _privateConstructorUsedError; String? get authToken;
String? get webToken => throw _privateConstructorUsedError; String? get webToken;
Map<dynamic, dynamic>? get releaseInfo => throw _privateConstructorUsedError; Map? get releaseInfo;
RsiGameLibraryData? get libraryData => throw _privateConstructorUsedError; RsiGameLibraryData? get libraryData;
String? get installPath => throw _privateConstructorUsedError; String? get installPath;
bool? get isDeviceSupportWinHello => throw _privateConstructorUsedError; bool? get isDeviceSupportWinHello;
/// Create a copy of HomeGameLoginState /// Create a copy of HomeGameLoginState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
$HomeGameLoginStateCopyWith<HomeGameLoginState> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $HomeGameLoginStateCopyWith<$Res> {
factory $HomeGameLoginStateCopyWith(
HomeGameLoginState value, $Res Function(HomeGameLoginState) then) =
_$HomeGameLoginStateCopyWithImpl<$Res, HomeGameLoginState>;
@useResult
$Res call(
{int loginStatus,
String? nickname,
String? avatarUrl,
String? authToken,
String? webToken,
Map<dynamic, dynamic>? releaseInfo,
RsiGameLibraryData? libraryData,
String? installPath,
bool? isDeviceSupportWinHello});
}
/// @nodoc
class _$HomeGameLoginStateCopyWithImpl<$Res, $Val extends HomeGameLoginState>
implements $HomeGameLoginStateCopyWith<$Res> {
_$HomeGameLoginStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of HomeGameLoginState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
$HomeGameLoginStateCopyWith<HomeGameLoginState> get copyWith =>
_$HomeGameLoginStateCopyWithImpl<HomeGameLoginState>(
this as HomeGameLoginState, _$identity);
@override @override
$Res call({ bool operator ==(Object other) {
Object? loginStatus = null, return identical(this, other) ||
Object? nickname = freezed, (other.runtimeType == runtimeType &&
Object? avatarUrl = freezed, other is HomeGameLoginState &&
Object? authToken = freezed, (identical(other.loginStatus, loginStatus) ||
Object? webToken = freezed, other.loginStatus == loginStatus) &&
Object? releaseInfo = freezed, (identical(other.nickname, nickname) ||
Object? libraryData = freezed, other.nickname == nickname) &&
Object? installPath = freezed, (identical(other.avatarUrl, avatarUrl) ||
Object? isDeviceSupportWinHello = freezed, other.avatarUrl == avatarUrl) &&
}) { (identical(other.authToken, authToken) ||
return _then(_value.copyWith( other.authToken == authToken) &&
loginStatus: null == loginStatus (identical(other.webToken, webToken) ||
? _value.loginStatus other.webToken == webToken) &&
: loginStatus // ignore: cast_nullable_to_non_nullable const DeepCollectionEquality()
as int, .equals(other.releaseInfo, releaseInfo) &&
nickname: freezed == nickname (identical(other.libraryData, libraryData) ||
? _value.nickname other.libraryData == libraryData) &&
: nickname // ignore: cast_nullable_to_non_nullable (identical(other.installPath, installPath) ||
as String?, other.installPath == installPath) &&
avatarUrl: freezed == avatarUrl (identical(
? _value.avatarUrl other.isDeviceSupportWinHello, isDeviceSupportWinHello) ||
: avatarUrl // ignore: cast_nullable_to_non_nullable other.isDeviceSupportWinHello == isDeviceSupportWinHello));
as String?, }
authToken: freezed == authToken
? _value.authToken @override
: authToken // ignore: cast_nullable_to_non_nullable int get hashCode => Object.hash(
as String?, runtimeType,
webToken: freezed == webToken loginStatus,
? _value.webToken nickname,
: webToken // ignore: cast_nullable_to_non_nullable avatarUrl,
as String?, authToken,
releaseInfo: freezed == releaseInfo webToken,
? _value.releaseInfo const DeepCollectionEquality().hash(releaseInfo),
: releaseInfo // ignore: cast_nullable_to_non_nullable libraryData,
as Map<dynamic, dynamic>?, installPath,
libraryData: freezed == libraryData isDeviceSupportWinHello);
? _value.libraryData
: libraryData // ignore: cast_nullable_to_non_nullable @override
as RsiGameLibraryData?, String toString() {
installPath: freezed == installPath return 'HomeGameLoginState(loginStatus: $loginStatus, nickname: $nickname, avatarUrl: $avatarUrl, authToken: $authToken, webToken: $webToken, releaseInfo: $releaseInfo, libraryData: $libraryData, installPath: $installPath, isDeviceSupportWinHello: $isDeviceSupportWinHello)';
? _value.installPath
: installPath // ignore: cast_nullable_to_non_nullable
as String?,
isDeviceSupportWinHello: freezed == isDeviceSupportWinHello
? _value.isDeviceSupportWinHello
: isDeviceSupportWinHello // ignore: cast_nullable_to_non_nullable
as bool?,
) as $Val);
} }
} }
/// @nodoc /// @nodoc
abstract class _$$LoginStatusImplCopyWith<$Res> abstract mixin class $HomeGameLoginStateCopyWith<$Res> {
implements $HomeGameLoginStateCopyWith<$Res> { factory $HomeGameLoginStateCopyWith(
factory _$$LoginStatusImplCopyWith( HomeGameLoginState value, $Res Function(HomeGameLoginState) _then) =
_$LoginStatusImpl value, $Res Function(_$LoginStatusImpl) then) = _$HomeGameLoginStateCopyWithImpl;
__$$LoginStatusImplCopyWithImpl<$Res>;
@override
@useResult @useResult
$Res call( $Res call(
{int loginStatus, {int loginStatus,
@ -131,19 +90,19 @@ abstract class _$$LoginStatusImplCopyWith<$Res>
String? avatarUrl, String? avatarUrl,
String? authToken, String? authToken,
String? webToken, String? webToken,
Map<dynamic, dynamic>? releaseInfo, Map? releaseInfo,
RsiGameLibraryData? libraryData, RsiGameLibraryData? libraryData,
String? installPath, String? installPath,
bool? isDeviceSupportWinHello}); bool? isDeviceSupportWinHello});
} }
/// @nodoc /// @nodoc
class __$$LoginStatusImplCopyWithImpl<$Res> class _$HomeGameLoginStateCopyWithImpl<$Res>
extends _$HomeGameLoginStateCopyWithImpl<$Res, _$LoginStatusImpl> implements $HomeGameLoginStateCopyWith<$Res> {
implements _$$LoginStatusImplCopyWith<$Res> { _$HomeGameLoginStateCopyWithImpl(this._self, this._then);
__$$LoginStatusImplCopyWithImpl(
_$LoginStatusImpl _value, $Res Function(_$LoginStatusImpl) _then) final HomeGameLoginState _self;
: super(_value, _then); final $Res Function(HomeGameLoginState) _then;
/// Create a copy of HomeGameLoginState /// Create a copy of HomeGameLoginState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -160,41 +119,41 @@ class __$$LoginStatusImplCopyWithImpl<$Res>
Object? installPath = freezed, Object? installPath = freezed,
Object? isDeviceSupportWinHello = freezed, Object? isDeviceSupportWinHello = freezed,
}) { }) {
return _then(_$LoginStatusImpl( return _then(_self.copyWith(
loginStatus: null == loginStatus loginStatus: null == loginStatus
? _value.loginStatus ? _self.loginStatus
: loginStatus // ignore: cast_nullable_to_non_nullable : loginStatus // ignore: cast_nullable_to_non_nullable
as int, as int,
nickname: freezed == nickname nickname: freezed == nickname
? _value.nickname ? _self.nickname
: nickname // ignore: cast_nullable_to_non_nullable : nickname // ignore: cast_nullable_to_non_nullable
as String?, as String?,
avatarUrl: freezed == avatarUrl avatarUrl: freezed == avatarUrl
? _value.avatarUrl ? _self.avatarUrl
: avatarUrl // ignore: cast_nullable_to_non_nullable : avatarUrl // ignore: cast_nullable_to_non_nullable
as String?, as String?,
authToken: freezed == authToken authToken: freezed == authToken
? _value.authToken ? _self.authToken
: authToken // ignore: cast_nullable_to_non_nullable : authToken // ignore: cast_nullable_to_non_nullable
as String?, as String?,
webToken: freezed == webToken webToken: freezed == webToken
? _value.webToken ? _self.webToken
: webToken // ignore: cast_nullable_to_non_nullable : webToken // ignore: cast_nullable_to_non_nullable
as String?, as String?,
releaseInfo: freezed == releaseInfo releaseInfo: freezed == releaseInfo
? _value._releaseInfo ? _self.releaseInfo
: releaseInfo // ignore: cast_nullable_to_non_nullable : releaseInfo // ignore: cast_nullable_to_non_nullable
as Map<dynamic, dynamic>?, as Map?,
libraryData: freezed == libraryData libraryData: freezed == libraryData
? _value.libraryData ? _self.libraryData
: libraryData // ignore: cast_nullable_to_non_nullable : libraryData // ignore: cast_nullable_to_non_nullable
as RsiGameLibraryData?, as RsiGameLibraryData?,
installPath: freezed == installPath installPath: freezed == installPath
? _value.installPath ? _self.installPath
: installPath // ignore: cast_nullable_to_non_nullable : installPath // ignore: cast_nullable_to_non_nullable
as String?, as String?,
isDeviceSupportWinHello: freezed == isDeviceSupportWinHello isDeviceSupportWinHello: freezed == isDeviceSupportWinHello
? _value.isDeviceSupportWinHello ? _self.isDeviceSupportWinHello
: isDeviceSupportWinHello // ignore: cast_nullable_to_non_nullable : isDeviceSupportWinHello // ignore: cast_nullable_to_non_nullable
as bool?, as bool?,
)); ));
@ -203,14 +162,14 @@ class __$$LoginStatusImplCopyWithImpl<$Res>
/// @nodoc /// @nodoc
class _$LoginStatusImpl implements _LoginStatus { class _LoginStatus implements HomeGameLoginState {
_$LoginStatusImpl( _LoginStatus(
{required this.loginStatus, {required this.loginStatus,
this.nickname, this.nickname,
this.avatarUrl, this.avatarUrl,
this.authToken, this.authToken,
this.webToken, this.webToken,
final Map<dynamic, dynamic>? releaseInfo, final Map? releaseInfo,
this.libraryData, this.libraryData,
this.installPath, this.installPath,
this.isDeviceSupportWinHello}) this.isDeviceSupportWinHello})
@ -226,9 +185,9 @@ class _$LoginStatusImpl implements _LoginStatus {
final String? authToken; final String? authToken;
@override @override
final String? webToken; final String? webToken;
final Map<dynamic, dynamic>? _releaseInfo; final Map? _releaseInfo;
@override @override
Map<dynamic, dynamic>? get releaseInfo { Map? get releaseInfo {
final value = _releaseInfo; final value = _releaseInfo;
if (value == null) return null; if (value == null) return null;
if (_releaseInfo is EqualUnmodifiableMapView) return _releaseInfo; if (_releaseInfo is EqualUnmodifiableMapView) return _releaseInfo;
@ -243,16 +202,19 @@ class _$LoginStatusImpl implements _LoginStatus {
@override @override
final bool? isDeviceSupportWinHello; final bool? isDeviceSupportWinHello;
/// Create a copy of HomeGameLoginState
/// with the given fields replaced by the non-null parameter values.
@override @override
String toString() { @JsonKey(includeFromJson: false, includeToJson: false)
return 'HomeGameLoginState(loginStatus: $loginStatus, nickname: $nickname, avatarUrl: $avatarUrl, authToken: $authToken, webToken: $webToken, releaseInfo: $releaseInfo, libraryData: $libraryData, installPath: $installPath, isDeviceSupportWinHello: $isDeviceSupportWinHello)'; @pragma('vm:prefer-inline')
} _$LoginStatusCopyWith<_LoginStatus> get copyWith =>
__$LoginStatusCopyWithImpl<_LoginStatus>(this, _$identity);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$LoginStatusImpl && other is _LoginStatus &&
(identical(other.loginStatus, loginStatus) || (identical(other.loginStatus, loginStatus) ||
other.loginStatus == loginStatus) && other.loginStatus == loginStatus) &&
(identical(other.nickname, nickname) || (identical(other.nickname, nickname) ||
@ -287,50 +249,93 @@ class _$LoginStatusImpl implements _LoginStatus {
installPath, installPath,
isDeviceSupportWinHello); isDeviceSupportWinHello);
@override
String toString() {
return 'HomeGameLoginState(loginStatus: $loginStatus, nickname: $nickname, avatarUrl: $avatarUrl, authToken: $authToken, webToken: $webToken, releaseInfo: $releaseInfo, libraryData: $libraryData, installPath: $installPath, isDeviceSupportWinHello: $isDeviceSupportWinHello)';
}
}
/// @nodoc
abstract mixin class _$LoginStatusCopyWith<$Res>
implements $HomeGameLoginStateCopyWith<$Res> {
factory _$LoginStatusCopyWith(
_LoginStatus value, $Res Function(_LoginStatus) _then) =
__$LoginStatusCopyWithImpl;
@override
@useResult
$Res call(
{int loginStatus,
String? nickname,
String? avatarUrl,
String? authToken,
String? webToken,
Map? releaseInfo,
RsiGameLibraryData? libraryData,
String? installPath,
bool? isDeviceSupportWinHello});
}
/// @nodoc
class __$LoginStatusCopyWithImpl<$Res> implements _$LoginStatusCopyWith<$Res> {
__$LoginStatusCopyWithImpl(this._self, this._then);
final _LoginStatus _self;
final $Res Function(_LoginStatus) _then;
/// Create a copy of HomeGameLoginState /// Create a copy of HomeGameLoginState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$LoginStatusImplCopyWith<_$LoginStatusImpl> get copyWith => $Res call({
__$$LoginStatusImplCopyWithImpl<_$LoginStatusImpl>(this, _$identity); Object? loginStatus = null,
Object? nickname = freezed,
Object? avatarUrl = freezed,
Object? authToken = freezed,
Object? webToken = freezed,
Object? releaseInfo = freezed,
Object? libraryData = freezed,
Object? installPath = freezed,
Object? isDeviceSupportWinHello = freezed,
}) {
return _then(_LoginStatus(
loginStatus: null == loginStatus
? _self.loginStatus
: loginStatus // ignore: cast_nullable_to_non_nullable
as int,
nickname: freezed == nickname
? _self.nickname
: nickname // ignore: cast_nullable_to_non_nullable
as String?,
avatarUrl: freezed == avatarUrl
? _self.avatarUrl
: avatarUrl // ignore: cast_nullable_to_non_nullable
as String?,
authToken: freezed == authToken
? _self.authToken
: authToken // ignore: cast_nullable_to_non_nullable
as String?,
webToken: freezed == webToken
? _self.webToken
: webToken // ignore: cast_nullable_to_non_nullable
as String?,
releaseInfo: freezed == releaseInfo
? _self._releaseInfo
: releaseInfo // ignore: cast_nullable_to_non_nullable
as Map?,
libraryData: freezed == libraryData
? _self.libraryData
: libraryData // ignore: cast_nullable_to_non_nullable
as RsiGameLibraryData?,
installPath: freezed == installPath
? _self.installPath
: installPath // ignore: cast_nullable_to_non_nullable
as String?,
isDeviceSupportWinHello: freezed == isDeviceSupportWinHello
? _self.isDeviceSupportWinHello
: isDeviceSupportWinHello // ignore: cast_nullable_to_non_nullable
as bool?,
));
}
} }
abstract class _LoginStatus implements HomeGameLoginState { // dart format on
factory _LoginStatus(
{required final int loginStatus,
final String? nickname,
final String? avatarUrl,
final String? authToken,
final String? webToken,
final Map<dynamic, dynamic>? releaseInfo,
final RsiGameLibraryData? libraryData,
final String? installPath,
final bool? isDeviceSupportWinHello}) = _$LoginStatusImpl;
@override
int get loginStatus;
@override
String? get nickname;
@override
String? get avatarUrl;
@override
String? get authToken;
@override
String? get webToken;
@override
Map<dynamic, dynamic>? get releaseInfo;
@override
RsiGameLibraryData? get libraryData;
@override
String? get installPath;
@override
bool? get isDeviceSupportWinHello;
/// Create a copy of HomeGameLoginState
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$LoginStatusImplCopyWith<_$LoginStatusImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@ -20,7 +20,7 @@ part 'home_downloader_ui_model.g.dart';
part 'home_downloader_ui_model.freezed.dart'; part 'home_downloader_ui_model.freezed.dart';
@freezed @freezed
class HomeDownloaderUIState with _$HomeDownloaderUIState { abstract class HomeDownloaderUIState with _$HomeDownloaderUIState {
factory HomeDownloaderUIState({ factory HomeDownloaderUIState({
@Default([]) List<Aria2Task> tasks, @Default([]) List<Aria2Task> tasks,
@Default([]) List<Aria2Task> waitingTasks, @Default([]) List<Aria2Task> waitingTasks,

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file // coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint // ignore_for_file: type=lint
@ -9,88 +10,57 @@ part of 'home_downloader_ui_model.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; 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 /// @nodoc
mixin _$HomeDownloaderUIState { mixin _$HomeDownloaderUIState {
List<Aria2Task> get tasks => throw _privateConstructorUsedError; List<Aria2Task> get tasks;
List<Aria2Task> get waitingTasks => throw _privateConstructorUsedError; List<Aria2Task> get waitingTasks;
List<Aria2Task> get stoppedTasks => throw _privateConstructorUsedError; List<Aria2Task> get stoppedTasks;
Aria2GlobalStat? get globalStat => throw _privateConstructorUsedError; Aria2GlobalStat? get globalStat;
/// Create a copy of HomeDownloaderUIState /// Create a copy of HomeDownloaderUIState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
$HomeDownloaderUIStateCopyWith<HomeDownloaderUIState> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $HomeDownloaderUIStateCopyWith<$Res> {
factory $HomeDownloaderUIStateCopyWith(HomeDownloaderUIState value,
$Res Function(HomeDownloaderUIState) then) =
_$HomeDownloaderUIStateCopyWithImpl<$Res, HomeDownloaderUIState>;
@useResult
$Res call(
{List<Aria2Task> tasks,
List<Aria2Task> waitingTasks,
List<Aria2Task> stoppedTasks,
Aria2GlobalStat? globalStat});
}
/// @nodoc
class _$HomeDownloaderUIStateCopyWithImpl<$Res,
$Val extends HomeDownloaderUIState>
implements $HomeDownloaderUIStateCopyWith<$Res> {
_$HomeDownloaderUIStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of HomeDownloaderUIState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
$HomeDownloaderUIStateCopyWith<HomeDownloaderUIState> get copyWith =>
_$HomeDownloaderUIStateCopyWithImpl<HomeDownloaderUIState>(
this as HomeDownloaderUIState, _$identity);
@override @override
$Res call({ bool operator ==(Object other) {
Object? tasks = null, return identical(this, other) ||
Object? waitingTasks = null, (other.runtimeType == runtimeType &&
Object? stoppedTasks = null, other is HomeDownloaderUIState &&
Object? globalStat = freezed, const DeepCollectionEquality().equals(other.tasks, tasks) &&
}) { const DeepCollectionEquality()
return _then(_value.copyWith( .equals(other.waitingTasks, waitingTasks) &&
tasks: null == tasks const DeepCollectionEquality()
? _value.tasks .equals(other.stoppedTasks, stoppedTasks) &&
: tasks // ignore: cast_nullable_to_non_nullable (identical(other.globalStat, globalStat) ||
as List<Aria2Task>, other.globalStat == globalStat));
waitingTasks: null == waitingTasks }
? _value.waitingTasks
: waitingTasks // ignore: cast_nullable_to_non_nullable @override
as List<Aria2Task>, int get hashCode => Object.hash(
stoppedTasks: null == stoppedTasks runtimeType,
? _value.stoppedTasks const DeepCollectionEquality().hash(tasks),
: stoppedTasks // ignore: cast_nullable_to_non_nullable const DeepCollectionEquality().hash(waitingTasks),
as List<Aria2Task>, const DeepCollectionEquality().hash(stoppedTasks),
globalStat: freezed == globalStat globalStat);
? _value.globalStat
: globalStat // ignore: cast_nullable_to_non_nullable @override
as Aria2GlobalStat?, String toString() {
) as $Val); return 'HomeDownloaderUIState(tasks: $tasks, waitingTasks: $waitingTasks, stoppedTasks: $stoppedTasks, globalStat: $globalStat)';
} }
} }
/// @nodoc /// @nodoc
abstract class _$$HomeDownloaderUIStateImplCopyWith<$Res> abstract mixin class $HomeDownloaderUIStateCopyWith<$Res> {
implements $HomeDownloaderUIStateCopyWith<$Res> { factory $HomeDownloaderUIStateCopyWith(HomeDownloaderUIState value,
factory _$$HomeDownloaderUIStateImplCopyWith( $Res Function(HomeDownloaderUIState) _then) =
_$HomeDownloaderUIStateImpl value, _$HomeDownloaderUIStateCopyWithImpl;
$Res Function(_$HomeDownloaderUIStateImpl) then) =
__$$HomeDownloaderUIStateImplCopyWithImpl<$Res>;
@override
@useResult @useResult
$Res call( $Res call(
{List<Aria2Task> tasks, {List<Aria2Task> tasks,
@ -100,13 +70,12 @@ abstract class _$$HomeDownloaderUIStateImplCopyWith<$Res>
} }
/// @nodoc /// @nodoc
class __$$HomeDownloaderUIStateImplCopyWithImpl<$Res> class _$HomeDownloaderUIStateCopyWithImpl<$Res>
extends _$HomeDownloaderUIStateCopyWithImpl<$Res, implements $HomeDownloaderUIStateCopyWith<$Res> {
_$HomeDownloaderUIStateImpl> _$HomeDownloaderUIStateCopyWithImpl(this._self, this._then);
implements _$$HomeDownloaderUIStateImplCopyWith<$Res> {
__$$HomeDownloaderUIStateImplCopyWithImpl(_$HomeDownloaderUIStateImpl _value, final HomeDownloaderUIState _self;
$Res Function(_$HomeDownloaderUIStateImpl) _then) final $Res Function(HomeDownloaderUIState) _then;
: super(_value, _then);
/// Create a copy of HomeDownloaderUIState /// Create a copy of HomeDownloaderUIState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -118,21 +87,21 @@ class __$$HomeDownloaderUIStateImplCopyWithImpl<$Res>
Object? stoppedTasks = null, Object? stoppedTasks = null,
Object? globalStat = freezed, Object? globalStat = freezed,
}) { }) {
return _then(_$HomeDownloaderUIStateImpl( return _then(_self.copyWith(
tasks: null == tasks tasks: null == tasks
? _value._tasks ? _self.tasks
: tasks // ignore: cast_nullable_to_non_nullable : tasks // ignore: cast_nullable_to_non_nullable
as List<Aria2Task>, as List<Aria2Task>,
waitingTasks: null == waitingTasks waitingTasks: null == waitingTasks
? _value._waitingTasks ? _self.waitingTasks
: waitingTasks // ignore: cast_nullable_to_non_nullable : waitingTasks // ignore: cast_nullable_to_non_nullable
as List<Aria2Task>, as List<Aria2Task>,
stoppedTasks: null == stoppedTasks stoppedTasks: null == stoppedTasks
? _value._stoppedTasks ? _self.stoppedTasks
: stoppedTasks // ignore: cast_nullable_to_non_nullable : stoppedTasks // ignore: cast_nullable_to_non_nullable
as List<Aria2Task>, as List<Aria2Task>,
globalStat: freezed == globalStat globalStat: freezed == globalStat
? _value.globalStat ? _self.globalStat
: globalStat // ignore: cast_nullable_to_non_nullable : globalStat // ignore: cast_nullable_to_non_nullable
as Aria2GlobalStat?, as Aria2GlobalStat?,
)); ));
@ -141,8 +110,8 @@ class __$$HomeDownloaderUIStateImplCopyWithImpl<$Res>
/// @nodoc /// @nodoc
class _$HomeDownloaderUIStateImpl implements _HomeDownloaderUIState { class _HomeDownloaderUIState implements HomeDownloaderUIState {
_$HomeDownloaderUIStateImpl( _HomeDownloaderUIState(
{final List<Aria2Task> tasks = const [], {final List<Aria2Task> tasks = const [],
final List<Aria2Task> waitingTasks = const [], final List<Aria2Task> waitingTasks = const [],
final List<Aria2Task> stoppedTasks = const [], final List<Aria2Task> stoppedTasks = const [],
@ -181,16 +150,20 @@ class _$HomeDownloaderUIStateImpl implements _HomeDownloaderUIState {
@override @override
final Aria2GlobalStat? globalStat; final Aria2GlobalStat? globalStat;
/// Create a copy of HomeDownloaderUIState
/// with the given fields replaced by the non-null parameter values.
@override @override
String toString() { @JsonKey(includeFromJson: false, includeToJson: false)
return 'HomeDownloaderUIState(tasks: $tasks, waitingTasks: $waitingTasks, stoppedTasks: $stoppedTasks, globalStat: $globalStat)'; @pragma('vm:prefer-inline')
} _$HomeDownloaderUIStateCopyWith<_HomeDownloaderUIState> get copyWith =>
__$HomeDownloaderUIStateCopyWithImpl<_HomeDownloaderUIState>(
this, _$identity);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$HomeDownloaderUIStateImpl && other is _HomeDownloaderUIState &&
const DeepCollectionEquality().equals(other._tasks, _tasks) && const DeepCollectionEquality().equals(other._tasks, _tasks) &&
const DeepCollectionEquality() const DeepCollectionEquality()
.equals(other._waitingTasks, _waitingTasks) && .equals(other._waitingTasks, _waitingTasks) &&
@ -208,36 +181,64 @@ class _$HomeDownloaderUIStateImpl implements _HomeDownloaderUIState {
const DeepCollectionEquality().hash(_stoppedTasks), const DeepCollectionEquality().hash(_stoppedTasks),
globalStat); globalStat);
@override
String toString() {
return 'HomeDownloaderUIState(tasks: $tasks, waitingTasks: $waitingTasks, stoppedTasks: $stoppedTasks, globalStat: $globalStat)';
}
}
/// @nodoc
abstract mixin class _$HomeDownloaderUIStateCopyWith<$Res>
implements $HomeDownloaderUIStateCopyWith<$Res> {
factory _$HomeDownloaderUIStateCopyWith(_HomeDownloaderUIState value,
$Res Function(_HomeDownloaderUIState) _then) =
__$HomeDownloaderUIStateCopyWithImpl;
@override
@useResult
$Res call(
{List<Aria2Task> tasks,
List<Aria2Task> waitingTasks,
List<Aria2Task> stoppedTasks,
Aria2GlobalStat? globalStat});
}
/// @nodoc
class __$HomeDownloaderUIStateCopyWithImpl<$Res>
implements _$HomeDownloaderUIStateCopyWith<$Res> {
__$HomeDownloaderUIStateCopyWithImpl(this._self, this._then);
final _HomeDownloaderUIState _self;
final $Res Function(_HomeDownloaderUIState) _then;
/// Create a copy of HomeDownloaderUIState /// Create a copy of HomeDownloaderUIState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$HomeDownloaderUIStateImplCopyWith<_$HomeDownloaderUIStateImpl> $Res call({
get copyWith => __$$HomeDownloaderUIStateImplCopyWithImpl< Object? tasks = null,
_$HomeDownloaderUIStateImpl>(this, _$identity); Object? waitingTasks = null,
Object? stoppedTasks = null,
Object? globalStat = freezed,
}) {
return _then(_HomeDownloaderUIState(
tasks: null == tasks
? _self._tasks
: tasks // ignore: cast_nullable_to_non_nullable
as List<Aria2Task>,
waitingTasks: null == waitingTasks
? _self._waitingTasks
: waitingTasks // ignore: cast_nullable_to_non_nullable
as List<Aria2Task>,
stoppedTasks: null == stoppedTasks
? _self._stoppedTasks
: stoppedTasks // ignore: cast_nullable_to_non_nullable
as List<Aria2Task>,
globalStat: freezed == globalStat
? _self.globalStat
: globalStat // ignore: cast_nullable_to_non_nullable
as Aria2GlobalStat?,
));
}
} }
abstract class _HomeDownloaderUIState implements HomeDownloaderUIState { // dart format on
factory _HomeDownloaderUIState(
{final List<Aria2Task> tasks,
final List<Aria2Task> waitingTasks,
final List<Aria2Task> stoppedTasks,
final Aria2GlobalStat? globalStat}) = _$HomeDownloaderUIStateImpl;
@override
List<Aria2Task> get tasks;
@override
List<Aria2Task> get waitingTasks;
@override
List<Aria2Task> get stoppedTasks;
@override
Aria2GlobalStat? get globalStat;
/// Create a copy of HomeDownloaderUIState
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$HomeDownloaderUIStateImplCopyWith<_$HomeDownloaderUIStateImpl>
get copyWith => throw _privateConstructorUsedError;
}

View File

@ -16,7 +16,7 @@ part 'game_doctor_ui_model.g.dart';
part 'game_doctor_ui_model.freezed.dart'; part 'game_doctor_ui_model.freezed.dart';
@freezed @freezed
class HomeGameDoctorState with _$HomeGameDoctorState { abstract class HomeGameDoctorState with _$HomeGameDoctorState {
factory HomeGameDoctorState({ factory HomeGameDoctorState({
@Default(false) bool isChecking, @Default(false) bool isChecking,
@Default(false) bool isFixing, @Default(false) bool isFixing,

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file // coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint // ignore_for_file: type=lint
@ -9,94 +10,62 @@ part of 'game_doctor_ui_model.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; 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 /// @nodoc
mixin _$HomeGameDoctorState { mixin _$HomeGameDoctorState {
bool get isChecking => throw _privateConstructorUsedError; bool get isChecking;
bool get isFixing => throw _privateConstructorUsedError; bool get isFixing;
String get lastScreenInfo => throw _privateConstructorUsedError; String get lastScreenInfo;
String get isFixingString => throw _privateConstructorUsedError; String get isFixingString;
List<MapEntry<String, String>>? get checkResult => List<MapEntry<String, String>>? get checkResult;
throw _privateConstructorUsedError;
/// Create a copy of HomeGameDoctorState /// Create a copy of HomeGameDoctorState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
$HomeGameDoctorStateCopyWith<HomeGameDoctorState> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $HomeGameDoctorStateCopyWith<$Res> {
factory $HomeGameDoctorStateCopyWith(
HomeGameDoctorState value, $Res Function(HomeGameDoctorState) then) =
_$HomeGameDoctorStateCopyWithImpl<$Res, HomeGameDoctorState>;
@useResult
$Res call(
{bool isChecking,
bool isFixing,
String lastScreenInfo,
String isFixingString,
List<MapEntry<String, String>>? checkResult});
}
/// @nodoc
class _$HomeGameDoctorStateCopyWithImpl<$Res, $Val extends HomeGameDoctorState>
implements $HomeGameDoctorStateCopyWith<$Res> {
_$HomeGameDoctorStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of HomeGameDoctorState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
$HomeGameDoctorStateCopyWith<HomeGameDoctorState> get copyWith =>
_$HomeGameDoctorStateCopyWithImpl<HomeGameDoctorState>(
this as HomeGameDoctorState, _$identity);
@override @override
$Res call({ bool operator ==(Object other) {
Object? isChecking = null, return identical(this, other) ||
Object? isFixing = null, (other.runtimeType == runtimeType &&
Object? lastScreenInfo = null, other is HomeGameDoctorState &&
Object? isFixingString = null, (identical(other.isChecking, isChecking) ||
Object? checkResult = freezed, other.isChecking == isChecking) &&
}) { (identical(other.isFixing, isFixing) ||
return _then(_value.copyWith( other.isFixing == isFixing) &&
isChecking: null == isChecking (identical(other.lastScreenInfo, lastScreenInfo) ||
? _value.isChecking other.lastScreenInfo == lastScreenInfo) &&
: isChecking // ignore: cast_nullable_to_non_nullable (identical(other.isFixingString, isFixingString) ||
as bool, other.isFixingString == isFixingString) &&
isFixing: null == isFixing const DeepCollectionEquality()
? _value.isFixing .equals(other.checkResult, checkResult));
: isFixing // ignore: cast_nullable_to_non_nullable }
as bool,
lastScreenInfo: null == lastScreenInfo @override
? _value.lastScreenInfo int get hashCode => Object.hash(
: lastScreenInfo // ignore: cast_nullable_to_non_nullable runtimeType,
as String, isChecking,
isFixingString: null == isFixingString isFixing,
? _value.isFixingString lastScreenInfo,
: isFixingString // ignore: cast_nullable_to_non_nullable isFixingString,
as String, const DeepCollectionEquality().hash(checkResult));
checkResult: freezed == checkResult
? _value.checkResult @override
: checkResult // ignore: cast_nullable_to_non_nullable String toString() {
as List<MapEntry<String, String>>?, return 'HomeGameDoctorState(isChecking: $isChecking, isFixing: $isFixing, lastScreenInfo: $lastScreenInfo, isFixingString: $isFixingString, checkResult: $checkResult)';
) as $Val);
} }
} }
/// @nodoc /// @nodoc
abstract class _$$HomeGameDoctorStateImplCopyWith<$Res> abstract mixin class $HomeGameDoctorStateCopyWith<$Res> {
implements $HomeGameDoctorStateCopyWith<$Res> { factory $HomeGameDoctorStateCopyWith(
factory _$$HomeGameDoctorStateImplCopyWith(_$HomeGameDoctorStateImpl value, HomeGameDoctorState value, $Res Function(HomeGameDoctorState) _then) =
$Res Function(_$HomeGameDoctorStateImpl) then) = _$HomeGameDoctorStateCopyWithImpl;
__$$HomeGameDoctorStateImplCopyWithImpl<$Res>;
@override
@useResult @useResult
$Res call( $Res call(
{bool isChecking, {bool isChecking,
@ -107,12 +76,12 @@ abstract class _$$HomeGameDoctorStateImplCopyWith<$Res>
} }
/// @nodoc /// @nodoc
class __$$HomeGameDoctorStateImplCopyWithImpl<$Res> class _$HomeGameDoctorStateCopyWithImpl<$Res>
extends _$HomeGameDoctorStateCopyWithImpl<$Res, _$HomeGameDoctorStateImpl> implements $HomeGameDoctorStateCopyWith<$Res> {
implements _$$HomeGameDoctorStateImplCopyWith<$Res> { _$HomeGameDoctorStateCopyWithImpl(this._self, this._then);
__$$HomeGameDoctorStateImplCopyWithImpl(_$HomeGameDoctorStateImpl _value,
$Res Function(_$HomeGameDoctorStateImpl) _then) final HomeGameDoctorState _self;
: super(_value, _then); final $Res Function(HomeGameDoctorState) _then;
/// Create a copy of HomeGameDoctorState /// Create a copy of HomeGameDoctorState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -125,25 +94,25 @@ class __$$HomeGameDoctorStateImplCopyWithImpl<$Res>
Object? isFixingString = null, Object? isFixingString = null,
Object? checkResult = freezed, Object? checkResult = freezed,
}) { }) {
return _then(_$HomeGameDoctorStateImpl( return _then(_self.copyWith(
isChecking: null == isChecking isChecking: null == isChecking
? _value.isChecking ? _self.isChecking
: isChecking // ignore: cast_nullable_to_non_nullable : isChecking // ignore: cast_nullable_to_non_nullable
as bool, as bool,
isFixing: null == isFixing isFixing: null == isFixing
? _value.isFixing ? _self.isFixing
: isFixing // ignore: cast_nullable_to_non_nullable : isFixing // ignore: cast_nullable_to_non_nullable
as bool, as bool,
lastScreenInfo: null == lastScreenInfo lastScreenInfo: null == lastScreenInfo
? _value.lastScreenInfo ? _self.lastScreenInfo
: lastScreenInfo // ignore: cast_nullable_to_non_nullable : lastScreenInfo // ignore: cast_nullable_to_non_nullable
as String, as String,
isFixingString: null == isFixingString isFixingString: null == isFixingString
? _value.isFixingString ? _self.isFixingString
: isFixingString // ignore: cast_nullable_to_non_nullable : isFixingString // ignore: cast_nullable_to_non_nullable
as String, as String,
checkResult: freezed == checkResult checkResult: freezed == checkResult
? _value._checkResult ? _self.checkResult
: checkResult // ignore: cast_nullable_to_non_nullable : checkResult // ignore: cast_nullable_to_non_nullable
as List<MapEntry<String, String>>?, as List<MapEntry<String, String>>?,
)); ));
@ -152,8 +121,8 @@ class __$$HomeGameDoctorStateImplCopyWithImpl<$Res>
/// @nodoc /// @nodoc
class _$HomeGameDoctorStateImpl implements _HomeGameDoctorState { class _HomeGameDoctorState implements HomeGameDoctorState {
_$HomeGameDoctorStateImpl( _HomeGameDoctorState(
{this.isChecking = false, {this.isChecking = false,
this.isFixing = false, this.isFixing = false,
this.lastScreenInfo = "", this.lastScreenInfo = "",
@ -183,16 +152,20 @@ class _$HomeGameDoctorStateImpl implements _HomeGameDoctorState {
return EqualUnmodifiableListView(value); return EqualUnmodifiableListView(value);
} }
/// Create a copy of HomeGameDoctorState
/// with the given fields replaced by the non-null parameter values.
@override @override
String toString() { @JsonKey(includeFromJson: false, includeToJson: false)
return 'HomeGameDoctorState(isChecking: $isChecking, isFixing: $isFixing, lastScreenInfo: $lastScreenInfo, isFixingString: $isFixingString, checkResult: $checkResult)'; @pragma('vm:prefer-inline')
} _$HomeGameDoctorStateCopyWith<_HomeGameDoctorState> get copyWith =>
__$HomeGameDoctorStateCopyWithImpl<_HomeGameDoctorState>(
this, _$identity);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$HomeGameDoctorStateImpl && other is _HomeGameDoctorState &&
(identical(other.isChecking, isChecking) || (identical(other.isChecking, isChecking) ||
other.isChecking == isChecking) && other.isChecking == isChecking) &&
(identical(other.isFixing, isFixing) || (identical(other.isFixing, isFixing) ||
@ -214,40 +187,70 @@ class _$HomeGameDoctorStateImpl implements _HomeGameDoctorState {
isFixingString, isFixingString,
const DeepCollectionEquality().hash(_checkResult)); const DeepCollectionEquality().hash(_checkResult));
@override
String toString() {
return 'HomeGameDoctorState(isChecking: $isChecking, isFixing: $isFixing, lastScreenInfo: $lastScreenInfo, isFixingString: $isFixingString, checkResult: $checkResult)';
}
}
/// @nodoc
abstract mixin class _$HomeGameDoctorStateCopyWith<$Res>
implements $HomeGameDoctorStateCopyWith<$Res> {
factory _$HomeGameDoctorStateCopyWith(_HomeGameDoctorState value,
$Res Function(_HomeGameDoctorState) _then) =
__$HomeGameDoctorStateCopyWithImpl;
@override
@useResult
$Res call(
{bool isChecking,
bool isFixing,
String lastScreenInfo,
String isFixingString,
List<MapEntry<String, String>>? checkResult});
}
/// @nodoc
class __$HomeGameDoctorStateCopyWithImpl<$Res>
implements _$HomeGameDoctorStateCopyWith<$Res> {
__$HomeGameDoctorStateCopyWithImpl(this._self, this._then);
final _HomeGameDoctorState _self;
final $Res Function(_HomeGameDoctorState) _then;
/// Create a copy of HomeGameDoctorState /// Create a copy of HomeGameDoctorState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$HomeGameDoctorStateImplCopyWith<_$HomeGameDoctorStateImpl> get copyWith => $Res call({
__$$HomeGameDoctorStateImplCopyWithImpl<_$HomeGameDoctorStateImpl>( Object? isChecking = null,
this, _$identity); Object? isFixing = null,
Object? lastScreenInfo = null,
Object? isFixingString = null,
Object? checkResult = freezed,
}) {
return _then(_HomeGameDoctorState(
isChecking: null == isChecking
? _self.isChecking
: isChecking // ignore: cast_nullable_to_non_nullable
as bool,
isFixing: null == isFixing
? _self.isFixing
: isFixing // ignore: cast_nullable_to_non_nullable
as bool,
lastScreenInfo: null == lastScreenInfo
? _self.lastScreenInfo
: lastScreenInfo // ignore: cast_nullable_to_non_nullable
as String,
isFixingString: null == isFixingString
? _self.isFixingString
: isFixingString // ignore: cast_nullable_to_non_nullable
as String,
checkResult: freezed == checkResult
? _self._checkResult
: checkResult // ignore: cast_nullable_to_non_nullable
as List<MapEntry<String, String>>?,
));
}
} }
abstract class _HomeGameDoctorState implements HomeGameDoctorState { // dart format on
factory _HomeGameDoctorState(
{final bool isChecking,
final bool isFixing,
final String lastScreenInfo,
final String isFixingString,
final List<MapEntry<String, String>>? checkResult}) =
_$HomeGameDoctorStateImpl;
@override
bool get isChecking;
@override
bool get isFixing;
@override
String get lastScreenInfo;
@override
String get isFixingString;
@override
List<MapEntry<String, String>>? get checkResult;
/// Create a copy of HomeGameDoctorState
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$HomeGameDoctorStateImplCopyWith<_$HomeGameDoctorStateImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@ -37,7 +37,7 @@ part 'home_ui_model.freezed.dart';
part 'home_ui_model.g.dart'; part 'home_ui_model.g.dart';
@freezed @freezed
class HomeUIModelState with _$HomeUIModelState { abstract class HomeUIModelState with _$HomeUIModelState {
factory HomeUIModelState({ factory HomeUIModelState({
AppPlacardData? appPlacardData, AppPlacardData? appPlacardData,
@Default(false) bool isFixing, @Default(false) bool isFixing,

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file // coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint // ignore_for_file: type=lint
@ -9,152 +10,96 @@ part of 'home_ui_model.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; 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 /// @nodoc
mixin _$HomeUIModelState { mixin _$HomeUIModelState {
AppPlacardData? get appPlacardData => throw _privateConstructorUsedError; AppPlacardData? get appPlacardData;
bool get isFixing => throw _privateConstructorUsedError; bool get isFixing;
String get isFixingString => throw _privateConstructorUsedError; String get isFixingString;
String? get scInstalledPath => throw _privateConstructorUsedError; String? get scInstalledPath;
List<String> get scInstallPaths => throw _privateConstructorUsedError; List<String> get scInstallPaths;
AppWebLocalizationVersionsData? get webLocalizationVersionsData => AppWebLocalizationVersionsData? get webLocalizationVersionsData;
throw _privateConstructorUsedError; String get lastScreenInfo;
String get lastScreenInfo => throw _privateConstructorUsedError; List<RssItem>? get rssVideoItems;
List<RssItem>? get rssVideoItems => throw _privateConstructorUsedError; List<RssItem>? get rssTextItems;
List<RssItem>? get rssTextItems => throw _privateConstructorUsedError; MapEntry<String, bool>? get localizationUpdateInfo;
MapEntry<String, bool>? get localizationUpdateInfo => List? get scServerStatus;
throw _privateConstructorUsedError; List<CountdownFestivalItemData>? get countdownFestivalListData;
List<dynamic>? get scServerStatus => throw _privateConstructorUsedError; Map<String, bool> get isGameRunning;
List<CountdownFestivalItemData>? get countdownFestivalListData =>
throw _privateConstructorUsedError;
Map<String, bool> get isGameRunning => throw _privateConstructorUsedError;
/// Create a copy of HomeUIModelState /// Create a copy of HomeUIModelState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
$HomeUIModelStateCopyWith<HomeUIModelState> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $HomeUIModelStateCopyWith<$Res> {
factory $HomeUIModelStateCopyWith(
HomeUIModelState value, $Res Function(HomeUIModelState) then) =
_$HomeUIModelStateCopyWithImpl<$Res, HomeUIModelState>;
@useResult
$Res call(
{AppPlacardData? appPlacardData,
bool isFixing,
String isFixingString,
String? scInstalledPath,
List<String> scInstallPaths,
AppWebLocalizationVersionsData? webLocalizationVersionsData,
String lastScreenInfo,
List<RssItem>? rssVideoItems,
List<RssItem>? rssTextItems,
MapEntry<String, bool>? localizationUpdateInfo,
List<dynamic>? scServerStatus,
List<CountdownFestivalItemData>? countdownFestivalListData,
Map<String, bool> isGameRunning});
}
/// @nodoc
class _$HomeUIModelStateCopyWithImpl<$Res, $Val extends HomeUIModelState>
implements $HomeUIModelStateCopyWith<$Res> {
_$HomeUIModelStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of HomeUIModelState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
$HomeUIModelStateCopyWith<HomeUIModelState> get copyWith =>
_$HomeUIModelStateCopyWithImpl<HomeUIModelState>(
this as HomeUIModelState, _$identity);
@override @override
$Res call({ bool operator ==(Object other) {
Object? appPlacardData = freezed, return identical(this, other) ||
Object? isFixing = null, (other.runtimeType == runtimeType &&
Object? isFixingString = null, other is HomeUIModelState &&
Object? scInstalledPath = freezed, (identical(other.appPlacardData, appPlacardData) ||
Object? scInstallPaths = null, other.appPlacardData == appPlacardData) &&
Object? webLocalizationVersionsData = freezed, (identical(other.isFixing, isFixing) ||
Object? lastScreenInfo = null, other.isFixing == isFixing) &&
Object? rssVideoItems = freezed, (identical(other.isFixingString, isFixingString) ||
Object? rssTextItems = freezed, other.isFixingString == isFixingString) &&
Object? localizationUpdateInfo = freezed, (identical(other.scInstalledPath, scInstalledPath) ||
Object? scServerStatus = freezed, other.scInstalledPath == scInstalledPath) &&
Object? countdownFestivalListData = freezed, const DeepCollectionEquality()
Object? isGameRunning = null, .equals(other.scInstallPaths, scInstallPaths) &&
}) { (identical(other.webLocalizationVersionsData,
return _then(_value.copyWith( webLocalizationVersionsData) ||
appPlacardData: freezed == appPlacardData other.webLocalizationVersionsData ==
? _value.appPlacardData webLocalizationVersionsData) &&
: appPlacardData // ignore: cast_nullable_to_non_nullable (identical(other.lastScreenInfo, lastScreenInfo) ||
as AppPlacardData?, other.lastScreenInfo == lastScreenInfo) &&
isFixing: null == isFixing const DeepCollectionEquality()
? _value.isFixing .equals(other.rssVideoItems, rssVideoItems) &&
: isFixing // ignore: cast_nullable_to_non_nullable const DeepCollectionEquality()
as bool, .equals(other.rssTextItems, rssTextItems) &&
isFixingString: null == isFixingString (identical(other.localizationUpdateInfo, localizationUpdateInfo) ||
? _value.isFixingString other.localizationUpdateInfo == localizationUpdateInfo) &&
: isFixingString // ignore: cast_nullable_to_non_nullable const DeepCollectionEquality()
as String, .equals(other.scServerStatus, scServerStatus) &&
scInstalledPath: freezed == scInstalledPath const DeepCollectionEquality().equals(
? _value.scInstalledPath other.countdownFestivalListData, countdownFestivalListData) &&
: scInstalledPath // ignore: cast_nullable_to_non_nullable const DeepCollectionEquality()
as String?, .equals(other.isGameRunning, isGameRunning));
scInstallPaths: null == scInstallPaths }
? _value.scInstallPaths
: scInstallPaths // ignore: cast_nullable_to_non_nullable @override
as List<String>, int get hashCode => Object.hash(
webLocalizationVersionsData: freezed == webLocalizationVersionsData runtimeType,
? _value.webLocalizationVersionsData appPlacardData,
: webLocalizationVersionsData // ignore: cast_nullable_to_non_nullable isFixing,
as AppWebLocalizationVersionsData?, isFixingString,
lastScreenInfo: null == lastScreenInfo scInstalledPath,
? _value.lastScreenInfo const DeepCollectionEquality().hash(scInstallPaths),
: lastScreenInfo // ignore: cast_nullable_to_non_nullable webLocalizationVersionsData,
as String, lastScreenInfo,
rssVideoItems: freezed == rssVideoItems const DeepCollectionEquality().hash(rssVideoItems),
? _value.rssVideoItems const DeepCollectionEquality().hash(rssTextItems),
: rssVideoItems // ignore: cast_nullable_to_non_nullable localizationUpdateInfo,
as List<RssItem>?, const DeepCollectionEquality().hash(scServerStatus),
rssTextItems: freezed == rssTextItems const DeepCollectionEquality().hash(countdownFestivalListData),
? _value.rssTextItems const DeepCollectionEquality().hash(isGameRunning));
: rssTextItems // ignore: cast_nullable_to_non_nullable
as List<RssItem>?, @override
localizationUpdateInfo: freezed == localizationUpdateInfo String toString() {
? _value.localizationUpdateInfo return 'HomeUIModelState(appPlacardData: $appPlacardData, isFixing: $isFixing, isFixingString: $isFixingString, scInstalledPath: $scInstalledPath, scInstallPaths: $scInstallPaths, webLocalizationVersionsData: $webLocalizationVersionsData, lastScreenInfo: $lastScreenInfo, rssVideoItems: $rssVideoItems, rssTextItems: $rssTextItems, localizationUpdateInfo: $localizationUpdateInfo, scServerStatus: $scServerStatus, countdownFestivalListData: $countdownFestivalListData, isGameRunning: $isGameRunning)';
: localizationUpdateInfo // ignore: cast_nullable_to_non_nullable
as MapEntry<String, bool>?,
scServerStatus: freezed == scServerStatus
? _value.scServerStatus
: scServerStatus // ignore: cast_nullable_to_non_nullable
as List<dynamic>?,
countdownFestivalListData: freezed == countdownFestivalListData
? _value.countdownFestivalListData
: countdownFestivalListData // ignore: cast_nullable_to_non_nullable
as List<CountdownFestivalItemData>?,
isGameRunning: null == isGameRunning
? _value.isGameRunning
: isGameRunning // ignore: cast_nullable_to_non_nullable
as Map<String, bool>,
) as $Val);
} }
} }
/// @nodoc /// @nodoc
abstract class _$$HomeUIModelStateImplCopyWith<$Res> abstract mixin class $HomeUIModelStateCopyWith<$Res> {
implements $HomeUIModelStateCopyWith<$Res> { factory $HomeUIModelStateCopyWith(
factory _$$HomeUIModelStateImplCopyWith(_$HomeUIModelStateImpl value, HomeUIModelState value, $Res Function(HomeUIModelState) _then) =
$Res Function(_$HomeUIModelStateImpl) then) = _$HomeUIModelStateCopyWithImpl;
__$$HomeUIModelStateImplCopyWithImpl<$Res>;
@override
@useResult @useResult
$Res call( $Res call(
{AppPlacardData? appPlacardData, {AppPlacardData? appPlacardData,
@ -167,18 +112,18 @@ abstract class _$$HomeUIModelStateImplCopyWith<$Res>
List<RssItem>? rssVideoItems, List<RssItem>? rssVideoItems,
List<RssItem>? rssTextItems, List<RssItem>? rssTextItems,
MapEntry<String, bool>? localizationUpdateInfo, MapEntry<String, bool>? localizationUpdateInfo,
List<dynamic>? scServerStatus, List? scServerStatus,
List<CountdownFestivalItemData>? countdownFestivalListData, List<CountdownFestivalItemData>? countdownFestivalListData,
Map<String, bool> isGameRunning}); Map<String, bool> isGameRunning});
} }
/// @nodoc /// @nodoc
class __$$HomeUIModelStateImplCopyWithImpl<$Res> class _$HomeUIModelStateCopyWithImpl<$Res>
extends _$HomeUIModelStateCopyWithImpl<$Res, _$HomeUIModelStateImpl> implements $HomeUIModelStateCopyWith<$Res> {
implements _$$HomeUIModelStateImplCopyWith<$Res> { _$HomeUIModelStateCopyWithImpl(this._self, this._then);
__$$HomeUIModelStateImplCopyWithImpl(_$HomeUIModelStateImpl _value,
$Res Function(_$HomeUIModelStateImpl) _then) final HomeUIModelState _self;
: super(_value, _then); final $Res Function(HomeUIModelState) _then;
/// Create a copy of HomeUIModelState /// Create a copy of HomeUIModelState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -199,57 +144,57 @@ class __$$HomeUIModelStateImplCopyWithImpl<$Res>
Object? countdownFestivalListData = freezed, Object? countdownFestivalListData = freezed,
Object? isGameRunning = null, Object? isGameRunning = null,
}) { }) {
return _then(_$HomeUIModelStateImpl( return _then(_self.copyWith(
appPlacardData: freezed == appPlacardData appPlacardData: freezed == appPlacardData
? _value.appPlacardData ? _self.appPlacardData
: appPlacardData // ignore: cast_nullable_to_non_nullable : appPlacardData // ignore: cast_nullable_to_non_nullable
as AppPlacardData?, as AppPlacardData?,
isFixing: null == isFixing isFixing: null == isFixing
? _value.isFixing ? _self.isFixing
: isFixing // ignore: cast_nullable_to_non_nullable : isFixing // ignore: cast_nullable_to_non_nullable
as bool, as bool,
isFixingString: null == isFixingString isFixingString: null == isFixingString
? _value.isFixingString ? _self.isFixingString
: isFixingString // ignore: cast_nullable_to_non_nullable : isFixingString // ignore: cast_nullable_to_non_nullable
as String, as String,
scInstalledPath: freezed == scInstalledPath scInstalledPath: freezed == scInstalledPath
? _value.scInstalledPath ? _self.scInstalledPath
: scInstalledPath // ignore: cast_nullable_to_non_nullable : scInstalledPath // ignore: cast_nullable_to_non_nullable
as String?, as String?,
scInstallPaths: null == scInstallPaths scInstallPaths: null == scInstallPaths
? _value._scInstallPaths ? _self.scInstallPaths
: scInstallPaths // ignore: cast_nullable_to_non_nullable : scInstallPaths // ignore: cast_nullable_to_non_nullable
as List<String>, as List<String>,
webLocalizationVersionsData: freezed == webLocalizationVersionsData webLocalizationVersionsData: freezed == webLocalizationVersionsData
? _value.webLocalizationVersionsData ? _self.webLocalizationVersionsData
: webLocalizationVersionsData // ignore: cast_nullable_to_non_nullable : webLocalizationVersionsData // ignore: cast_nullable_to_non_nullable
as AppWebLocalizationVersionsData?, as AppWebLocalizationVersionsData?,
lastScreenInfo: null == lastScreenInfo lastScreenInfo: null == lastScreenInfo
? _value.lastScreenInfo ? _self.lastScreenInfo
: lastScreenInfo // ignore: cast_nullable_to_non_nullable : lastScreenInfo // ignore: cast_nullable_to_non_nullable
as String, as String,
rssVideoItems: freezed == rssVideoItems rssVideoItems: freezed == rssVideoItems
? _value._rssVideoItems ? _self.rssVideoItems
: rssVideoItems // ignore: cast_nullable_to_non_nullable : rssVideoItems // ignore: cast_nullable_to_non_nullable
as List<RssItem>?, as List<RssItem>?,
rssTextItems: freezed == rssTextItems rssTextItems: freezed == rssTextItems
? _value._rssTextItems ? _self.rssTextItems
: rssTextItems // ignore: cast_nullable_to_non_nullable : rssTextItems // ignore: cast_nullable_to_non_nullable
as List<RssItem>?, as List<RssItem>?,
localizationUpdateInfo: freezed == localizationUpdateInfo localizationUpdateInfo: freezed == localizationUpdateInfo
? _value.localizationUpdateInfo ? _self.localizationUpdateInfo
: localizationUpdateInfo // ignore: cast_nullable_to_non_nullable : localizationUpdateInfo // ignore: cast_nullable_to_non_nullable
as MapEntry<String, bool>?, as MapEntry<String, bool>?,
scServerStatus: freezed == scServerStatus scServerStatus: freezed == scServerStatus
? _value._scServerStatus ? _self.scServerStatus
: scServerStatus // ignore: cast_nullable_to_non_nullable : scServerStatus // ignore: cast_nullable_to_non_nullable
as List<dynamic>?, as List?,
countdownFestivalListData: freezed == countdownFestivalListData countdownFestivalListData: freezed == countdownFestivalListData
? _value._countdownFestivalListData ? _self.countdownFestivalListData
: countdownFestivalListData // ignore: cast_nullable_to_non_nullable : countdownFestivalListData // ignore: cast_nullable_to_non_nullable
as List<CountdownFestivalItemData>?, as List<CountdownFestivalItemData>?,
isGameRunning: null == isGameRunning isGameRunning: null == isGameRunning
? _value._isGameRunning ? _self.isGameRunning
: isGameRunning // ignore: cast_nullable_to_non_nullable : isGameRunning // ignore: cast_nullable_to_non_nullable
as Map<String, bool>, as Map<String, bool>,
)); ));
@ -258,8 +203,8 @@ class __$$HomeUIModelStateImplCopyWithImpl<$Res>
/// @nodoc /// @nodoc
class _$HomeUIModelStateImpl implements _HomeUIModelState { class _HomeUIModelState implements HomeUIModelState {
_$HomeUIModelStateImpl( _HomeUIModelState(
{this.appPlacardData, {this.appPlacardData,
this.isFixing = false, this.isFixing = false,
this.isFixingString = "", this.isFixingString = "",
@ -270,7 +215,7 @@ class _$HomeUIModelStateImpl implements _HomeUIModelState {
final List<RssItem>? rssVideoItems, final List<RssItem>? rssVideoItems,
final List<RssItem>? rssTextItems, final List<RssItem>? rssTextItems,
this.localizationUpdateInfo, this.localizationUpdateInfo,
final List<dynamic>? scServerStatus, final List? scServerStatus,
final List<CountdownFestivalItemData>? countdownFestivalListData, final List<CountdownFestivalItemData>? countdownFestivalListData,
final Map<String, bool> isGameRunning = const {}}) final Map<String, bool> isGameRunning = const {}})
: _scInstallPaths = scInstallPaths, : _scInstallPaths = scInstallPaths,
@ -326,9 +271,9 @@ class _$HomeUIModelStateImpl implements _HomeUIModelState {
@override @override
final MapEntry<String, bool>? localizationUpdateInfo; final MapEntry<String, bool>? localizationUpdateInfo;
final List<dynamic>? _scServerStatus; final List? _scServerStatus;
@override @override
List<dynamic>? get scServerStatus { List? get scServerStatus {
final value = _scServerStatus; final value = _scServerStatus;
if (value == null) return null; if (value == null) return null;
if (_scServerStatus is EqualUnmodifiableListView) return _scServerStatus; if (_scServerStatus is EqualUnmodifiableListView) return _scServerStatus;
@ -356,16 +301,19 @@ class _$HomeUIModelStateImpl implements _HomeUIModelState {
return EqualUnmodifiableMapView(_isGameRunning); return EqualUnmodifiableMapView(_isGameRunning);
} }
/// Create a copy of HomeUIModelState
/// with the given fields replaced by the non-null parameter values.
@override @override
String toString() { @JsonKey(includeFromJson: false, includeToJson: false)
return 'HomeUIModelState(appPlacardData: $appPlacardData, isFixing: $isFixing, isFixingString: $isFixingString, scInstalledPath: $scInstalledPath, scInstallPaths: $scInstallPaths, webLocalizationVersionsData: $webLocalizationVersionsData, lastScreenInfo: $lastScreenInfo, rssVideoItems: $rssVideoItems, rssTextItems: $rssTextItems, localizationUpdateInfo: $localizationUpdateInfo, scServerStatus: $scServerStatus, countdownFestivalListData: $countdownFestivalListData, isGameRunning: $isGameRunning)'; @pragma('vm:prefer-inline')
} _$HomeUIModelStateCopyWith<_HomeUIModelState> get copyWith =>
__$HomeUIModelStateCopyWithImpl<_HomeUIModelState>(this, _$identity);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$HomeUIModelStateImpl && other is _HomeUIModelState &&
(identical(other.appPlacardData, appPlacardData) || (identical(other.appPlacardData, appPlacardData) ||
other.appPlacardData == appPlacardData) && other.appPlacardData == appPlacardData) &&
(identical(other.isFixing, isFixing) || (identical(other.isFixing, isFixing) ||
@ -413,63 +361,118 @@ class _$HomeUIModelStateImpl implements _HomeUIModelState {
const DeepCollectionEquality().hash(_countdownFestivalListData), const DeepCollectionEquality().hash(_countdownFestivalListData),
const DeepCollectionEquality().hash(_isGameRunning)); const DeepCollectionEquality().hash(_isGameRunning));
@override
String toString() {
return 'HomeUIModelState(appPlacardData: $appPlacardData, isFixing: $isFixing, isFixingString: $isFixingString, scInstalledPath: $scInstalledPath, scInstallPaths: $scInstallPaths, webLocalizationVersionsData: $webLocalizationVersionsData, lastScreenInfo: $lastScreenInfo, rssVideoItems: $rssVideoItems, rssTextItems: $rssTextItems, localizationUpdateInfo: $localizationUpdateInfo, scServerStatus: $scServerStatus, countdownFestivalListData: $countdownFestivalListData, isGameRunning: $isGameRunning)';
}
}
/// @nodoc
abstract mixin class _$HomeUIModelStateCopyWith<$Res>
implements $HomeUIModelStateCopyWith<$Res> {
factory _$HomeUIModelStateCopyWith(
_HomeUIModelState value, $Res Function(_HomeUIModelState) _then) =
__$HomeUIModelStateCopyWithImpl;
@override
@useResult
$Res call(
{AppPlacardData? appPlacardData,
bool isFixing,
String isFixingString,
String? scInstalledPath,
List<String> scInstallPaths,
AppWebLocalizationVersionsData? webLocalizationVersionsData,
String lastScreenInfo,
List<RssItem>? rssVideoItems,
List<RssItem>? rssTextItems,
MapEntry<String, bool>? localizationUpdateInfo,
List? scServerStatus,
List<CountdownFestivalItemData>? countdownFestivalListData,
Map<String, bool> isGameRunning});
}
/// @nodoc
class __$HomeUIModelStateCopyWithImpl<$Res>
implements _$HomeUIModelStateCopyWith<$Res> {
__$HomeUIModelStateCopyWithImpl(this._self, this._then);
final _HomeUIModelState _self;
final $Res Function(_HomeUIModelState) _then;
/// Create a copy of HomeUIModelState /// Create a copy of HomeUIModelState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$HomeUIModelStateImplCopyWith<_$HomeUIModelStateImpl> get copyWith => $Res call({
__$$HomeUIModelStateImplCopyWithImpl<_$HomeUIModelStateImpl>( Object? appPlacardData = freezed,
this, _$identity); Object? isFixing = null,
Object? isFixingString = null,
Object? scInstalledPath = freezed,
Object? scInstallPaths = null,
Object? webLocalizationVersionsData = freezed,
Object? lastScreenInfo = null,
Object? rssVideoItems = freezed,
Object? rssTextItems = freezed,
Object? localizationUpdateInfo = freezed,
Object? scServerStatus = freezed,
Object? countdownFestivalListData = freezed,
Object? isGameRunning = null,
}) {
return _then(_HomeUIModelState(
appPlacardData: freezed == appPlacardData
? _self.appPlacardData
: appPlacardData // ignore: cast_nullable_to_non_nullable
as AppPlacardData?,
isFixing: null == isFixing
? _self.isFixing
: isFixing // ignore: cast_nullable_to_non_nullable
as bool,
isFixingString: null == isFixingString
? _self.isFixingString
: isFixingString // ignore: cast_nullable_to_non_nullable
as String,
scInstalledPath: freezed == scInstalledPath
? _self.scInstalledPath
: scInstalledPath // ignore: cast_nullable_to_non_nullable
as String?,
scInstallPaths: null == scInstallPaths
? _self._scInstallPaths
: scInstallPaths // ignore: cast_nullable_to_non_nullable
as List<String>,
webLocalizationVersionsData: freezed == webLocalizationVersionsData
? _self.webLocalizationVersionsData
: webLocalizationVersionsData // ignore: cast_nullable_to_non_nullable
as AppWebLocalizationVersionsData?,
lastScreenInfo: null == lastScreenInfo
? _self.lastScreenInfo
: lastScreenInfo // ignore: cast_nullable_to_non_nullable
as String,
rssVideoItems: freezed == rssVideoItems
? _self._rssVideoItems
: rssVideoItems // ignore: cast_nullable_to_non_nullable
as List<RssItem>?,
rssTextItems: freezed == rssTextItems
? _self._rssTextItems
: rssTextItems // ignore: cast_nullable_to_non_nullable
as List<RssItem>?,
localizationUpdateInfo: freezed == localizationUpdateInfo
? _self.localizationUpdateInfo
: localizationUpdateInfo // ignore: cast_nullable_to_non_nullable
as MapEntry<String, bool>?,
scServerStatus: freezed == scServerStatus
? _self._scServerStatus
: scServerStatus // ignore: cast_nullable_to_non_nullable
as List?,
countdownFestivalListData: freezed == countdownFestivalListData
? _self._countdownFestivalListData
: countdownFestivalListData // ignore: cast_nullable_to_non_nullable
as List<CountdownFestivalItemData>?,
isGameRunning: null == isGameRunning
? _self._isGameRunning
: isGameRunning // ignore: cast_nullable_to_non_nullable
as Map<String, bool>,
));
}
} }
abstract class _HomeUIModelState implements HomeUIModelState { // dart format on
factory _HomeUIModelState(
{final AppPlacardData? appPlacardData,
final bool isFixing,
final String isFixingString,
final String? scInstalledPath,
final List<String> scInstallPaths,
final AppWebLocalizationVersionsData? webLocalizationVersionsData,
final String lastScreenInfo,
final List<RssItem>? rssVideoItems,
final List<RssItem>? rssTextItems,
final MapEntry<String, bool>? localizationUpdateInfo,
final List<dynamic>? scServerStatus,
final List<CountdownFestivalItemData>? countdownFestivalListData,
final Map<String, bool> isGameRunning}) = _$HomeUIModelStateImpl;
@override
AppPlacardData? get appPlacardData;
@override
bool get isFixing;
@override
String get isFixingString;
@override
String? get scInstalledPath;
@override
List<String> get scInstallPaths;
@override
AppWebLocalizationVersionsData? get webLocalizationVersionsData;
@override
String get lastScreenInfo;
@override
List<RssItem>? get rssVideoItems;
@override
List<RssItem>? get rssTextItems;
@override
MapEntry<String, bool>? get localizationUpdateInfo;
@override
List<dynamic>? get scServerStatus;
@override
List<CountdownFestivalItemData>? get countdownFestivalListData;
@override
Map<String, bool> get isGameRunning;
/// Create a copy of HomeUIModelState
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$HomeUIModelStateImplCopyWith<_$HomeUIModelStateImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@ -14,7 +14,7 @@ part 'input_method_dialog_ui_model.g.dart';
part 'input_method_dialog_ui_model.freezed.dart'; part 'input_method_dialog_ui_model.freezed.dart';
@freezed @freezed
class InputMethodDialogUIState with _$InputMethodDialogUIState { abstract class InputMethodDialogUIState with _$InputMethodDialogUIState {
factory InputMethodDialogUIState( factory InputMethodDialogUIState(
Map<String, String>? keyMaps, Map<String, String>? keyMaps,
Map<String, String>? worldMaps, { Map<String, String>? worldMaps, {

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file // coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint // ignore_for_file: type=lint
@ -9,95 +10,60 @@ part of 'input_method_dialog_ui_model.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; 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 /// @nodoc
mixin _$InputMethodDialogUIState { mixin _$InputMethodDialogUIState {
Map<String, String>? get keyMaps => throw _privateConstructorUsedError; Map<String, String>? get keyMaps;
Map<String, String>? get worldMaps => throw _privateConstructorUsedError; Map<String, String>? get worldMaps;
bool get enableAutoCopy => throw _privateConstructorUsedError; bool get enableAutoCopy;
bool get isEnableAutoTranslate => throw _privateConstructorUsedError; bool get isEnableAutoTranslate;
bool get isAutoTranslateWorking => throw _privateConstructorUsedError; bool get isAutoTranslateWorking;
/// Create a copy of InputMethodDialogUIState /// Create a copy of InputMethodDialogUIState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
$InputMethodDialogUIStateCopyWith<InputMethodDialogUIState> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $InputMethodDialogUIStateCopyWith<$Res> {
factory $InputMethodDialogUIStateCopyWith(InputMethodDialogUIState value,
$Res Function(InputMethodDialogUIState) then) =
_$InputMethodDialogUIStateCopyWithImpl<$Res, InputMethodDialogUIState>;
@useResult
$Res call(
{Map<String, String>? keyMaps,
Map<String, String>? worldMaps,
bool enableAutoCopy,
bool isEnableAutoTranslate,
bool isAutoTranslateWorking});
}
/// @nodoc
class _$InputMethodDialogUIStateCopyWithImpl<$Res,
$Val extends InputMethodDialogUIState>
implements $InputMethodDialogUIStateCopyWith<$Res> {
_$InputMethodDialogUIStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of InputMethodDialogUIState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
$InputMethodDialogUIStateCopyWith<InputMethodDialogUIState> get copyWith =>
_$InputMethodDialogUIStateCopyWithImpl<InputMethodDialogUIState>(
this as InputMethodDialogUIState, _$identity);
@override @override
$Res call({ bool operator ==(Object other) {
Object? keyMaps = freezed, return identical(this, other) ||
Object? worldMaps = freezed, (other.runtimeType == runtimeType &&
Object? enableAutoCopy = null, other is InputMethodDialogUIState &&
Object? isEnableAutoTranslate = null, const DeepCollectionEquality().equals(other.keyMaps, keyMaps) &&
Object? isAutoTranslateWorking = null, const DeepCollectionEquality().equals(other.worldMaps, worldMaps) &&
}) { (identical(other.enableAutoCopy, enableAutoCopy) ||
return _then(_value.copyWith( other.enableAutoCopy == enableAutoCopy) &&
keyMaps: freezed == keyMaps (identical(other.isEnableAutoTranslate, isEnableAutoTranslate) ||
? _value.keyMaps other.isEnableAutoTranslate == isEnableAutoTranslate) &&
: keyMaps // ignore: cast_nullable_to_non_nullable (identical(other.isAutoTranslateWorking, isAutoTranslateWorking) ||
as Map<String, String>?, other.isAutoTranslateWorking == isAutoTranslateWorking));
worldMaps: freezed == worldMaps }
? _value.worldMaps
: worldMaps // ignore: cast_nullable_to_non_nullable @override
as Map<String, String>?, int get hashCode => Object.hash(
enableAutoCopy: null == enableAutoCopy runtimeType,
? _value.enableAutoCopy const DeepCollectionEquality().hash(keyMaps),
: enableAutoCopy // ignore: cast_nullable_to_non_nullable const DeepCollectionEquality().hash(worldMaps),
as bool, enableAutoCopy,
isEnableAutoTranslate: null == isEnableAutoTranslate isEnableAutoTranslate,
? _value.isEnableAutoTranslate isAutoTranslateWorking);
: isEnableAutoTranslate // ignore: cast_nullable_to_non_nullable
as bool, @override
isAutoTranslateWorking: null == isAutoTranslateWorking String toString() {
? _value.isAutoTranslateWorking return 'InputMethodDialogUIState(keyMaps: $keyMaps, worldMaps: $worldMaps, enableAutoCopy: $enableAutoCopy, isEnableAutoTranslate: $isEnableAutoTranslate, isAutoTranslateWorking: $isAutoTranslateWorking)';
: isAutoTranslateWorking // ignore: cast_nullable_to_non_nullable
as bool,
) as $Val);
} }
} }
/// @nodoc /// @nodoc
abstract class _$$InputMethodDialogUIStateImplCopyWith<$Res> abstract mixin class $InputMethodDialogUIStateCopyWith<$Res> {
implements $InputMethodDialogUIStateCopyWith<$Res> { factory $InputMethodDialogUIStateCopyWith(InputMethodDialogUIState value,
factory _$$InputMethodDialogUIStateImplCopyWith( $Res Function(InputMethodDialogUIState) _then) =
_$InputMethodDialogUIStateImpl value, _$InputMethodDialogUIStateCopyWithImpl;
$Res Function(_$InputMethodDialogUIStateImpl) then) =
__$$InputMethodDialogUIStateImplCopyWithImpl<$Res>;
@override
@useResult @useResult
$Res call( $Res call(
{Map<String, String>? keyMaps, {Map<String, String>? keyMaps,
@ -108,14 +74,12 @@ abstract class _$$InputMethodDialogUIStateImplCopyWith<$Res>
} }
/// @nodoc /// @nodoc
class __$$InputMethodDialogUIStateImplCopyWithImpl<$Res> class _$InputMethodDialogUIStateCopyWithImpl<$Res>
extends _$InputMethodDialogUIStateCopyWithImpl<$Res, implements $InputMethodDialogUIStateCopyWith<$Res> {
_$InputMethodDialogUIStateImpl> _$InputMethodDialogUIStateCopyWithImpl(this._self, this._then);
implements _$$InputMethodDialogUIStateImplCopyWith<$Res> {
__$$InputMethodDialogUIStateImplCopyWithImpl( final InputMethodDialogUIState _self;
_$InputMethodDialogUIStateImpl _value, final $Res Function(InputMethodDialogUIState) _then;
$Res Function(_$InputMethodDialogUIStateImpl) _then)
: super(_value, _then);
/// Create a copy of InputMethodDialogUIState /// Create a copy of InputMethodDialogUIState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -128,25 +92,25 @@ class __$$InputMethodDialogUIStateImplCopyWithImpl<$Res>
Object? isEnableAutoTranslate = null, Object? isEnableAutoTranslate = null,
Object? isAutoTranslateWorking = null, Object? isAutoTranslateWorking = null,
}) { }) {
return _then(_$InputMethodDialogUIStateImpl( return _then(_self.copyWith(
freezed == keyMaps keyMaps: freezed == keyMaps
? _value._keyMaps ? _self.keyMaps
: keyMaps // ignore: cast_nullable_to_non_nullable : keyMaps // ignore: cast_nullable_to_non_nullable
as Map<String, String>?, as Map<String, String>?,
freezed == worldMaps worldMaps: freezed == worldMaps
? _value._worldMaps ? _self.worldMaps
: worldMaps // ignore: cast_nullable_to_non_nullable : worldMaps // ignore: cast_nullable_to_non_nullable
as Map<String, String>?, as Map<String, String>?,
enableAutoCopy: null == enableAutoCopy enableAutoCopy: null == enableAutoCopy
? _value.enableAutoCopy ? _self.enableAutoCopy
: enableAutoCopy // ignore: cast_nullable_to_non_nullable : enableAutoCopy // ignore: cast_nullable_to_non_nullable
as bool, as bool,
isEnableAutoTranslate: null == isEnableAutoTranslate isEnableAutoTranslate: null == isEnableAutoTranslate
? _value.isEnableAutoTranslate ? _self.isEnableAutoTranslate
: isEnableAutoTranslate // ignore: cast_nullable_to_non_nullable : isEnableAutoTranslate // ignore: cast_nullable_to_non_nullable
as bool, as bool,
isAutoTranslateWorking: null == isAutoTranslateWorking isAutoTranslateWorking: null == isAutoTranslateWorking
? _value.isAutoTranslateWorking ? _self.isAutoTranslateWorking
: isAutoTranslateWorking // ignore: cast_nullable_to_non_nullable : isAutoTranslateWorking // ignore: cast_nullable_to_non_nullable
as bool, as bool,
)); ));
@ -155,8 +119,8 @@ class __$$InputMethodDialogUIStateImplCopyWithImpl<$Res>
/// @nodoc /// @nodoc
class _$InputMethodDialogUIStateImpl implements _InputMethodDialogUIState { class _InputMethodDialogUIState implements InputMethodDialogUIState {
_$InputMethodDialogUIStateImpl( _InputMethodDialogUIState(
final Map<String, String>? keyMaps, final Map<String, String>? worldMaps, final Map<String, String>? keyMaps, final Map<String, String>? worldMaps,
{this.enableAutoCopy = false, {this.enableAutoCopy = false,
this.isEnableAutoTranslate = false, this.isEnableAutoTranslate = false,
@ -194,16 +158,20 @@ class _$InputMethodDialogUIStateImpl implements _InputMethodDialogUIState {
@JsonKey() @JsonKey()
final bool isAutoTranslateWorking; final bool isAutoTranslateWorking;
/// Create a copy of InputMethodDialogUIState
/// with the given fields replaced by the non-null parameter values.
@override @override
String toString() { @JsonKey(includeFromJson: false, includeToJson: false)
return 'InputMethodDialogUIState(keyMaps: $keyMaps, worldMaps: $worldMaps, enableAutoCopy: $enableAutoCopy, isEnableAutoTranslate: $isEnableAutoTranslate, isAutoTranslateWorking: $isAutoTranslateWorking)'; @pragma('vm:prefer-inline')
} _$InputMethodDialogUIStateCopyWith<_InputMethodDialogUIState> get copyWith =>
__$InputMethodDialogUIStateCopyWithImpl<_InputMethodDialogUIState>(
this, _$identity);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$InputMethodDialogUIStateImpl && other is _InputMethodDialogUIState &&
const DeepCollectionEquality().equals(other._keyMaps, _keyMaps) && const DeepCollectionEquality().equals(other._keyMaps, _keyMaps) &&
const DeepCollectionEquality() const DeepCollectionEquality()
.equals(other._worldMaps, _worldMaps) && .equals(other._worldMaps, _worldMaps) &&
@ -224,38 +192,70 @@ class _$InputMethodDialogUIStateImpl implements _InputMethodDialogUIState {
isEnableAutoTranslate, isEnableAutoTranslate,
isAutoTranslateWorking); isAutoTranslateWorking);
@override
String toString() {
return 'InputMethodDialogUIState(keyMaps: $keyMaps, worldMaps: $worldMaps, enableAutoCopy: $enableAutoCopy, isEnableAutoTranslate: $isEnableAutoTranslate, isAutoTranslateWorking: $isAutoTranslateWorking)';
}
}
/// @nodoc
abstract mixin class _$InputMethodDialogUIStateCopyWith<$Res>
implements $InputMethodDialogUIStateCopyWith<$Res> {
factory _$InputMethodDialogUIStateCopyWith(_InputMethodDialogUIState value,
$Res Function(_InputMethodDialogUIState) _then) =
__$InputMethodDialogUIStateCopyWithImpl;
@override
@useResult
$Res call(
{Map<String, String>? keyMaps,
Map<String, String>? worldMaps,
bool enableAutoCopy,
bool isEnableAutoTranslate,
bool isAutoTranslateWorking});
}
/// @nodoc
class __$InputMethodDialogUIStateCopyWithImpl<$Res>
implements _$InputMethodDialogUIStateCopyWith<$Res> {
__$InputMethodDialogUIStateCopyWithImpl(this._self, this._then);
final _InputMethodDialogUIState _self;
final $Res Function(_InputMethodDialogUIState) _then;
/// Create a copy of InputMethodDialogUIState /// Create a copy of InputMethodDialogUIState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$InputMethodDialogUIStateImplCopyWith<_$InputMethodDialogUIStateImpl> $Res call({
get copyWith => __$$InputMethodDialogUIStateImplCopyWithImpl< Object? keyMaps = freezed,
_$InputMethodDialogUIStateImpl>(this, _$identity); Object? worldMaps = freezed,
Object? enableAutoCopy = null,
Object? isEnableAutoTranslate = null,
Object? isAutoTranslateWorking = null,
}) {
return _then(_InputMethodDialogUIState(
freezed == keyMaps
? _self._keyMaps
: keyMaps // ignore: cast_nullable_to_non_nullable
as Map<String, String>?,
freezed == worldMaps
? _self._worldMaps
: worldMaps // ignore: cast_nullable_to_non_nullable
as Map<String, String>?,
enableAutoCopy: null == enableAutoCopy
? _self.enableAutoCopy
: enableAutoCopy // ignore: cast_nullable_to_non_nullable
as bool,
isEnableAutoTranslate: null == isEnableAutoTranslate
? _self.isEnableAutoTranslate
: isEnableAutoTranslate // ignore: cast_nullable_to_non_nullable
as bool,
isAutoTranslateWorking: null == isAutoTranslateWorking
? _self.isAutoTranslateWorking
: isAutoTranslateWorking // ignore: cast_nullable_to_non_nullable
as bool,
));
}
} }
abstract class _InputMethodDialogUIState implements InputMethodDialogUIState { // dart format on
factory _InputMethodDialogUIState(
final Map<String, String>? keyMaps, final Map<String, String>? worldMaps,
{final bool enableAutoCopy,
final bool isEnableAutoTranslate,
final bool isAutoTranslateWorking}) = _$InputMethodDialogUIStateImpl;
@override
Map<String, String>? get keyMaps;
@override
Map<String, String>? get worldMaps;
@override
bool get enableAutoCopy;
@override
bool get isEnableAutoTranslate;
@override
bool get isAutoTranslateWorking;
/// Create a copy of InputMethodDialogUIState
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$InputMethodDialogUIStateImplCopyWith<_$InputMethodDialogUIStateImpl>
get copyWith => throw _privateConstructorUsedError;
}

View File

@ -20,7 +20,7 @@ part 'server.g.dart';
part 'server.freezed.dart'; part 'server.freezed.dart';
@freezed @freezed
class InputMethodServerState with _$InputMethodServerState { abstract class InputMethodServerState with _$InputMethodServerState {
const factory InputMethodServerState({ const factory InputMethodServerState({
@Default(false) bool isServerStartup, @Default(false) bool isServerStartup,
String? serverAddressText, String? serverAddressText,

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file // coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint // ignore_for_file: type=lint
@ -9,129 +10,27 @@ part of 'server.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; 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 /// @nodoc
mixin _$InputMethodServerState { mixin _$InputMethodServerState {
bool get isServerStartup => throw _privateConstructorUsedError; bool get isServerStartup;
String? get serverAddressText => throw _privateConstructorUsedError; String? get serverAddressText;
/// Create a copy of InputMethodServerState /// Create a copy of InputMethodServerState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$InputMethodServerStateCopyWith<InputMethodServerState> get copyWith => $InputMethodServerStateCopyWith<InputMethodServerState> get copyWith =>
throw _privateConstructorUsedError; _$InputMethodServerStateCopyWithImpl<InputMethodServerState>(
} this as InputMethodServerState, _$identity);
/// @nodoc
abstract class $InputMethodServerStateCopyWith<$Res> {
factory $InputMethodServerStateCopyWith(InputMethodServerState value,
$Res Function(InputMethodServerState) then) =
_$InputMethodServerStateCopyWithImpl<$Res, InputMethodServerState>;
@useResult
$Res call({bool isServerStartup, String? serverAddressText});
}
/// @nodoc
class _$InputMethodServerStateCopyWithImpl<$Res,
$Val extends InputMethodServerState>
implements $InputMethodServerStateCopyWith<$Res> {
_$InputMethodServerStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of InputMethodServerState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? isServerStartup = null,
Object? serverAddressText = freezed,
}) {
return _then(_value.copyWith(
isServerStartup: null == isServerStartup
? _value.isServerStartup
: isServerStartup // ignore: cast_nullable_to_non_nullable
as bool,
serverAddressText: freezed == serverAddressText
? _value.serverAddressText
: serverAddressText // ignore: cast_nullable_to_non_nullable
as String?,
) as $Val);
}
}
/// @nodoc
abstract class _$$InputMethodServerStateImplCopyWith<$Res>
implements $InputMethodServerStateCopyWith<$Res> {
factory _$$InputMethodServerStateImplCopyWith(
_$InputMethodServerStateImpl value,
$Res Function(_$InputMethodServerStateImpl) then) =
__$$InputMethodServerStateImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({bool isServerStartup, String? serverAddressText});
}
/// @nodoc
class __$$InputMethodServerStateImplCopyWithImpl<$Res>
extends _$InputMethodServerStateCopyWithImpl<$Res,
_$InputMethodServerStateImpl>
implements _$$InputMethodServerStateImplCopyWith<$Res> {
__$$InputMethodServerStateImplCopyWithImpl(
_$InputMethodServerStateImpl _value,
$Res Function(_$InputMethodServerStateImpl) _then)
: super(_value, _then);
/// Create a copy of InputMethodServerState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? isServerStartup = null,
Object? serverAddressText = freezed,
}) {
return _then(_$InputMethodServerStateImpl(
isServerStartup: null == isServerStartup
? _value.isServerStartup
: isServerStartup // ignore: cast_nullable_to_non_nullable
as bool,
serverAddressText: freezed == serverAddressText
? _value.serverAddressText
: serverAddressText // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
class _$InputMethodServerStateImpl implements _InputMethodServerState {
const _$InputMethodServerStateImpl(
{this.isServerStartup = false, this.serverAddressText});
@override
@JsonKey()
final bool isServerStartup;
@override
final String? serverAddressText;
@override
String toString() {
return 'InputMethodServerState(isServerStartup: $isServerStartup, serverAddressText: $serverAddressText)';
}
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$InputMethodServerStateImpl && other is InputMethodServerState &&
(identical(other.isServerStartup, isServerStartup) || (identical(other.isServerStartup, isServerStartup) ||
other.isServerStartup == isServerStartup) && other.isServerStartup == isServerStartup) &&
(identical(other.serverAddressText, serverAddressText) || (identical(other.serverAddressText, serverAddressText) ||
@ -142,30 +41,130 @@ class _$InputMethodServerStateImpl implements _InputMethodServerState {
int get hashCode => int get hashCode =>
Object.hash(runtimeType, isServerStartup, serverAddressText); Object.hash(runtimeType, isServerStartup, serverAddressText);
@override
String toString() {
return 'InputMethodServerState(isServerStartup: $isServerStartup, serverAddressText: $serverAddressText)';
}
}
/// @nodoc
abstract mixin class $InputMethodServerStateCopyWith<$Res> {
factory $InputMethodServerStateCopyWith(InputMethodServerState value,
$Res Function(InputMethodServerState) _then) =
_$InputMethodServerStateCopyWithImpl;
@useResult
$Res call({bool isServerStartup, String? serverAddressText});
}
/// @nodoc
class _$InputMethodServerStateCopyWithImpl<$Res>
implements $InputMethodServerStateCopyWith<$Res> {
_$InputMethodServerStateCopyWithImpl(this._self, this._then);
final InputMethodServerState _self;
final $Res Function(InputMethodServerState) _then;
/// Create a copy of InputMethodServerState /// Create a copy of InputMethodServerState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? isServerStartup = null,
Object? serverAddressText = freezed,
}) {
return _then(_self.copyWith(
isServerStartup: null == isServerStartup
? _self.isServerStartup
: isServerStartup // ignore: cast_nullable_to_non_nullable
as bool,
serverAddressText: freezed == serverAddressText
? _self.serverAddressText
: serverAddressText // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
class _InputMethodServerState implements InputMethodServerState {
const _InputMethodServerState(
{this.isServerStartup = false, this.serverAddressText});
@override
@JsonKey()
final bool isServerStartup;
@override
final String? serverAddressText;
/// Create a copy of InputMethodServerState
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$InputMethodServerStateCopyWith<_InputMethodServerState> get copyWith =>
__$InputMethodServerStateCopyWithImpl<_InputMethodServerState>(
this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _InputMethodServerState &&
(identical(other.isServerStartup, isServerStartup) ||
other.isServerStartup == isServerStartup) &&
(identical(other.serverAddressText, serverAddressText) ||
other.serverAddressText == serverAddressText));
}
@override
int get hashCode =>
Object.hash(runtimeType, isServerStartup, serverAddressText);
@override
String toString() {
return 'InputMethodServerState(isServerStartup: $isServerStartup, serverAddressText: $serverAddressText)';
}
}
/// @nodoc
abstract mixin class _$InputMethodServerStateCopyWith<$Res>
implements $InputMethodServerStateCopyWith<$Res> {
factory _$InputMethodServerStateCopyWith(_InputMethodServerState value,
$Res Function(_InputMethodServerState) _then) =
__$InputMethodServerStateCopyWithImpl;
@override
@useResult
$Res call({bool isServerStartup, String? serverAddressText});
}
/// @nodoc
class __$InputMethodServerStateCopyWithImpl<$Res>
implements _$InputMethodServerStateCopyWith<$Res> {
__$InputMethodServerStateCopyWithImpl(this._self, this._then);
final _InputMethodServerState _self;
final $Res Function(_InputMethodServerState) _then;
/// Create a copy of InputMethodServerState
/// with the given fields replaced by the non-null parameter values.
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$InputMethodServerStateImplCopyWith<_$InputMethodServerStateImpl> $Res call({
get copyWith => __$$InputMethodServerStateImplCopyWithImpl< Object? isServerStartup = null,
_$InputMethodServerStateImpl>(this, _$identity); Object? serverAddressText = freezed,
}) {
return _then(_InputMethodServerState(
isServerStartup: null == isServerStartup
? _self.isServerStartup
: isServerStartup // ignore: cast_nullable_to_non_nullable
as bool,
serverAddressText: freezed == serverAddressText
? _self.serverAddressText
: serverAddressText // ignore: cast_nullable_to_non_nullable
as String?,
));
}
} }
abstract class _InputMethodServerState implements InputMethodServerState { // dart format on
const factory _InputMethodServerState(
{final bool isServerStartup,
final String? serverAddressText}) = _$InputMethodServerStateImpl;
@override
bool get isServerStartup;
@override
String? get serverAddressText;
/// Create a copy of InputMethodServerState
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$InputMethodServerStateImplCopyWith<_$InputMethodServerStateImpl>
get copyWith => throw _privateConstructorUsedError;
}

View File

@ -27,7 +27,7 @@ part 'advanced_localization_ui_model.g.dart';
part 'advanced_localization_ui_model.freezed.dart'; part 'advanced_localization_ui_model.freezed.dart';
@freezed @freezed
class AdvancedLocalizationUIState with _$AdvancedLocalizationUIState { abstract class AdvancedLocalizationUIState with _$AdvancedLocalizationUIState {
factory AdvancedLocalizationUIState({ factory AdvancedLocalizationUIState({
@Default("") String workingText, @Default("") String workingText,
Map<String, AppAdvancedLocalizationClassKeysData>? classMap, Map<String, AppAdvancedLocalizationClassKeysData>? classMap,

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file // coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint // ignore_for_file: type=lint
@ -9,127 +10,79 @@ part of 'advanced_localization_ui_model.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; 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 /// @nodoc
mixin _$AdvancedLocalizationUIState { mixin _$AdvancedLocalizationUIState {
String get workingText => throw _privateConstructorUsedError; String get workingText;
Map<String, AppAdvancedLocalizationClassKeysData>? get classMap => Map<String, AppAdvancedLocalizationClassKeysData>? get classMap;
throw _privateConstructorUsedError; String? get p4kGlobalIni;
String? get p4kGlobalIni => throw _privateConstructorUsedError; String? get serverGlobalIni;
String? get serverGlobalIni => throw _privateConstructorUsedError; String? get customizeGlobalIni;
String? get customizeGlobalIni => throw _privateConstructorUsedError; ScLocalizationData? get apiLocalizationData;
ScLocalizationData? get apiLocalizationData => int get p4kGlobalIniLines;
throw _privateConstructorUsedError; int get serverGlobalIniLines;
int get p4kGlobalIniLines => throw _privateConstructorUsedError; String get errorMessage;
int get serverGlobalIniLines => throw _privateConstructorUsedError;
String get errorMessage => throw _privateConstructorUsedError;
/// Create a copy of AdvancedLocalizationUIState /// Create a copy of AdvancedLocalizationUIState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
$AdvancedLocalizationUIStateCopyWith<AdvancedLocalizationUIState>
get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $AdvancedLocalizationUIStateCopyWith<$Res> {
factory $AdvancedLocalizationUIStateCopyWith(
AdvancedLocalizationUIState value,
$Res Function(AdvancedLocalizationUIState) then) =
_$AdvancedLocalizationUIStateCopyWithImpl<$Res,
AdvancedLocalizationUIState>;
@useResult
$Res call(
{String workingText,
Map<String, AppAdvancedLocalizationClassKeysData>? classMap,
String? p4kGlobalIni,
String? serverGlobalIni,
String? customizeGlobalIni,
ScLocalizationData? apiLocalizationData,
int p4kGlobalIniLines,
int serverGlobalIniLines,
String errorMessage});
}
/// @nodoc
class _$AdvancedLocalizationUIStateCopyWithImpl<$Res,
$Val extends AdvancedLocalizationUIState>
implements $AdvancedLocalizationUIStateCopyWith<$Res> {
_$AdvancedLocalizationUIStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of AdvancedLocalizationUIState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
$AdvancedLocalizationUIStateCopyWith<AdvancedLocalizationUIState>
get copyWith => _$AdvancedLocalizationUIStateCopyWithImpl<
AdvancedLocalizationUIState>(
this as AdvancedLocalizationUIState, _$identity);
@override @override
$Res call({ bool operator ==(Object other) {
Object? workingText = null, return identical(this, other) ||
Object? classMap = freezed, (other.runtimeType == runtimeType &&
Object? p4kGlobalIni = freezed, other is AdvancedLocalizationUIState &&
Object? serverGlobalIni = freezed, (identical(other.workingText, workingText) ||
Object? customizeGlobalIni = freezed, other.workingText == workingText) &&
Object? apiLocalizationData = freezed, const DeepCollectionEquality().equals(other.classMap, classMap) &&
Object? p4kGlobalIniLines = null, (identical(other.p4kGlobalIni, p4kGlobalIni) ||
Object? serverGlobalIniLines = null, other.p4kGlobalIni == p4kGlobalIni) &&
Object? errorMessage = null, (identical(other.serverGlobalIni, serverGlobalIni) ||
}) { other.serverGlobalIni == serverGlobalIni) &&
return _then(_value.copyWith( (identical(other.customizeGlobalIni, customizeGlobalIni) ||
workingText: null == workingText other.customizeGlobalIni == customizeGlobalIni) &&
? _value.workingText (identical(other.apiLocalizationData, apiLocalizationData) ||
: workingText // ignore: cast_nullable_to_non_nullable other.apiLocalizationData == apiLocalizationData) &&
as String, (identical(other.p4kGlobalIniLines, p4kGlobalIniLines) ||
classMap: freezed == classMap other.p4kGlobalIniLines == p4kGlobalIniLines) &&
? _value.classMap (identical(other.serverGlobalIniLines, serverGlobalIniLines) ||
: classMap // ignore: cast_nullable_to_non_nullable other.serverGlobalIniLines == serverGlobalIniLines) &&
as Map<String, AppAdvancedLocalizationClassKeysData>?, (identical(other.errorMessage, errorMessage) ||
p4kGlobalIni: freezed == p4kGlobalIni other.errorMessage == errorMessage));
? _value.p4kGlobalIni }
: p4kGlobalIni // ignore: cast_nullable_to_non_nullable
as String?, @override
serverGlobalIni: freezed == serverGlobalIni int get hashCode => Object.hash(
? _value.serverGlobalIni runtimeType,
: serverGlobalIni // ignore: cast_nullable_to_non_nullable workingText,
as String?, const DeepCollectionEquality().hash(classMap),
customizeGlobalIni: freezed == customizeGlobalIni p4kGlobalIni,
? _value.customizeGlobalIni serverGlobalIni,
: customizeGlobalIni // ignore: cast_nullable_to_non_nullable customizeGlobalIni,
as String?, apiLocalizationData,
apiLocalizationData: freezed == apiLocalizationData p4kGlobalIniLines,
? _value.apiLocalizationData serverGlobalIniLines,
: apiLocalizationData // ignore: cast_nullable_to_non_nullable errorMessage);
as ScLocalizationData?,
p4kGlobalIniLines: null == p4kGlobalIniLines @override
? _value.p4kGlobalIniLines String toString() {
: p4kGlobalIniLines // ignore: cast_nullable_to_non_nullable return 'AdvancedLocalizationUIState(workingText: $workingText, classMap: $classMap, p4kGlobalIni: $p4kGlobalIni, serverGlobalIni: $serverGlobalIni, customizeGlobalIni: $customizeGlobalIni, apiLocalizationData: $apiLocalizationData, p4kGlobalIniLines: $p4kGlobalIniLines, serverGlobalIniLines: $serverGlobalIniLines, errorMessage: $errorMessage)';
as int,
serverGlobalIniLines: null == serverGlobalIniLines
? _value.serverGlobalIniLines
: serverGlobalIniLines // ignore: cast_nullable_to_non_nullable
as int,
errorMessage: null == errorMessage
? _value.errorMessage
: errorMessage // ignore: cast_nullable_to_non_nullable
as String,
) as $Val);
} }
} }
/// @nodoc /// @nodoc
abstract class _$$AdvancedLocalizationUIStateImplCopyWith<$Res> abstract mixin class $AdvancedLocalizationUIStateCopyWith<$Res> {
implements $AdvancedLocalizationUIStateCopyWith<$Res> { factory $AdvancedLocalizationUIStateCopyWith(
factory _$$AdvancedLocalizationUIStateImplCopyWith( AdvancedLocalizationUIState value,
_$AdvancedLocalizationUIStateImpl value, $Res Function(AdvancedLocalizationUIState) _then) =
$Res Function(_$AdvancedLocalizationUIStateImpl) then) = _$AdvancedLocalizationUIStateCopyWithImpl;
__$$AdvancedLocalizationUIStateImplCopyWithImpl<$Res>;
@override
@useResult @useResult
$Res call( $Res call(
{String workingText, {String workingText,
@ -144,14 +97,12 @@ abstract class _$$AdvancedLocalizationUIStateImplCopyWith<$Res>
} }
/// @nodoc /// @nodoc
class __$$AdvancedLocalizationUIStateImplCopyWithImpl<$Res> class _$AdvancedLocalizationUIStateCopyWithImpl<$Res>
extends _$AdvancedLocalizationUIStateCopyWithImpl<$Res, implements $AdvancedLocalizationUIStateCopyWith<$Res> {
_$AdvancedLocalizationUIStateImpl> _$AdvancedLocalizationUIStateCopyWithImpl(this._self, this._then);
implements _$$AdvancedLocalizationUIStateImplCopyWith<$Res> {
__$$AdvancedLocalizationUIStateImplCopyWithImpl( final AdvancedLocalizationUIState _self;
_$AdvancedLocalizationUIStateImpl _value, final $Res Function(AdvancedLocalizationUIState) _then;
$Res Function(_$AdvancedLocalizationUIStateImpl) _then)
: super(_value, _then);
/// Create a copy of AdvancedLocalizationUIState /// Create a copy of AdvancedLocalizationUIState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -168,41 +119,41 @@ class __$$AdvancedLocalizationUIStateImplCopyWithImpl<$Res>
Object? serverGlobalIniLines = null, Object? serverGlobalIniLines = null,
Object? errorMessage = null, Object? errorMessage = null,
}) { }) {
return _then(_$AdvancedLocalizationUIStateImpl( return _then(_self.copyWith(
workingText: null == workingText workingText: null == workingText
? _value.workingText ? _self.workingText
: workingText // ignore: cast_nullable_to_non_nullable : workingText // ignore: cast_nullable_to_non_nullable
as String, as String,
classMap: freezed == classMap classMap: freezed == classMap
? _value._classMap ? _self.classMap
: classMap // ignore: cast_nullable_to_non_nullable : classMap // ignore: cast_nullable_to_non_nullable
as Map<String, AppAdvancedLocalizationClassKeysData>?, as Map<String, AppAdvancedLocalizationClassKeysData>?,
p4kGlobalIni: freezed == p4kGlobalIni p4kGlobalIni: freezed == p4kGlobalIni
? _value.p4kGlobalIni ? _self.p4kGlobalIni
: p4kGlobalIni // ignore: cast_nullable_to_non_nullable : p4kGlobalIni // ignore: cast_nullable_to_non_nullable
as String?, as String?,
serverGlobalIni: freezed == serverGlobalIni serverGlobalIni: freezed == serverGlobalIni
? _value.serverGlobalIni ? _self.serverGlobalIni
: serverGlobalIni // ignore: cast_nullable_to_non_nullable : serverGlobalIni // ignore: cast_nullable_to_non_nullable
as String?, as String?,
customizeGlobalIni: freezed == customizeGlobalIni customizeGlobalIni: freezed == customizeGlobalIni
? _value.customizeGlobalIni ? _self.customizeGlobalIni
: customizeGlobalIni // ignore: cast_nullable_to_non_nullable : customizeGlobalIni // ignore: cast_nullable_to_non_nullable
as String?, as String?,
apiLocalizationData: freezed == apiLocalizationData apiLocalizationData: freezed == apiLocalizationData
? _value.apiLocalizationData ? _self.apiLocalizationData
: apiLocalizationData // ignore: cast_nullable_to_non_nullable : apiLocalizationData // ignore: cast_nullable_to_non_nullable
as ScLocalizationData?, as ScLocalizationData?,
p4kGlobalIniLines: null == p4kGlobalIniLines p4kGlobalIniLines: null == p4kGlobalIniLines
? _value.p4kGlobalIniLines ? _self.p4kGlobalIniLines
: p4kGlobalIniLines // ignore: cast_nullable_to_non_nullable : p4kGlobalIniLines // ignore: cast_nullable_to_non_nullable
as int, as int,
serverGlobalIniLines: null == serverGlobalIniLines serverGlobalIniLines: null == serverGlobalIniLines
? _value.serverGlobalIniLines ? _self.serverGlobalIniLines
: serverGlobalIniLines // ignore: cast_nullable_to_non_nullable : serverGlobalIniLines // ignore: cast_nullable_to_non_nullable
as int, as int,
errorMessage: null == errorMessage errorMessage: null == errorMessage
? _value.errorMessage ? _self.errorMessage
: errorMessage // ignore: cast_nullable_to_non_nullable : errorMessage // ignore: cast_nullable_to_non_nullable
as String, as String,
)); ));
@ -211,9 +162,8 @@ class __$$AdvancedLocalizationUIStateImplCopyWithImpl<$Res>
/// @nodoc /// @nodoc
class _$AdvancedLocalizationUIStateImpl class _AdvancedLocalizationUIState implements AdvancedLocalizationUIState {
implements _AdvancedLocalizationUIState { _AdvancedLocalizationUIState(
_$AdvancedLocalizationUIStateImpl(
{this.workingText = "", {this.workingText = "",
final Map<String, AppAdvancedLocalizationClassKeysData>? classMap, final Map<String, AppAdvancedLocalizationClassKeysData>? classMap,
this.p4kGlobalIni, this.p4kGlobalIni,
@ -256,16 +206,20 @@ class _$AdvancedLocalizationUIStateImpl
@JsonKey() @JsonKey()
final String errorMessage; final String errorMessage;
/// Create a copy of AdvancedLocalizationUIState
/// with the given fields replaced by the non-null parameter values.
@override @override
String toString() { @JsonKey(includeFromJson: false, includeToJson: false)
return 'AdvancedLocalizationUIState(workingText: $workingText, classMap: $classMap, p4kGlobalIni: $p4kGlobalIni, serverGlobalIni: $serverGlobalIni, customizeGlobalIni: $customizeGlobalIni, apiLocalizationData: $apiLocalizationData, p4kGlobalIniLines: $p4kGlobalIniLines, serverGlobalIniLines: $serverGlobalIniLines, errorMessage: $errorMessage)'; @pragma('vm:prefer-inline')
} _$AdvancedLocalizationUIStateCopyWith<_AdvancedLocalizationUIState>
get copyWith => __$AdvancedLocalizationUIStateCopyWithImpl<
_AdvancedLocalizationUIState>(this, _$identity);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$AdvancedLocalizationUIStateImpl && other is _AdvancedLocalizationUIState &&
(identical(other.workingText, workingText) || (identical(other.workingText, workingText) ||
other.workingText == workingText) && other.workingText == workingText) &&
const DeepCollectionEquality().equals(other._classMap, _classMap) && const DeepCollectionEquality().equals(other._classMap, _classMap) &&
@ -298,52 +252,95 @@ class _$AdvancedLocalizationUIStateImpl
serverGlobalIniLines, serverGlobalIniLines,
errorMessage); errorMessage);
@override
String toString() {
return 'AdvancedLocalizationUIState(workingText: $workingText, classMap: $classMap, p4kGlobalIni: $p4kGlobalIni, serverGlobalIni: $serverGlobalIni, customizeGlobalIni: $customizeGlobalIni, apiLocalizationData: $apiLocalizationData, p4kGlobalIniLines: $p4kGlobalIniLines, serverGlobalIniLines: $serverGlobalIniLines, errorMessage: $errorMessage)';
}
}
/// @nodoc
abstract mixin class _$AdvancedLocalizationUIStateCopyWith<$Res>
implements $AdvancedLocalizationUIStateCopyWith<$Res> {
factory _$AdvancedLocalizationUIStateCopyWith(
_AdvancedLocalizationUIState value,
$Res Function(_AdvancedLocalizationUIState) _then) =
__$AdvancedLocalizationUIStateCopyWithImpl;
@override
@useResult
$Res call(
{String workingText,
Map<String, AppAdvancedLocalizationClassKeysData>? classMap,
String? p4kGlobalIni,
String? serverGlobalIni,
String? customizeGlobalIni,
ScLocalizationData? apiLocalizationData,
int p4kGlobalIniLines,
int serverGlobalIniLines,
String errorMessage});
}
/// @nodoc
class __$AdvancedLocalizationUIStateCopyWithImpl<$Res>
implements _$AdvancedLocalizationUIStateCopyWith<$Res> {
__$AdvancedLocalizationUIStateCopyWithImpl(this._self, this._then);
final _AdvancedLocalizationUIState _self;
final $Res Function(_AdvancedLocalizationUIState) _then;
/// Create a copy of AdvancedLocalizationUIState /// Create a copy of AdvancedLocalizationUIState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$AdvancedLocalizationUIStateImplCopyWith<_$AdvancedLocalizationUIStateImpl> $Res call({
get copyWith => __$$AdvancedLocalizationUIStateImplCopyWithImpl< Object? workingText = null,
_$AdvancedLocalizationUIStateImpl>(this, _$identity); Object? classMap = freezed,
Object? p4kGlobalIni = freezed,
Object? serverGlobalIni = freezed,
Object? customizeGlobalIni = freezed,
Object? apiLocalizationData = freezed,
Object? p4kGlobalIniLines = null,
Object? serverGlobalIniLines = null,
Object? errorMessage = null,
}) {
return _then(_AdvancedLocalizationUIState(
workingText: null == workingText
? _self.workingText
: workingText // ignore: cast_nullable_to_non_nullable
as String,
classMap: freezed == classMap
? _self._classMap
: classMap // ignore: cast_nullable_to_non_nullable
as Map<String, AppAdvancedLocalizationClassKeysData>?,
p4kGlobalIni: freezed == p4kGlobalIni
? _self.p4kGlobalIni
: p4kGlobalIni // ignore: cast_nullable_to_non_nullable
as String?,
serverGlobalIni: freezed == serverGlobalIni
? _self.serverGlobalIni
: serverGlobalIni // ignore: cast_nullable_to_non_nullable
as String?,
customizeGlobalIni: freezed == customizeGlobalIni
? _self.customizeGlobalIni
: customizeGlobalIni // ignore: cast_nullable_to_non_nullable
as String?,
apiLocalizationData: freezed == apiLocalizationData
? _self.apiLocalizationData
: apiLocalizationData // ignore: cast_nullable_to_non_nullable
as ScLocalizationData?,
p4kGlobalIniLines: null == p4kGlobalIniLines
? _self.p4kGlobalIniLines
: p4kGlobalIniLines // ignore: cast_nullable_to_non_nullable
as int,
serverGlobalIniLines: null == serverGlobalIniLines
? _self.serverGlobalIniLines
: serverGlobalIniLines // ignore: cast_nullable_to_non_nullable
as int,
errorMessage: null == errorMessage
? _self.errorMessage
: errorMessage // ignore: cast_nullable_to_non_nullable
as String,
));
}
} }
abstract class _AdvancedLocalizationUIState // dart format on
implements AdvancedLocalizationUIState {
factory _AdvancedLocalizationUIState(
{final String workingText,
final Map<String, AppAdvancedLocalizationClassKeysData>? classMap,
final String? p4kGlobalIni,
final String? serverGlobalIni,
final String? customizeGlobalIni,
final ScLocalizationData? apiLocalizationData,
final int p4kGlobalIniLines,
final int serverGlobalIniLines,
final String errorMessage}) = _$AdvancedLocalizationUIStateImpl;
@override
String get workingText;
@override
Map<String, AppAdvancedLocalizationClassKeysData>? get classMap;
@override
String? get p4kGlobalIni;
@override
String? get serverGlobalIni;
@override
String? get customizeGlobalIni;
@override
ScLocalizationData? get apiLocalizationData;
@override
int get p4kGlobalIniLines;
@override
int get serverGlobalIniLines;
@override
String get errorMessage;
/// Create a copy of AdvancedLocalizationUIState
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$AdvancedLocalizationUIStateImplCopyWith<_$AdvancedLocalizationUIStateImpl>
get copyWith => throw _privateConstructorUsedError;
}

View File

@ -30,7 +30,7 @@ part 'localization_ui_model.g.dart';
part 'localization_ui_model.freezed.dart'; part 'localization_ui_model.freezed.dart';
@freezed @freezed
class LocalizationUIState with _$LocalizationUIState { abstract class LocalizationUIState with _$LocalizationUIState {
factory LocalizationUIState({ factory LocalizationUIState({
String? selectedLanguage, String? selectedLanguage,
String? installedCommunityInputMethodSupportVersion, String? installedCommunityInputMethodSupportVersion,

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file // coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint // ignore_for_file: type=lint
@ -9,119 +10,78 @@ part of 'localization_ui_model.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; 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 /// @nodoc
mixin _$LocalizationUIState { mixin _$LocalizationUIState {
String? get selectedLanguage => throw _privateConstructorUsedError; String? get selectedLanguage;
String? get installedCommunityInputMethodSupportVersion => String? get installedCommunityInputMethodSupportVersion;
throw _privateConstructorUsedError; InputMethodApiLanguageData? get communityInputMethodLanguageData;
InputMethodApiLanguageData? get communityInputMethodLanguageData => Map<String, ScLocalizationData>? get apiLocalizationData;
throw _privateConstructorUsedError; String get workingVersion;
Map<String, ScLocalizationData>? get apiLocalizationData => MapEntry<bool, String>? get patchStatus;
throw _privateConstructorUsedError; bool? get isInstalledAdvanced;
String get workingVersion => throw _privateConstructorUsedError; List<String>? get customizeList;
MapEntry<bool, String>? get patchStatus => throw _privateConstructorUsedError;
bool? get isInstalledAdvanced => throw _privateConstructorUsedError;
List<String>? get customizeList => throw _privateConstructorUsedError;
/// Create a copy of LocalizationUIState /// Create a copy of LocalizationUIState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
$LocalizationUIStateCopyWith<LocalizationUIState> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $LocalizationUIStateCopyWith<$Res> {
factory $LocalizationUIStateCopyWith(
LocalizationUIState value, $Res Function(LocalizationUIState) then) =
_$LocalizationUIStateCopyWithImpl<$Res, LocalizationUIState>;
@useResult
$Res call(
{String? selectedLanguage,
String? installedCommunityInputMethodSupportVersion,
InputMethodApiLanguageData? communityInputMethodLanguageData,
Map<String, ScLocalizationData>? apiLocalizationData,
String workingVersion,
MapEntry<bool, String>? patchStatus,
bool? isInstalledAdvanced,
List<String>? customizeList});
}
/// @nodoc
class _$LocalizationUIStateCopyWithImpl<$Res, $Val extends LocalizationUIState>
implements $LocalizationUIStateCopyWith<$Res> {
_$LocalizationUIStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of LocalizationUIState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
$LocalizationUIStateCopyWith<LocalizationUIState> get copyWith =>
_$LocalizationUIStateCopyWithImpl<LocalizationUIState>(
this as LocalizationUIState, _$identity);
@override @override
$Res call({ bool operator ==(Object other) {
Object? selectedLanguage = freezed, return identical(this, other) ||
Object? installedCommunityInputMethodSupportVersion = freezed, (other.runtimeType == runtimeType &&
Object? communityInputMethodLanguageData = freezed, other is LocalizationUIState &&
Object? apiLocalizationData = freezed, (identical(other.selectedLanguage, selectedLanguage) ||
Object? workingVersion = null, other.selectedLanguage == selectedLanguage) &&
Object? patchStatus = freezed, (identical(other.installedCommunityInputMethodSupportVersion,
Object? isInstalledAdvanced = freezed, installedCommunityInputMethodSupportVersion) ||
Object? customizeList = freezed, other.installedCommunityInputMethodSupportVersion ==
}) { installedCommunityInputMethodSupportVersion) &&
return _then(_value.copyWith( (identical(other.communityInputMethodLanguageData,
selectedLanguage: freezed == selectedLanguage communityInputMethodLanguageData) ||
? _value.selectedLanguage other.communityInputMethodLanguageData ==
: selectedLanguage // ignore: cast_nullable_to_non_nullable communityInputMethodLanguageData) &&
as String?, const DeepCollectionEquality()
installedCommunityInputMethodSupportVersion: freezed == .equals(other.apiLocalizationData, apiLocalizationData) &&
installedCommunityInputMethodSupportVersion (identical(other.workingVersion, workingVersion) ||
? _value.installedCommunityInputMethodSupportVersion other.workingVersion == workingVersion) &&
: installedCommunityInputMethodSupportVersion // ignore: cast_nullable_to_non_nullable (identical(other.patchStatus, patchStatus) ||
as String?, other.patchStatus == patchStatus) &&
communityInputMethodLanguageData: freezed == (identical(other.isInstalledAdvanced, isInstalledAdvanced) ||
communityInputMethodLanguageData other.isInstalledAdvanced == isInstalledAdvanced) &&
? _value.communityInputMethodLanguageData const DeepCollectionEquality()
: communityInputMethodLanguageData // ignore: cast_nullable_to_non_nullable .equals(other.customizeList, customizeList));
as InputMethodApiLanguageData?, }
apiLocalizationData: freezed == apiLocalizationData
? _value.apiLocalizationData @override
: apiLocalizationData // ignore: cast_nullable_to_non_nullable int get hashCode => Object.hash(
as Map<String, ScLocalizationData>?, runtimeType,
workingVersion: null == workingVersion selectedLanguage,
? _value.workingVersion installedCommunityInputMethodSupportVersion,
: workingVersion // ignore: cast_nullable_to_non_nullable communityInputMethodLanguageData,
as String, const DeepCollectionEquality().hash(apiLocalizationData),
patchStatus: freezed == patchStatus workingVersion,
? _value.patchStatus patchStatus,
: patchStatus // ignore: cast_nullable_to_non_nullable isInstalledAdvanced,
as MapEntry<bool, String>?, const DeepCollectionEquality().hash(customizeList));
isInstalledAdvanced: freezed == isInstalledAdvanced
? _value.isInstalledAdvanced @override
: isInstalledAdvanced // ignore: cast_nullable_to_non_nullable String toString() {
as bool?, return 'LocalizationUIState(selectedLanguage: $selectedLanguage, installedCommunityInputMethodSupportVersion: $installedCommunityInputMethodSupportVersion, communityInputMethodLanguageData: $communityInputMethodLanguageData, apiLocalizationData: $apiLocalizationData, workingVersion: $workingVersion, patchStatus: $patchStatus, isInstalledAdvanced: $isInstalledAdvanced, customizeList: $customizeList)';
customizeList: freezed == customizeList
? _value.customizeList
: customizeList // ignore: cast_nullable_to_non_nullable
as List<String>?,
) as $Val);
} }
} }
/// @nodoc /// @nodoc
abstract class _$$LocalizationUIStateImplCopyWith<$Res> abstract mixin class $LocalizationUIStateCopyWith<$Res> {
implements $LocalizationUIStateCopyWith<$Res> { factory $LocalizationUIStateCopyWith(
factory _$$LocalizationUIStateImplCopyWith(_$LocalizationUIStateImpl value, LocalizationUIState value, $Res Function(LocalizationUIState) _then) =
$Res Function(_$LocalizationUIStateImpl) then) = _$LocalizationUIStateCopyWithImpl;
__$$LocalizationUIStateImplCopyWithImpl<$Res>;
@override
@useResult @useResult
$Res call( $Res call(
{String? selectedLanguage, {String? selectedLanguage,
@ -135,12 +95,12 @@ abstract class _$$LocalizationUIStateImplCopyWith<$Res>
} }
/// @nodoc /// @nodoc
class __$$LocalizationUIStateImplCopyWithImpl<$Res> class _$LocalizationUIStateCopyWithImpl<$Res>
extends _$LocalizationUIStateCopyWithImpl<$Res, _$LocalizationUIStateImpl> implements $LocalizationUIStateCopyWith<$Res> {
implements _$$LocalizationUIStateImplCopyWith<$Res> { _$LocalizationUIStateCopyWithImpl(this._self, this._then);
__$$LocalizationUIStateImplCopyWithImpl(_$LocalizationUIStateImpl _value,
$Res Function(_$LocalizationUIStateImpl) _then) final LocalizationUIState _self;
: super(_value, _then); final $Res Function(LocalizationUIState) _then;
/// Create a copy of LocalizationUIState /// Create a copy of LocalizationUIState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -156,39 +116,39 @@ class __$$LocalizationUIStateImplCopyWithImpl<$Res>
Object? isInstalledAdvanced = freezed, Object? isInstalledAdvanced = freezed,
Object? customizeList = freezed, Object? customizeList = freezed,
}) { }) {
return _then(_$LocalizationUIStateImpl( return _then(_self.copyWith(
selectedLanguage: freezed == selectedLanguage selectedLanguage: freezed == selectedLanguage
? _value.selectedLanguage ? _self.selectedLanguage
: selectedLanguage // ignore: cast_nullable_to_non_nullable : selectedLanguage // ignore: cast_nullable_to_non_nullable
as String?, as String?,
installedCommunityInputMethodSupportVersion: freezed == installedCommunityInputMethodSupportVersion: freezed ==
installedCommunityInputMethodSupportVersion installedCommunityInputMethodSupportVersion
? _value.installedCommunityInputMethodSupportVersion ? _self.installedCommunityInputMethodSupportVersion
: installedCommunityInputMethodSupportVersion // ignore: cast_nullable_to_non_nullable : installedCommunityInputMethodSupportVersion // ignore: cast_nullable_to_non_nullable
as String?, as String?,
communityInputMethodLanguageData: freezed == communityInputMethodLanguageData: freezed ==
communityInputMethodLanguageData communityInputMethodLanguageData
? _value.communityInputMethodLanguageData ? _self.communityInputMethodLanguageData
: communityInputMethodLanguageData // ignore: cast_nullable_to_non_nullable : communityInputMethodLanguageData // ignore: cast_nullable_to_non_nullable
as InputMethodApiLanguageData?, as InputMethodApiLanguageData?,
apiLocalizationData: freezed == apiLocalizationData apiLocalizationData: freezed == apiLocalizationData
? _value._apiLocalizationData ? _self.apiLocalizationData
: apiLocalizationData // ignore: cast_nullable_to_non_nullable : apiLocalizationData // ignore: cast_nullable_to_non_nullable
as Map<String, ScLocalizationData>?, as Map<String, ScLocalizationData>?,
workingVersion: null == workingVersion workingVersion: null == workingVersion
? _value.workingVersion ? _self.workingVersion
: workingVersion // ignore: cast_nullable_to_non_nullable : workingVersion // ignore: cast_nullable_to_non_nullable
as String, as String,
patchStatus: freezed == patchStatus patchStatus: freezed == patchStatus
? _value.patchStatus ? _self.patchStatus
: patchStatus // ignore: cast_nullable_to_non_nullable : patchStatus // ignore: cast_nullable_to_non_nullable
as MapEntry<bool, String>?, as MapEntry<bool, String>?,
isInstalledAdvanced: freezed == isInstalledAdvanced isInstalledAdvanced: freezed == isInstalledAdvanced
? _value.isInstalledAdvanced ? _self.isInstalledAdvanced
: isInstalledAdvanced // ignore: cast_nullable_to_non_nullable : isInstalledAdvanced // ignore: cast_nullable_to_non_nullable
as bool?, as bool?,
customizeList: freezed == customizeList customizeList: freezed == customizeList
? _value._customizeList ? _self.customizeList
: customizeList // ignore: cast_nullable_to_non_nullable : customizeList // ignore: cast_nullable_to_non_nullable
as List<String>?, as List<String>?,
)); ));
@ -197,8 +157,8 @@ class __$$LocalizationUIStateImplCopyWithImpl<$Res>
/// @nodoc /// @nodoc
class _$LocalizationUIStateImpl implements _LocalizationUIState { class _LocalizationUIState implements LocalizationUIState {
_$LocalizationUIStateImpl( _LocalizationUIState(
{this.selectedLanguage, {this.selectedLanguage,
this.installedCommunityInputMethodSupportVersion, this.installedCommunityInputMethodSupportVersion,
this.communityInputMethodLanguageData, this.communityInputMethodLanguageData,
@ -244,16 +204,20 @@ class _$LocalizationUIStateImpl implements _LocalizationUIState {
return EqualUnmodifiableListView(value); return EqualUnmodifiableListView(value);
} }
/// Create a copy of LocalizationUIState
/// with the given fields replaced by the non-null parameter values.
@override @override
String toString() { @JsonKey(includeFromJson: false, includeToJson: false)
return 'LocalizationUIState(selectedLanguage: $selectedLanguage, installedCommunityInputMethodSupportVersion: $installedCommunityInputMethodSupportVersion, communityInputMethodLanguageData: $communityInputMethodLanguageData, apiLocalizationData: $apiLocalizationData, workingVersion: $workingVersion, patchStatus: $patchStatus, isInstalledAdvanced: $isInstalledAdvanced, customizeList: $customizeList)'; @pragma('vm:prefer-inline')
} _$LocalizationUIStateCopyWith<_LocalizationUIState> get copyWith =>
__$LocalizationUIStateCopyWithImpl<_LocalizationUIState>(
this, _$identity);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$LocalizationUIStateImpl && other is _LocalizationUIState &&
(identical(other.selectedLanguage, selectedLanguage) || (identical(other.selectedLanguage, selectedLanguage) ||
other.selectedLanguage == selectedLanguage) && other.selectedLanguage == selectedLanguage) &&
(identical(other.installedCommunityInputMethodSupportVersion, (identical(other.installedCommunityInputMethodSupportVersion,
@ -288,48 +252,90 @@ class _$LocalizationUIStateImpl implements _LocalizationUIState {
isInstalledAdvanced, isInstalledAdvanced,
const DeepCollectionEquality().hash(_customizeList)); const DeepCollectionEquality().hash(_customizeList));
@override
String toString() {
return 'LocalizationUIState(selectedLanguage: $selectedLanguage, installedCommunityInputMethodSupportVersion: $installedCommunityInputMethodSupportVersion, communityInputMethodLanguageData: $communityInputMethodLanguageData, apiLocalizationData: $apiLocalizationData, workingVersion: $workingVersion, patchStatus: $patchStatus, isInstalledAdvanced: $isInstalledAdvanced, customizeList: $customizeList)';
}
}
/// @nodoc
abstract mixin class _$LocalizationUIStateCopyWith<$Res>
implements $LocalizationUIStateCopyWith<$Res> {
factory _$LocalizationUIStateCopyWith(_LocalizationUIState value,
$Res Function(_LocalizationUIState) _then) =
__$LocalizationUIStateCopyWithImpl;
@override
@useResult
$Res call(
{String? selectedLanguage,
String? installedCommunityInputMethodSupportVersion,
InputMethodApiLanguageData? communityInputMethodLanguageData,
Map<String, ScLocalizationData>? apiLocalizationData,
String workingVersion,
MapEntry<bool, String>? patchStatus,
bool? isInstalledAdvanced,
List<String>? customizeList});
}
/// @nodoc
class __$LocalizationUIStateCopyWithImpl<$Res>
implements _$LocalizationUIStateCopyWith<$Res> {
__$LocalizationUIStateCopyWithImpl(this._self, this._then);
final _LocalizationUIState _self;
final $Res Function(_LocalizationUIState) _then;
/// Create a copy of LocalizationUIState /// Create a copy of LocalizationUIState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$LocalizationUIStateImplCopyWith<_$LocalizationUIStateImpl> get copyWith => $Res call({
__$$LocalizationUIStateImplCopyWithImpl<_$LocalizationUIStateImpl>( Object? selectedLanguage = freezed,
this, _$identity); Object? installedCommunityInputMethodSupportVersion = freezed,
Object? communityInputMethodLanguageData = freezed,
Object? apiLocalizationData = freezed,
Object? workingVersion = null,
Object? patchStatus = freezed,
Object? isInstalledAdvanced = freezed,
Object? customizeList = freezed,
}) {
return _then(_LocalizationUIState(
selectedLanguage: freezed == selectedLanguage
? _self.selectedLanguage
: selectedLanguage // ignore: cast_nullable_to_non_nullable
as String?,
installedCommunityInputMethodSupportVersion: freezed ==
installedCommunityInputMethodSupportVersion
? _self.installedCommunityInputMethodSupportVersion
: installedCommunityInputMethodSupportVersion // ignore: cast_nullable_to_non_nullable
as String?,
communityInputMethodLanguageData: freezed ==
communityInputMethodLanguageData
? _self.communityInputMethodLanguageData
: communityInputMethodLanguageData // ignore: cast_nullable_to_non_nullable
as InputMethodApiLanguageData?,
apiLocalizationData: freezed == apiLocalizationData
? _self._apiLocalizationData
: apiLocalizationData // ignore: cast_nullable_to_non_nullable
as Map<String, ScLocalizationData>?,
workingVersion: null == workingVersion
? _self.workingVersion
: workingVersion // ignore: cast_nullable_to_non_nullable
as String,
patchStatus: freezed == patchStatus
? _self.patchStatus
: patchStatus // ignore: cast_nullable_to_non_nullable
as MapEntry<bool, String>?,
isInstalledAdvanced: freezed == isInstalledAdvanced
? _self.isInstalledAdvanced
: isInstalledAdvanced // ignore: cast_nullable_to_non_nullable
as bool?,
customizeList: freezed == customizeList
? _self._customizeList
: customizeList // ignore: cast_nullable_to_non_nullable
as List<String>?,
));
}
} }
abstract class _LocalizationUIState implements LocalizationUIState { // dart format on
factory _LocalizationUIState(
{final String? selectedLanguage,
final String? installedCommunityInputMethodSupportVersion,
final InputMethodApiLanguageData? communityInputMethodLanguageData,
final Map<String, ScLocalizationData>? apiLocalizationData,
final String workingVersion,
final MapEntry<bool, String>? patchStatus,
final bool? isInstalledAdvanced,
final List<String>? customizeList}) = _$LocalizationUIStateImpl;
@override
String? get selectedLanguage;
@override
String? get installedCommunityInputMethodSupportVersion;
@override
InputMethodApiLanguageData? get communityInputMethodLanguageData;
@override
Map<String, ScLocalizationData>? get apiLocalizationData;
@override
String get workingVersion;
@override
MapEntry<bool, String>? get patchStatus;
@override
bool? get isInstalledAdvanced;
@override
List<String>? get customizeList;
/// Create a copy of LocalizationUIState
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$LocalizationUIStateImplCopyWith<_$LocalizationUIStateImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@ -19,7 +19,7 @@ part 'performance_ui_model.freezed.dart';
part 'performance_ui_model.g.dart'; part 'performance_ui_model.g.dart';
@freezed @freezed
class HomePerformanceUIState with _$HomePerformanceUIState { abstract class HomePerformanceUIState with _$HomePerformanceUIState {
factory HomePerformanceUIState({ factory HomePerformanceUIState({
@Default(true) bool showGraphicsPerformanceTip, @Default(true) bool showGraphicsPerformanceTip,
@Default(false) bool enabled, @Default(false) bool enabled,

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file // coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint // ignore_for_file: type=lint
@ -9,89 +10,59 @@ part of 'performance_ui_model.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; 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 /// @nodoc
mixin _$HomePerformanceUIState { mixin _$HomePerformanceUIState {
bool get showGraphicsPerformanceTip => throw _privateConstructorUsedError; bool get showGraphicsPerformanceTip;
bool get enabled => throw _privateConstructorUsedError; bool get enabled;
Map<String, List<GamePerformanceData>>? get performanceMap => Map<String, List<GamePerformanceData>>? get performanceMap;
throw _privateConstructorUsedError; String get workingString;
String get workingString => throw _privateConstructorUsedError;
/// Create a copy of HomePerformanceUIState /// Create a copy of HomePerformanceUIState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
$HomePerformanceUIStateCopyWith<HomePerformanceUIState> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $HomePerformanceUIStateCopyWith<$Res> {
factory $HomePerformanceUIStateCopyWith(HomePerformanceUIState value,
$Res Function(HomePerformanceUIState) then) =
_$HomePerformanceUIStateCopyWithImpl<$Res, HomePerformanceUIState>;
@useResult
$Res call(
{bool showGraphicsPerformanceTip,
bool enabled,
Map<String, List<GamePerformanceData>>? performanceMap,
String workingString});
}
/// @nodoc
class _$HomePerformanceUIStateCopyWithImpl<$Res,
$Val extends HomePerformanceUIState>
implements $HomePerformanceUIStateCopyWith<$Res> {
_$HomePerformanceUIStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of HomePerformanceUIState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
$HomePerformanceUIStateCopyWith<HomePerformanceUIState> get copyWith =>
_$HomePerformanceUIStateCopyWithImpl<HomePerformanceUIState>(
this as HomePerformanceUIState, _$identity);
@override @override
$Res call({ bool operator ==(Object other) {
Object? showGraphicsPerformanceTip = null, return identical(this, other) ||
Object? enabled = null, (other.runtimeType == runtimeType &&
Object? performanceMap = freezed, other is HomePerformanceUIState &&
Object? workingString = null, (identical(other.showGraphicsPerformanceTip,
}) { showGraphicsPerformanceTip) ||
return _then(_value.copyWith( other.showGraphicsPerformanceTip ==
showGraphicsPerformanceTip: null == showGraphicsPerformanceTip showGraphicsPerformanceTip) &&
? _value.showGraphicsPerformanceTip (identical(other.enabled, enabled) || other.enabled == enabled) &&
: showGraphicsPerformanceTip // ignore: cast_nullable_to_non_nullable const DeepCollectionEquality()
as bool, .equals(other.performanceMap, performanceMap) &&
enabled: null == enabled (identical(other.workingString, workingString) ||
? _value.enabled other.workingString == workingString));
: enabled // ignore: cast_nullable_to_non_nullable }
as bool,
performanceMap: freezed == performanceMap @override
? _value.performanceMap int get hashCode => Object.hash(
: performanceMap // ignore: cast_nullable_to_non_nullable runtimeType,
as Map<String, List<GamePerformanceData>>?, showGraphicsPerformanceTip,
workingString: null == workingString enabled,
? _value.workingString const DeepCollectionEquality().hash(performanceMap),
: workingString // ignore: cast_nullable_to_non_nullable workingString);
as String,
) as $Val); @override
String toString() {
return 'HomePerformanceUIState(showGraphicsPerformanceTip: $showGraphicsPerformanceTip, enabled: $enabled, performanceMap: $performanceMap, workingString: $workingString)';
} }
} }
/// @nodoc /// @nodoc
abstract class _$$HomePerformanceUIStateImplCopyWith<$Res> abstract mixin class $HomePerformanceUIStateCopyWith<$Res> {
implements $HomePerformanceUIStateCopyWith<$Res> { factory $HomePerformanceUIStateCopyWith(HomePerformanceUIState value,
factory _$$HomePerformanceUIStateImplCopyWith( $Res Function(HomePerformanceUIState) _then) =
_$HomePerformanceUIStateImpl value, _$HomePerformanceUIStateCopyWithImpl;
$Res Function(_$HomePerformanceUIStateImpl) then) =
__$$HomePerformanceUIStateImplCopyWithImpl<$Res>;
@override
@useResult @useResult
$Res call( $Res call(
{bool showGraphicsPerformanceTip, {bool showGraphicsPerformanceTip,
@ -101,14 +72,12 @@ abstract class _$$HomePerformanceUIStateImplCopyWith<$Res>
} }
/// @nodoc /// @nodoc
class __$$HomePerformanceUIStateImplCopyWithImpl<$Res> class _$HomePerformanceUIStateCopyWithImpl<$Res>
extends _$HomePerformanceUIStateCopyWithImpl<$Res, implements $HomePerformanceUIStateCopyWith<$Res> {
_$HomePerformanceUIStateImpl> _$HomePerformanceUIStateCopyWithImpl(this._self, this._then);
implements _$$HomePerformanceUIStateImplCopyWith<$Res> {
__$$HomePerformanceUIStateImplCopyWithImpl( final HomePerformanceUIState _self;
_$HomePerformanceUIStateImpl _value, final $Res Function(HomePerformanceUIState) _then;
$Res Function(_$HomePerformanceUIStateImpl) _then)
: super(_value, _then);
/// Create a copy of HomePerformanceUIState /// Create a copy of HomePerformanceUIState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -120,21 +89,21 @@ class __$$HomePerformanceUIStateImplCopyWithImpl<$Res>
Object? performanceMap = freezed, Object? performanceMap = freezed,
Object? workingString = null, Object? workingString = null,
}) { }) {
return _then(_$HomePerformanceUIStateImpl( return _then(_self.copyWith(
showGraphicsPerformanceTip: null == showGraphicsPerformanceTip showGraphicsPerformanceTip: null == showGraphicsPerformanceTip
? _value.showGraphicsPerformanceTip ? _self.showGraphicsPerformanceTip
: showGraphicsPerformanceTip // ignore: cast_nullable_to_non_nullable : showGraphicsPerformanceTip // ignore: cast_nullable_to_non_nullable
as bool, as bool,
enabled: null == enabled enabled: null == enabled
? _value.enabled ? _self.enabled
: enabled // ignore: cast_nullable_to_non_nullable : enabled // ignore: cast_nullable_to_non_nullable
as bool, as bool,
performanceMap: freezed == performanceMap performanceMap: freezed == performanceMap
? _value._performanceMap ? _self.performanceMap
: performanceMap // ignore: cast_nullable_to_non_nullable : performanceMap // ignore: cast_nullable_to_non_nullable
as Map<String, List<GamePerformanceData>>?, as Map<String, List<GamePerformanceData>>?,
workingString: null == workingString workingString: null == workingString
? _value.workingString ? _self.workingString
: workingString // ignore: cast_nullable_to_non_nullable : workingString // ignore: cast_nullable_to_non_nullable
as String, as String,
)); ));
@ -143,8 +112,8 @@ class __$$HomePerformanceUIStateImplCopyWithImpl<$Res>
/// @nodoc /// @nodoc
class _$HomePerformanceUIStateImpl implements _HomePerformanceUIState { class _HomePerformanceUIState implements HomePerformanceUIState {
_$HomePerformanceUIStateImpl( _HomePerformanceUIState(
{this.showGraphicsPerformanceTip = true, {this.showGraphicsPerformanceTip = true,
this.enabled = false, this.enabled = false,
final Map<String, List<GamePerformanceData>>? performanceMap, final Map<String, List<GamePerformanceData>>? performanceMap,
@ -171,16 +140,20 @@ class _$HomePerformanceUIStateImpl implements _HomePerformanceUIState {
@JsonKey() @JsonKey()
final String workingString; final String workingString;
/// Create a copy of HomePerformanceUIState
/// with the given fields replaced by the non-null parameter values.
@override @override
String toString() { @JsonKey(includeFromJson: false, includeToJson: false)
return 'HomePerformanceUIState(showGraphicsPerformanceTip: $showGraphicsPerformanceTip, enabled: $enabled, performanceMap: $performanceMap, workingString: $workingString)'; @pragma('vm:prefer-inline')
} _$HomePerformanceUIStateCopyWith<_HomePerformanceUIState> get copyWith =>
__$HomePerformanceUIStateCopyWithImpl<_HomePerformanceUIState>(
this, _$identity);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$HomePerformanceUIStateImpl && other is _HomePerformanceUIState &&
(identical(other.showGraphicsPerformanceTip, (identical(other.showGraphicsPerformanceTip,
showGraphicsPerformanceTip) || showGraphicsPerformanceTip) ||
other.showGraphicsPerformanceTip == other.showGraphicsPerformanceTip ==
@ -200,36 +173,64 @@ class _$HomePerformanceUIStateImpl implements _HomePerformanceUIState {
const DeepCollectionEquality().hash(_performanceMap), const DeepCollectionEquality().hash(_performanceMap),
workingString); workingString);
@override
String toString() {
return 'HomePerformanceUIState(showGraphicsPerformanceTip: $showGraphicsPerformanceTip, enabled: $enabled, performanceMap: $performanceMap, workingString: $workingString)';
}
}
/// @nodoc
abstract mixin class _$HomePerformanceUIStateCopyWith<$Res>
implements $HomePerformanceUIStateCopyWith<$Res> {
factory _$HomePerformanceUIStateCopyWith(_HomePerformanceUIState value,
$Res Function(_HomePerformanceUIState) _then) =
__$HomePerformanceUIStateCopyWithImpl;
@override
@useResult
$Res call(
{bool showGraphicsPerformanceTip,
bool enabled,
Map<String, List<GamePerformanceData>>? performanceMap,
String workingString});
}
/// @nodoc
class __$HomePerformanceUIStateCopyWithImpl<$Res>
implements _$HomePerformanceUIStateCopyWith<$Res> {
__$HomePerformanceUIStateCopyWithImpl(this._self, this._then);
final _HomePerformanceUIState _self;
final $Res Function(_HomePerformanceUIState) _then;
/// Create a copy of HomePerformanceUIState /// Create a copy of HomePerformanceUIState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$HomePerformanceUIStateImplCopyWith<_$HomePerformanceUIStateImpl> $Res call({
get copyWith => __$$HomePerformanceUIStateImplCopyWithImpl< Object? showGraphicsPerformanceTip = null,
_$HomePerformanceUIStateImpl>(this, _$identity); Object? enabled = null,
Object? performanceMap = freezed,
Object? workingString = null,
}) {
return _then(_HomePerformanceUIState(
showGraphicsPerformanceTip: null == showGraphicsPerformanceTip
? _self.showGraphicsPerformanceTip
: showGraphicsPerformanceTip // ignore: cast_nullable_to_non_nullable
as bool,
enabled: null == enabled
? _self.enabled
: enabled // ignore: cast_nullable_to_non_nullable
as bool,
performanceMap: freezed == performanceMap
? _self._performanceMap
: performanceMap // ignore: cast_nullable_to_non_nullable
as Map<String, List<GamePerformanceData>>?,
workingString: null == workingString
? _self.workingString
: workingString // ignore: cast_nullable_to_non_nullable
as String,
));
}
} }
abstract class _HomePerformanceUIState implements HomePerformanceUIState { // dart format on
factory _HomePerformanceUIState(
{final bool showGraphicsPerformanceTip,
final bool enabled,
final Map<String, List<GamePerformanceData>>? performanceMap,
final String workingString}) = _$HomePerformanceUIStateImpl;
@override
bool get showGraphicsPerformanceTip;
@override
bool get enabled;
@override
Map<String, List<GamePerformanceData>>? get performanceMap;
@override
String get workingString;
/// Create a copy of HomePerformanceUIState
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$HomePerformanceUIStateImplCopyWith<_$HomePerformanceUIStateImpl>
get copyWith => throw _privateConstructorUsedError;
}

View File

@ -8,7 +8,7 @@ part 'nav_state.freezed.dart';
part 'nav_state.g.dart'; part 'nav_state.g.dart';
@freezed @freezed
class NavState with _$NavState { abstract class NavState with _$NavState {
const factory NavState({ const factory NavState({
List<NavApiDocsItemData>? items, List<NavApiDocsItemData>? items,
@Default("") String errorInfo, @Default("") String errorInfo,

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file // coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint // ignore_for_file: type=lint
@ -9,80 +10,55 @@ part of 'nav_state.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; 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 /// @nodoc
mixin _$NavState { mixin _$NavState {
List<NavApiDocsItemData>? get items => throw _privateConstructorUsedError; List<NavApiDocsItemData>? get items;
String get errorInfo => throw _privateConstructorUsedError; String get errorInfo;
/// Create a copy of NavState /// Create a copy of NavState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
$NavStateCopyWith<NavState> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $NavStateCopyWith<$Res> {
factory $NavStateCopyWith(NavState value, $Res Function(NavState) then) =
_$NavStateCopyWithImpl<$Res, NavState>;
@useResult
$Res call({List<NavApiDocsItemData>? items, String errorInfo});
}
/// @nodoc
class _$NavStateCopyWithImpl<$Res, $Val extends NavState>
implements $NavStateCopyWith<$Res> {
_$NavStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of NavState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
$NavStateCopyWith<NavState> get copyWith =>
_$NavStateCopyWithImpl<NavState>(this as NavState, _$identity);
@override @override
$Res call({ bool operator ==(Object other) {
Object? items = freezed, return identical(this, other) ||
Object? errorInfo = null, (other.runtimeType == runtimeType &&
}) { other is NavState &&
return _then(_value.copyWith( const DeepCollectionEquality().equals(other.items, items) &&
items: freezed == items (identical(other.errorInfo, errorInfo) ||
? _value.items other.errorInfo == errorInfo));
: items // ignore: cast_nullable_to_non_nullable }
as List<NavApiDocsItemData>?,
errorInfo: null == errorInfo @override
? _value.errorInfo int get hashCode => Object.hash(
: errorInfo // ignore: cast_nullable_to_non_nullable runtimeType, const DeepCollectionEquality().hash(items), errorInfo);
as String,
) as $Val); @override
String toString() {
return 'NavState(items: $items, errorInfo: $errorInfo)';
} }
} }
/// @nodoc /// @nodoc
abstract class _$$NavStateImplCopyWith<$Res> abstract mixin class $NavStateCopyWith<$Res> {
implements $NavStateCopyWith<$Res> { factory $NavStateCopyWith(NavState value, $Res Function(NavState) _then) =
factory _$$NavStateImplCopyWith( _$NavStateCopyWithImpl;
_$NavStateImpl value, $Res Function(_$NavStateImpl) then) =
__$$NavStateImplCopyWithImpl<$Res>;
@override
@useResult @useResult
$Res call({List<NavApiDocsItemData>? items, String errorInfo}); $Res call({List<NavApiDocsItemData>? items, String errorInfo});
} }
/// @nodoc /// @nodoc
class __$$NavStateImplCopyWithImpl<$Res> class _$NavStateCopyWithImpl<$Res> implements $NavStateCopyWith<$Res> {
extends _$NavStateCopyWithImpl<$Res, _$NavStateImpl> _$NavStateCopyWithImpl(this._self, this._then);
implements _$$NavStateImplCopyWith<$Res> {
__$$NavStateImplCopyWithImpl( final NavState _self;
_$NavStateImpl _value, $Res Function(_$NavStateImpl) _then) final $Res Function(NavState) _then;
: super(_value, _then);
/// Create a copy of NavState /// Create a copy of NavState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -92,13 +68,13 @@ class __$$NavStateImplCopyWithImpl<$Res>
Object? items = freezed, Object? items = freezed,
Object? errorInfo = null, Object? errorInfo = null,
}) { }) {
return _then(_$NavStateImpl( return _then(_self.copyWith(
items: freezed == items items: freezed == items
? _value._items ? _self.items
: items // ignore: cast_nullable_to_non_nullable : items // ignore: cast_nullable_to_non_nullable
as List<NavApiDocsItemData>?, as List<NavApiDocsItemData>?,
errorInfo: null == errorInfo errorInfo: null == errorInfo
? _value.errorInfo ? _self.errorInfo
: errorInfo // ignore: cast_nullable_to_non_nullable : errorInfo // ignore: cast_nullable_to_non_nullable
as String, as String,
)); ));
@ -107,9 +83,8 @@ class __$$NavStateImplCopyWithImpl<$Res>
/// @nodoc /// @nodoc
class _$NavStateImpl implements _NavState { class _NavState implements NavState {
const _$NavStateImpl( const _NavState({final List<NavApiDocsItemData>? items, this.errorInfo = ""})
{final List<NavApiDocsItemData>? items, this.errorInfo = ""})
: _items = items; : _items = items;
final List<NavApiDocsItemData>? _items; final List<NavApiDocsItemData>? _items;
@ -126,16 +101,19 @@ class _$NavStateImpl implements _NavState {
@JsonKey() @JsonKey()
final String errorInfo; final String errorInfo;
/// Create a copy of NavState
/// with the given fields replaced by the non-null parameter values.
@override @override
String toString() { @JsonKey(includeFromJson: false, includeToJson: false)
return 'NavState(items: $items, errorInfo: $errorInfo)'; @pragma('vm:prefer-inline')
} _$NavStateCopyWith<_NavState> get copyWith =>
__$NavStateCopyWithImpl<_NavState>(this, _$identity);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$NavStateImpl && other is _NavState &&
const DeepCollectionEquality().equals(other._items, _items) && const DeepCollectionEquality().equals(other._items, _items) &&
(identical(other.errorInfo, errorInfo) || (identical(other.errorInfo, errorInfo) ||
other.errorInfo == errorInfo)); other.errorInfo == errorInfo));
@ -145,29 +123,48 @@ class _$NavStateImpl implements _NavState {
int get hashCode => Object.hash( int get hashCode => Object.hash(
runtimeType, const DeepCollectionEquality().hash(_items), errorInfo); runtimeType, const DeepCollectionEquality().hash(_items), errorInfo);
@override
String toString() {
return 'NavState(items: $items, errorInfo: $errorInfo)';
}
}
/// @nodoc
abstract mixin class _$NavStateCopyWith<$Res>
implements $NavStateCopyWith<$Res> {
factory _$NavStateCopyWith(_NavState value, $Res Function(_NavState) _then) =
__$NavStateCopyWithImpl;
@override
@useResult
$Res call({List<NavApiDocsItemData>? items, String errorInfo});
}
/// @nodoc
class __$NavStateCopyWithImpl<$Res> implements _$NavStateCopyWith<$Res> {
__$NavStateCopyWithImpl(this._self, this._then);
final _NavState _self;
final $Res Function(_NavState) _then;
/// Create a copy of NavState /// Create a copy of NavState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$NavStateImplCopyWith<_$NavStateImpl> get copyWith => $Res call({
__$$NavStateImplCopyWithImpl<_$NavStateImpl>(this, _$identity); Object? items = freezed,
Object? errorInfo = null,
}) {
return _then(_NavState(
items: freezed == items
? _self._items
: items // ignore: cast_nullable_to_non_nullable
as List<NavApiDocsItemData>?,
errorInfo: null == errorInfo
? _self.errorInfo
: errorInfo // ignore: cast_nullable_to_non_nullable
as String,
));
}
} }
abstract class _NavState implements NavState { // dart format on
const factory _NavState(
{final List<NavApiDocsItemData>? items,
final String errorInfo}) = _$NavStateImpl;
@override
List<NavApiDocsItemData>? get items;
@override
String get errorInfo;
/// Create a copy of NavState
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$NavStateImplCopyWith<_$NavStateImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@ -18,7 +18,7 @@ part 'settings_ui_model.g.dart';
part 'settings_ui_model.freezed.dart'; part 'settings_ui_model.freezed.dart';
@freezed @freezed
class SettingsUIState with _$SettingsUIState { abstract class SettingsUIState with _$SettingsUIState {
factory SettingsUIState({ factory SettingsUIState({
@Default(false) bool isEnableToolSiteMirrors, @Default(false) bool isEnableToolSiteMirrors,
@Default("0") String inputGameLaunchECore, @Default("0") String inputGameLaunchECore,

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file // coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint // ignore_for_file: type=lint
@ -9,197 +10,31 @@ part of 'settings_ui_model.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; 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 /// @nodoc
mixin _$SettingsUIState { mixin _$SettingsUIState {
bool get isEnableToolSiteMirrors => throw _privateConstructorUsedError; bool get isEnableToolSiteMirrors;
String get inputGameLaunchECore => throw _privateConstructorUsedError; String get inputGameLaunchECore;
String? get customLauncherPath => throw _privateConstructorUsedError; String? get customLauncherPath;
String? get customGamePath => throw _privateConstructorUsedError; String? get customGamePath;
int get locationCacheSize => throw _privateConstructorUsedError; int get locationCacheSize;
bool get isUseInternalDNS => throw _privateConstructorUsedError; bool get isUseInternalDNS;
/// Create a copy of SettingsUIState /// Create a copy of SettingsUIState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$SettingsUIStateCopyWith<SettingsUIState> get copyWith => $SettingsUIStateCopyWith<SettingsUIState> get copyWith =>
throw _privateConstructorUsedError; _$SettingsUIStateCopyWithImpl<SettingsUIState>(
} this as SettingsUIState, _$identity);
/// @nodoc
abstract class $SettingsUIStateCopyWith<$Res> {
factory $SettingsUIStateCopyWith(
SettingsUIState value, $Res Function(SettingsUIState) then) =
_$SettingsUIStateCopyWithImpl<$Res, SettingsUIState>;
@useResult
$Res call(
{bool isEnableToolSiteMirrors,
String inputGameLaunchECore,
String? customLauncherPath,
String? customGamePath,
int locationCacheSize,
bool isUseInternalDNS});
}
/// @nodoc
class _$SettingsUIStateCopyWithImpl<$Res, $Val extends SettingsUIState>
implements $SettingsUIStateCopyWith<$Res> {
_$SettingsUIStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of SettingsUIState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? isEnableToolSiteMirrors = null,
Object? inputGameLaunchECore = null,
Object? customLauncherPath = freezed,
Object? customGamePath = freezed,
Object? locationCacheSize = null,
Object? isUseInternalDNS = null,
}) {
return _then(_value.copyWith(
isEnableToolSiteMirrors: null == isEnableToolSiteMirrors
? _value.isEnableToolSiteMirrors
: isEnableToolSiteMirrors // ignore: cast_nullable_to_non_nullable
as bool,
inputGameLaunchECore: null == inputGameLaunchECore
? _value.inputGameLaunchECore
: inputGameLaunchECore // ignore: cast_nullable_to_non_nullable
as String,
customLauncherPath: freezed == customLauncherPath
? _value.customLauncherPath
: customLauncherPath // ignore: cast_nullable_to_non_nullable
as String?,
customGamePath: freezed == customGamePath
? _value.customGamePath
: customGamePath // ignore: cast_nullable_to_non_nullable
as String?,
locationCacheSize: null == locationCacheSize
? _value.locationCacheSize
: locationCacheSize // ignore: cast_nullable_to_non_nullable
as int,
isUseInternalDNS: null == isUseInternalDNS
? _value.isUseInternalDNS
: isUseInternalDNS // ignore: cast_nullable_to_non_nullable
as bool,
) as $Val);
}
}
/// @nodoc
abstract class _$$SettingsUIStateImplCopyWith<$Res>
implements $SettingsUIStateCopyWith<$Res> {
factory _$$SettingsUIStateImplCopyWith(_$SettingsUIStateImpl value,
$Res Function(_$SettingsUIStateImpl) then) =
__$$SettingsUIStateImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{bool isEnableToolSiteMirrors,
String inputGameLaunchECore,
String? customLauncherPath,
String? customGamePath,
int locationCacheSize,
bool isUseInternalDNS});
}
/// @nodoc
class __$$SettingsUIStateImplCopyWithImpl<$Res>
extends _$SettingsUIStateCopyWithImpl<$Res, _$SettingsUIStateImpl>
implements _$$SettingsUIStateImplCopyWith<$Res> {
__$$SettingsUIStateImplCopyWithImpl(
_$SettingsUIStateImpl _value, $Res Function(_$SettingsUIStateImpl) _then)
: super(_value, _then);
/// Create a copy of SettingsUIState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? isEnableToolSiteMirrors = null,
Object? inputGameLaunchECore = null,
Object? customLauncherPath = freezed,
Object? customGamePath = freezed,
Object? locationCacheSize = null,
Object? isUseInternalDNS = null,
}) {
return _then(_$SettingsUIStateImpl(
isEnableToolSiteMirrors: null == isEnableToolSiteMirrors
? _value.isEnableToolSiteMirrors
: isEnableToolSiteMirrors // ignore: cast_nullable_to_non_nullable
as bool,
inputGameLaunchECore: null == inputGameLaunchECore
? _value.inputGameLaunchECore
: inputGameLaunchECore // ignore: cast_nullable_to_non_nullable
as String,
customLauncherPath: freezed == customLauncherPath
? _value.customLauncherPath
: customLauncherPath // ignore: cast_nullable_to_non_nullable
as String?,
customGamePath: freezed == customGamePath
? _value.customGamePath
: customGamePath // ignore: cast_nullable_to_non_nullable
as String?,
locationCacheSize: null == locationCacheSize
? _value.locationCacheSize
: locationCacheSize // ignore: cast_nullable_to_non_nullable
as int,
isUseInternalDNS: null == isUseInternalDNS
? _value.isUseInternalDNS
: isUseInternalDNS // ignore: cast_nullable_to_non_nullable
as bool,
));
}
}
/// @nodoc
class _$SettingsUIStateImpl implements _SettingsUIState {
_$SettingsUIStateImpl(
{this.isEnableToolSiteMirrors = false,
this.inputGameLaunchECore = "0",
this.customLauncherPath,
this.customGamePath,
this.locationCacheSize = 0,
this.isUseInternalDNS = false});
@override
@JsonKey()
final bool isEnableToolSiteMirrors;
@override
@JsonKey()
final String inputGameLaunchECore;
@override
final String? customLauncherPath;
@override
final String? customGamePath;
@override
@JsonKey()
final int locationCacheSize;
@override
@JsonKey()
final bool isUseInternalDNS;
@override
String toString() {
return 'SettingsUIState(isEnableToolSiteMirrors: $isEnableToolSiteMirrors, inputGameLaunchECore: $inputGameLaunchECore, customLauncherPath: $customLauncherPath, customGamePath: $customGamePath, locationCacheSize: $locationCacheSize, isUseInternalDNS: $isUseInternalDNS)';
}
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$SettingsUIStateImpl && other is SettingsUIState &&
(identical( (identical(
other.isEnableToolSiteMirrors, isEnableToolSiteMirrors) || other.isEnableToolSiteMirrors, isEnableToolSiteMirrors) ||
other.isEnableToolSiteMirrors == isEnableToolSiteMirrors) && other.isEnableToolSiteMirrors == isEnableToolSiteMirrors) &&
@ -225,42 +60,212 @@ class _$SettingsUIStateImpl implements _SettingsUIState {
locationCacheSize, locationCacheSize,
isUseInternalDNS); isUseInternalDNS);
@override
String toString() {
return 'SettingsUIState(isEnableToolSiteMirrors: $isEnableToolSiteMirrors, inputGameLaunchECore: $inputGameLaunchECore, customLauncherPath: $customLauncherPath, customGamePath: $customGamePath, locationCacheSize: $locationCacheSize, isUseInternalDNS: $isUseInternalDNS)';
}
}
/// @nodoc
abstract mixin class $SettingsUIStateCopyWith<$Res> {
factory $SettingsUIStateCopyWith(
SettingsUIState value, $Res Function(SettingsUIState) _then) =
_$SettingsUIStateCopyWithImpl;
@useResult
$Res call(
{bool isEnableToolSiteMirrors,
String inputGameLaunchECore,
String? customLauncherPath,
String? customGamePath,
int locationCacheSize,
bool isUseInternalDNS});
}
/// @nodoc
class _$SettingsUIStateCopyWithImpl<$Res>
implements $SettingsUIStateCopyWith<$Res> {
_$SettingsUIStateCopyWithImpl(this._self, this._then);
final SettingsUIState _self;
final $Res Function(SettingsUIState) _then;
/// Create a copy of SettingsUIState /// Create a copy of SettingsUIState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? isEnableToolSiteMirrors = null,
Object? inputGameLaunchECore = null,
Object? customLauncherPath = freezed,
Object? customGamePath = freezed,
Object? locationCacheSize = null,
Object? isUseInternalDNS = null,
}) {
return _then(_self.copyWith(
isEnableToolSiteMirrors: null == isEnableToolSiteMirrors
? _self.isEnableToolSiteMirrors
: isEnableToolSiteMirrors // ignore: cast_nullable_to_non_nullable
as bool,
inputGameLaunchECore: null == inputGameLaunchECore
? _self.inputGameLaunchECore
: inputGameLaunchECore // ignore: cast_nullable_to_non_nullable
as String,
customLauncherPath: freezed == customLauncherPath
? _self.customLauncherPath
: customLauncherPath // ignore: cast_nullable_to_non_nullable
as String?,
customGamePath: freezed == customGamePath
? _self.customGamePath
: customGamePath // ignore: cast_nullable_to_non_nullable
as String?,
locationCacheSize: null == locationCacheSize
? _self.locationCacheSize
: locationCacheSize // ignore: cast_nullable_to_non_nullable
as int,
isUseInternalDNS: null == isUseInternalDNS
? _self.isUseInternalDNS
: isUseInternalDNS // ignore: cast_nullable_to_non_nullable
as bool,
));
}
}
/// @nodoc
class _SettingsUIState implements SettingsUIState {
_SettingsUIState(
{this.isEnableToolSiteMirrors = false,
this.inputGameLaunchECore = "0",
this.customLauncherPath,
this.customGamePath,
this.locationCacheSize = 0,
this.isUseInternalDNS = false});
@override
@JsonKey()
final bool isEnableToolSiteMirrors;
@override
@JsonKey()
final String inputGameLaunchECore;
@override
final String? customLauncherPath;
@override
final String? customGamePath;
@override
@JsonKey()
final int locationCacheSize;
@override
@JsonKey()
final bool isUseInternalDNS;
/// Create a copy of SettingsUIState
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$SettingsUIStateCopyWith<_SettingsUIState> get copyWith =>
__$SettingsUIStateCopyWithImpl<_SettingsUIState>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _SettingsUIState &&
(identical(
other.isEnableToolSiteMirrors, isEnableToolSiteMirrors) ||
other.isEnableToolSiteMirrors == isEnableToolSiteMirrors) &&
(identical(other.inputGameLaunchECore, inputGameLaunchECore) ||
other.inputGameLaunchECore == inputGameLaunchECore) &&
(identical(other.customLauncherPath, customLauncherPath) ||
other.customLauncherPath == customLauncherPath) &&
(identical(other.customGamePath, customGamePath) ||
other.customGamePath == customGamePath) &&
(identical(other.locationCacheSize, locationCacheSize) ||
other.locationCacheSize == locationCacheSize) &&
(identical(other.isUseInternalDNS, isUseInternalDNS) ||
other.isUseInternalDNS == isUseInternalDNS));
}
@override
int get hashCode => Object.hash(
runtimeType,
isEnableToolSiteMirrors,
inputGameLaunchECore,
customLauncherPath,
customGamePath,
locationCacheSize,
isUseInternalDNS);
@override
String toString() {
return 'SettingsUIState(isEnableToolSiteMirrors: $isEnableToolSiteMirrors, inputGameLaunchECore: $inputGameLaunchECore, customLauncherPath: $customLauncherPath, customGamePath: $customGamePath, locationCacheSize: $locationCacheSize, isUseInternalDNS: $isUseInternalDNS)';
}
}
/// @nodoc
abstract mixin class _$SettingsUIStateCopyWith<$Res>
implements $SettingsUIStateCopyWith<$Res> {
factory _$SettingsUIStateCopyWith(
_SettingsUIState value, $Res Function(_SettingsUIState) _then) =
__$SettingsUIStateCopyWithImpl;
@override
@useResult
$Res call(
{bool isEnableToolSiteMirrors,
String inputGameLaunchECore,
String? customLauncherPath,
String? customGamePath,
int locationCacheSize,
bool isUseInternalDNS});
}
/// @nodoc
class __$SettingsUIStateCopyWithImpl<$Res>
implements _$SettingsUIStateCopyWith<$Res> {
__$SettingsUIStateCopyWithImpl(this._self, this._then);
final _SettingsUIState _self;
final $Res Function(_SettingsUIState) _then;
/// Create a copy of SettingsUIState
/// with the given fields replaced by the non-null parameter values.
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$SettingsUIStateImplCopyWith<_$SettingsUIStateImpl> get copyWith => $Res call({
__$$SettingsUIStateImplCopyWithImpl<_$SettingsUIStateImpl>( Object? isEnableToolSiteMirrors = null,
this, _$identity); Object? inputGameLaunchECore = null,
Object? customLauncherPath = freezed,
Object? customGamePath = freezed,
Object? locationCacheSize = null,
Object? isUseInternalDNS = null,
}) {
return _then(_SettingsUIState(
isEnableToolSiteMirrors: null == isEnableToolSiteMirrors
? _self.isEnableToolSiteMirrors
: isEnableToolSiteMirrors // ignore: cast_nullable_to_non_nullable
as bool,
inputGameLaunchECore: null == inputGameLaunchECore
? _self.inputGameLaunchECore
: inputGameLaunchECore // ignore: cast_nullable_to_non_nullable
as String,
customLauncherPath: freezed == customLauncherPath
? _self.customLauncherPath
: customLauncherPath // ignore: cast_nullable_to_non_nullable
as String?,
customGamePath: freezed == customGamePath
? _self.customGamePath
: customGamePath // ignore: cast_nullable_to_non_nullable
as String?,
locationCacheSize: null == locationCacheSize
? _self.locationCacheSize
: locationCacheSize // ignore: cast_nullable_to_non_nullable
as int,
isUseInternalDNS: null == isUseInternalDNS
? _self.isUseInternalDNS
: isUseInternalDNS // ignore: cast_nullable_to_non_nullable
as bool,
));
}
} }
abstract class _SettingsUIState implements SettingsUIState { // dart format on
factory _SettingsUIState(
{final bool isEnableToolSiteMirrors,
final String inputGameLaunchECore,
final String? customLauncherPath,
final String? customGamePath,
final int locationCacheSize,
final bool isUseInternalDNS}) = _$SettingsUIStateImpl;
@override
bool get isEnableToolSiteMirrors;
@override
String get inputGameLaunchECore;
@override
String? get customLauncherPath;
@override
String? get customGamePath;
@override
int get locationCacheSize;
@override
bool get isUseInternalDNS;
/// Create a copy of SettingsUIState
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$SettingsUIStateImplCopyWith<_$SettingsUIStateImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@ -21,7 +21,7 @@ import 'package:starcitizen_doctor/widgets/widgets.dart';
part 'rsi_launcher_enhance_dialog_ui.freezed.dart'; part 'rsi_launcher_enhance_dialog_ui.freezed.dart';
@freezed @freezed
class RSILauncherStateData with _$RSILauncherStateData { abstract class RSILauncherStateData with _$RSILauncherStateData {
const factory RSILauncherStateData({ const factory RSILauncherStateData({
required String version, required String version,
required asar_api.RsiLauncherAsarData data, required asar_api.RsiLauncherAsarData data,
@ -35,8 +35,7 @@ class RSILauncherStateData with _$RSILauncherStateData {
class RsiLauncherEnhanceDialogUI extends HookConsumerWidget { class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
final bool showNotGameInstallMsg; final bool showNotGameInstallMsg;
const RsiLauncherEnhanceDialogUI( const RsiLauncherEnhanceDialogUI({super.key, this.showNotGameInstallMsg = false});
{super.key, this.showNotGameInstallMsg = false});
static const supportLocalizationMap = { static const supportLocalizationMap = {
"en": NoL10n.langEn, "en": NoL10n.langEn,
@ -62,30 +61,25 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
} }
workingText.value = S.current.tools_rsi_launcher_enhance_init_msg2; workingText.value = S.current.tools_rsi_launcher_enhance_init_msg2;
if (!context.mounted) return; if (!context.mounted) return;
await _loadEnhanceData(context, ref, assarState) await _loadEnhanceData(context, ref, assarState).unwrap(context: context).unwrap(context: context);
.unwrap(context: context)
.unwrap(context: context);
workingText.value = ""; workingText.value = "";
} }
void doInstall() async { void doInstall() async {
if (!context.mounted) return;
workingText.value = S.current.tools_rsi_launcher_enhance_working_msg1;
if ((await SystemHelper.getPID("\"RSI Launcher\"")).isNotEmpty) { if ((await SystemHelper.getPID("\"RSI Launcher\"")).isNotEmpty) {
if (!context.mounted) return; if (!context.mounted) return;
showToast( showToast(context, S.current.tools_action_info_rsi_launcher_running_warning,
context, S.current.tools_action_info_rsi_launcher_running_warning, constraints: BoxConstraints(maxWidth: MediaQuery.of(context).size.width * .35));
constraints: BoxConstraints( workingText.value = "";
maxWidth: MediaQuery.of(context).size.width * .35));
return; return;
} }
if (!context.mounted) return; if (!context.mounted) return;
workingText.value = S.current.tools_rsi_launcher_enhance_working_msg1; final newScript = await _genNewScript(assarState).unwrap(context: context);
final newScript =
await _genNewScript(assarState).unwrap(context: context);
workingText.value = S.current.tools_rsi_launcher_enhance_working_msg2; workingText.value = S.current.tools_rsi_launcher_enhance_working_msg2;
if (!context.mounted) return; if (!context.mounted) return;
await assarState.value?.data await assarState.value?.data.writeMainJs(content: utf8.encode(newScript)).unwrap(context: context);
.writeMainJs(content: utf8.encode(newScript))
.unwrap(context: context);
AnalyticsApi.touch("rsi_launcher_mod_apply"); AnalyticsApi.touch("rsi_launcher_mod_apply");
await readState(); await readState();
} }
@ -97,16 +91,14 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
}, const []); }, const []);
return ContentDialog( return ContentDialog(
constraints: constraints: BoxConstraints(maxWidth: MediaQuery.of(context).size.width * .48),
BoxConstraints(maxWidth: MediaQuery.of(context).size.width * .48),
title: Row(children: [ title: Row(children: [
IconButton( IconButton(
icon: const Icon( icon: const Icon(
FluentIcons.back, FluentIcons.back,
size: 22, size: 22,
), ),
onPressed: onPressed: workingText.value.isEmpty ? Navigator.of(context).pop : null),
workingText.value.isEmpty ? Navigator.of(context).pop : null),
const SizedBox(width: 12), const SizedBox(width: 12),
Text(S.current.tools_rsi_launcher_enhance_title), Text(S.current.tools_rsi_launcher_enhance_title),
]), ]),
@ -119,8 +111,7 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
if (showNotGameInstallMsg) ...[ if (showNotGameInstallMsg) ...[
InfoBar( InfoBar(
title: const SizedBox(), title: const SizedBox(),
content: Text(S.current content: Text(S.current.home_localization_action_rsi_launcher_no_game_path_msg),
.home_localization_action_rsi_launcher_no_game_path_msg),
style: InfoBarThemeData(decoration: (severity) { style: InfoBarThemeData(decoration: (severity) {
return BoxDecoration( return BoxDecoration(
color: Colors.orange, color: Colors.orange,
@ -152,18 +143,16 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
children: [ children: [
Expanded( Expanded(
child: Text( child: Text(
S.current.tools_rsi_launcher_enhance_msg_version( S.current.tools_rsi_launcher_enhance_msg_version(assarState.value?.version ?? ""),
assarState.value?.version ?? ""),
style: TextStyle( style: TextStyle(
color: Colors.white.withValues(alpha: .6), color: Colors.white.withValues(alpha: .6),
), ),
), ),
), ),
Text( Text(
S.current.tools_rsi_launcher_enhance_msg_patch_status( S.current.tools_rsi_launcher_enhance_msg_patch_status((assarState.value?.isPatchInstalled ?? false)
(assarState.value?.isPatchInstalled ?? false) ? S.current.localization_info_installed
? S.current.localization_info_installed : S.current.tools_action_info_not_installed),
: S.current.tools_action_info_not_installed),
style: TextStyle( style: TextStyle(
color: Colors.white.withValues(alpha: .6), color: Colors.white.withValues(alpha: .6),
), ),
@ -188,12 +177,10 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text(S.current Text(S.current.tools_rsi_launcher_enhance_title_localization),
.tools_rsi_launcher_enhance_title_localization),
const SizedBox(height: 3), const SizedBox(height: 3),
Text( Text(
S.current S.current.tools_rsi_launcher_enhance_subtitle_localization,
.tools_rsi_launcher_enhance_subtitle_localization,
style: TextStyle( style: TextStyle(
fontSize: 13, fontSize: 13,
color: Colors.white.withValues(alpha: .6), color: Colors.white.withValues(alpha: .6),
@ -204,14 +191,11 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
ComboBox( ComboBox(
items: [ items: [
for (final key in supportLocalizationMap.keys) for (final key in supportLocalizationMap.keys)
ComboBoxItem( ComboBoxItem(value: key, child: Text(supportLocalizationMap[key]!))
value: key,
child: Text(supportLocalizationMap[key]!))
], ],
value: assarState.value?.enabledLocalization, value: assarState.value?.enabledLocalization,
onChanged: (v) { onChanged: (v) {
assarState.value = assarState.value! assarState.value = assarState.value!.copyWith(enabledLocalization: v);
.copyWith(enabledLocalization: v);
}, },
), ),
], ],
@ -228,15 +212,11 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Icon(expandEnhance.value Icon(expandEnhance.value ? FluentIcons.chevron_up : FluentIcons.chevron_down),
? FluentIcons.chevron_up
: FluentIcons.chevron_down),
const SizedBox(width: 12), const SizedBox(width: 12),
Text(expandEnhance.value Text(expandEnhance.value
? S.current ? S.current.tools_rsi_launcher_enhance_action_fold
.tools_rsi_launcher_enhance_action_fold : S.current.tools_rsi_launcher_enhance_action_expand),
: S.current
.tools_rsi_launcher_enhance_action_expand),
], ],
))), ))),
], ],
@ -250,13 +230,10 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
Column( Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Text(S.current Text(S.current.tools_rsi_launcher_enhance_note_msg),
.tools_rsi_launcher_enhance_note_msg),
], ],
), ),
constraints: BoxConstraints( constraints: BoxConstraints(maxWidth: MediaQuery.of(context).size.width * .55));
maxWidth:
MediaQuery.of(context).size.width * .55));
if (!userOK) return; if (!userOK) return;
} }
expandEnhance.value = !expandEnhance.value; expandEnhance.value = !expandEnhance.value;
@ -275,12 +252,10 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text(S.current Text(S.current.tools_rsi_launcher_enhance_title_download_booster),
.tools_rsi_launcher_enhance_title_download_booster),
const SizedBox(height: 3), const SizedBox(height: 3),
Text( Text(
S.current S.current.tools_rsi_launcher_enhance_subtitle_download_booster,
.tools_rsi_launcher_enhance_subtitle_download_booster,
style: TextStyle( style: TextStyle(
fontSize: 13, fontSize: 13,
color: Colors.white.withValues(alpha: .6), color: Colors.white.withValues(alpha: .6),
@ -290,11 +265,9 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
)), )),
ToggleSwitch( ToggleSwitch(
onChanged: (value) { onChanged: (value) {
assarState.value = assarState.value assarState.value = assarState.value?.copyWith(enableDownloaderBoost: value);
?.copyWith(enableDownloaderBoost: value);
}, },
checked: assarState.value?.enableDownloaderBoost ?? checked: assarState.value?.enableDownloaderBoost ?? false,
false,
) )
])), ])),
], ],
@ -303,17 +276,14 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
child: FilledButton( child: FilledButton(
onPressed: doInstall, onPressed: doInstall,
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(vertical: 4, horizontal: 6),
vertical: 4, horizontal: 6), child: Text(S.current.tools_rsi_launcher_enhance_action_install),
child: Text(S.current
.tools_rsi_launcher_enhance_action_install),
))), ))),
], ],
const SizedBox(height: 16), const SizedBox(height: 16),
Text( Text(
S.current.tools_rsi_launcher_enhance_msg_uninstall, S.current.tools_rsi_launcher_enhance_msg_uninstall,
style: TextStyle( style: TextStyle(color: Colors.white.withValues(alpha: .6), fontSize: 13),
color: Colors.white.withValues(alpha: .6), fontSize: 13),
), ),
], ],
], ],
@ -326,8 +296,7 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
final lPath = await SystemHelper.getRSILauncherPath(skipEXE: true); final lPath = await SystemHelper.getRSILauncherPath(skipEXE: true);
if (lPath.isEmpty) { if (lPath.isEmpty) {
if (!context.mounted) return null; if (!context.mounted) return null;
showToast(context, showToast(context, S.current.tools_rsi_launcher_enhance_msg_error_launcher_notfound);
S.current.tools_rsi_launcher_enhance_msg_error_launcher_notfound);
return null; return null;
} }
dPrint("[RsiLauncherEnhanceDialogUI] rsiLauncherPath ==== $lPath"); dPrint("[RsiLauncherEnhanceDialogUI] rsiLauncherPath ==== $lPath");
@ -335,25 +304,18 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
dPrint("[RsiLauncherEnhanceDialogUI] rsiLauncherDataPath ==== $dataPath"); dPrint("[RsiLauncherEnhanceDialogUI] rsiLauncherDataPath ==== $dataPath");
try { try {
final data = await asar_api.getRsiLauncherAsarData(asarPath: dataPath); final data = await asar_api.getRsiLauncherAsarData(asarPath: dataPath);
dPrint( dPrint("[RsiLauncherEnhanceDialogUI] rsiLauncherPath main.js path == ${data.mainJsPath}");
"[RsiLauncherEnhanceDialogUI] rsiLauncherPath main.js path == ${data.mainJsPath}"); final version = RegExp(r"main\.(\w+)\.js").firstMatch(data.mainJsPath)?.group(1);
final version =
RegExp(r"main\.(\w+)\.js").firstMatch(data.mainJsPath)?.group(1);
if (version == null) { if (version == null) {
if (!context.mounted) return null; if (!context.mounted) return null;
showToast( showToast(context, S.current.tools_rsi_launcher_enhance_msg_error_get_launcher_info_error);
context,
S.current
.tools_rsi_launcher_enhance_msg_error_get_launcher_info_error);
return null; return null;
} }
dPrint( dPrint("[RsiLauncherEnhanceDialogUI] rsiLauncherPath main.js version == $version");
"[RsiLauncherEnhanceDialogUI] rsiLauncherPath main.js version == $version");
final mainJsString = String.fromCharCodes(data.mainJsContent); final mainJsString = String.fromCharCodes(data.mainJsContent);
final (enabledLocalization, enableDownloaderBoost) = final (enabledLocalization, enableDownloaderBoost) = _readScriptState(mainJsString);
_readScriptState(mainJsString);
return RSILauncherStateData( return RSILauncherStateData(
version: version, version: version,
@ -365,25 +327,26 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
); );
} catch (e) { } catch (e) {
if (!context.mounted) return null; if (!context.mounted) return null;
showToast( showToast(context, S.current.tools_rsi_launcher_enhance_msg_error_get_launcher_info_error_with_args(e));
context,
S.current
.tools_rsi_launcher_enhance_msg_error_get_launcher_info_error_with_args(
e));
return null; return null;
} }
} }
Future<String> _loadEnhanceData(BuildContext context, WidgetRef ref, Future<String> _loadEnhanceData(
ValueNotifier<RSILauncherStateData?> assarState) async { BuildContext context, WidgetRef ref, ValueNotifier<RSILauncherStateData?> assarState) async {
final globalModel = ref.read(appGlobalModelProvider); final globalModel = ref.read(appGlobalModelProvider);
final enhancePath = final enhancePath = "${globalModel.applicationSupportDir}/launcher_enhance_data";
"${globalModel.applicationSupportDir}/launcher_enhance_data";
final enhanceFile = /// For debug
File("$enhancePath/${assarState.value?.version}.tar.gz"); final debugFile = File("$enhancePath/main.js");
if (await debugFile.exists()) {
final debugContent = await debugFile.readAsString();
await _loadDebugData(debugContent, assarState);
return debugContent;
}
final enhanceFile = File("$enhancePath/${assarState.value?.version}.tar.gz");
if (!await enhanceFile.exists()) { if (!await enhanceFile.exists()) {
final downloadUrl = final downloadUrl = "${URLConf.gitApiRSILauncherEnhanceUrl}/archive/${assarState.value?.version}.tar.gz";
"${URLConf.gitApiRSILauncherEnhanceUrl}/archive/${assarState.value?.version}.tar.gz";
final r = await RSHttp.get(downloadUrl).unwrap(); final r = await RSHttp.get(downloadUrl).unwrap();
if (r.statusCode != 200 || r.data == null) { if (r.statusCode != 200 || r.data == null) {
return ""; return "";
@ -391,24 +354,18 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
await enhanceFile.create(recursive: true); await enhanceFile.create(recursive: true);
await enhanceFile.writeAsBytes(r.data!, flush: true); await enhanceFile.writeAsBytes(r.data!, flush: true);
} }
final severMainJS = final severMainJS = await compute(_readArchive, (enhanceFile.path, "main.js"));
await compute(_readArchive, (enhanceFile.path, "main.js"));
final serverMainJSString = severMainJS.toString(); final serverMainJSString = severMainJS.toString();
final scriptState = _readScriptState(serverMainJSString); final scriptState = _readScriptState(serverMainJSString);
if (assarState.value?.enabledLocalization == null) { if (assarState.value?.enabledLocalization == null) {
assarState.value = assarState.value = assarState.value?.copyWith(enabledLocalization: scriptState.$1);
assarState.value?.copyWith(enabledLocalization: scriptState.$1); dPrint("[RsiLauncherEnhanceDialogUI] _loadEnhanceData enabledLocalization == ${scriptState.$1}");
dPrint(
"[RsiLauncherEnhanceDialogUI] _loadEnhanceData enabledLocalization == ${scriptState.$1}");
} }
if (assarState.value?.enableDownloaderBoost == null) { if (assarState.value?.enableDownloaderBoost == null) {
assarState.value = assarState.value = assarState.value?.copyWith(enableDownloaderBoost: scriptState.$2);
assarState.value?.copyWith(enableDownloaderBoost: scriptState.$2); dPrint("[RsiLauncherEnhanceDialogUI] _loadEnhanceData enableDownloaderBoost == ${scriptState.$2}");
dPrint(
"[RsiLauncherEnhanceDialogUI] _loadEnhanceData enableDownloaderBoost == ${scriptState.$2}");
} }
assarState.value = assarState.value = assarState.value?.copyWith(serverData: serverMainJSString);
assarState.value?.copyWith(serverData: serverMainJSString);
return serverMainJSString; return serverMainJSString;
} }
@ -432,12 +389,10 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
} }
// ignore: constant_identifier_names // ignore: constant_identifier_names
static const SC_TOOLBOX_ENABLED_LOCALIZATION_SCRIPT_START = static const SC_TOOLBOX_ENABLED_LOCALIZATION_SCRIPT_START = "const SC_TOOLBOX_ENABLED_LOCALIZATION = ";
"const SC_TOOLBOX_ENABLED_LOCALIZATION = ";
// ignore: constant_identifier_names // ignore: constant_identifier_names
static const SC_TOOLBOX_ENABLE_DOWNLOADER_BOOST_SCRIPT_START = static const SC_TOOLBOX_ENABLE_DOWNLOADER_BOOST_SCRIPT_START = "const SC_TOOLBOX_ENABLE_DOWNLOADER_BOOST = ";
"const SC_TOOLBOX_ENABLE_DOWNLOADER_BOOST = ";
(String?, bool?) _readScriptState(String mainJsString) { (String?, bool?) _readScriptState(String mainJsString) {
String? enabledLocalization; String? enabledLocalization;
@ -449,35 +404,44 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
.substring(SC_TOOLBOX_ENABLED_LOCALIZATION_SCRIPT_START.length) .substring(SC_TOOLBOX_ENABLED_LOCALIZATION_SCRIPT_START.length)
.replaceAll("\"", "") .replaceAll("\"", "")
.replaceAll(";", ""); .replaceAll(";", "");
} else if (lineTrim } else if (lineTrim.startsWith(SC_TOOLBOX_ENABLE_DOWNLOADER_BOOST_SCRIPT_START)) {
.startsWith(SC_TOOLBOX_ENABLE_DOWNLOADER_BOOST_SCRIPT_START)) { enableDownloaderBoost =
enableDownloaderBoost = lineTrim lineTrim.substring(SC_TOOLBOX_ENABLE_DOWNLOADER_BOOST_SCRIPT_START.length).toLowerCase() == "true;";
.substring(
SC_TOOLBOX_ENABLE_DOWNLOADER_BOOST_SCRIPT_START.length)
.toLowerCase() ==
"true;";
} }
} }
return (enabledLocalization, enableDownloaderBoost); return (enabledLocalization, enableDownloaderBoost);
} }
Future<String> _genNewScript( Future<String> _genNewScript(ValueNotifier<RSILauncherStateData?> assarState) async {
ValueNotifier<RSILauncherStateData?> assarState) async {
final serverScriptLines = assarState.value!.serverData.split("\n"); final serverScriptLines = assarState.value!.serverData.split("\n");
final StringBuffer scriptBuffer = StringBuffer(""); final StringBuffer scriptBuffer = StringBuffer("");
for (final line in serverScriptLines) { for (final line in serverScriptLines) {
final lineTrim = line.trim(); final lineTrim = line.trim();
if (lineTrim.startsWith(SC_TOOLBOX_ENABLED_LOCALIZATION_SCRIPT_START)) { if (lineTrim.startsWith(SC_TOOLBOX_ENABLED_LOCALIZATION_SCRIPT_START)) {
scriptBuffer.writeln( scriptBuffer
"$SC_TOOLBOX_ENABLED_LOCALIZATION_SCRIPT_START\"${assarState.value!.enabledLocalization}\";"); .writeln("$SC_TOOLBOX_ENABLED_LOCALIZATION_SCRIPT_START\"${assarState.value!.enabledLocalization}\";");
} else if (lineTrim } else if (lineTrim.startsWith(SC_TOOLBOX_ENABLE_DOWNLOADER_BOOST_SCRIPT_START)) {
.startsWith(SC_TOOLBOX_ENABLE_DOWNLOADER_BOOST_SCRIPT_START)) { scriptBuffer
scriptBuffer.writeln( .writeln("$SC_TOOLBOX_ENABLE_DOWNLOADER_BOOST_SCRIPT_START${assarState.value!.enableDownloaderBoost};");
"$SC_TOOLBOX_ENABLE_DOWNLOADER_BOOST_SCRIPT_START${assarState.value!.enableDownloaderBoost};");
} else { } else {
scriptBuffer.writeln(line); scriptBuffer.writeln(line);
} }
} }
return scriptBuffer.toString(); return scriptBuffer.toString();
} }
}
Future<void> _loadDebugData(String debugContent, ValueNotifier<RSILauncherStateData?> assarState) async {
assarState.value = assarState.value?.copyWith(serverData: debugContent);
dPrint("[RsiLauncherEnhanceDialogUI] _loadEnhanceData from debug file");
final scriptState = _readScriptState(debugContent);
if (assarState.value?.enabledLocalization == null) {
assarState.value = assarState.value?.copyWith(enabledLocalization: scriptState.$1);
dPrint("[RsiLauncherEnhanceDialogUI] _loadEnhanceData enabledLocalization == ${scriptState.$1}");
}
if (assarState.value?.enableDownloaderBoost == null) {
assarState.value = assarState.value?.copyWith(enableDownloaderBoost: scriptState.$2);
dPrint("[RsiLauncherEnhanceDialogUI] _loadEnhanceData enableDownloaderBoost == ${scriptState.$2}");
}
assarState.value = assarState.value?.copyWith(serverData: debugContent);
}
}

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file // coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint // ignore_for_file: type=lint
@ -9,101 +10,58 @@ part of 'rsi_launcher_enhance_dialog_ui.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; 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 /// @nodoc
mixin _$RSILauncherStateData { mixin _$RSILauncherStateData {
String get version => throw _privateConstructorUsedError; String get version;
asar_api.RsiLauncherAsarData get data => throw _privateConstructorUsedError; asar_api.RsiLauncherAsarData get data;
String get serverData => throw _privateConstructorUsedError; String get serverData;
bool get isPatchInstalled => throw _privateConstructorUsedError; bool get isPatchInstalled;
String? get enabledLocalization => throw _privateConstructorUsedError; String? get enabledLocalization;
bool? get enableDownloaderBoost => throw _privateConstructorUsedError; bool? get enableDownloaderBoost;
/// Create a copy of RSILauncherStateData /// Create a copy of RSILauncherStateData
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
$RSILauncherStateDataCopyWith<RSILauncherStateData> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $RSILauncherStateDataCopyWith<$Res> {
factory $RSILauncherStateDataCopyWith(RSILauncherStateData value,
$Res Function(RSILauncherStateData) then) =
_$RSILauncherStateDataCopyWithImpl<$Res, RSILauncherStateData>;
@useResult
$Res call(
{String version,
asar_api.RsiLauncherAsarData data,
String serverData,
bool isPatchInstalled,
String? enabledLocalization,
bool? enableDownloaderBoost});
}
/// @nodoc
class _$RSILauncherStateDataCopyWithImpl<$Res,
$Val extends RSILauncherStateData>
implements $RSILauncherStateDataCopyWith<$Res> {
_$RSILauncherStateDataCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of RSILauncherStateData
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
$RSILauncherStateDataCopyWith<RSILauncherStateData> get copyWith =>
_$RSILauncherStateDataCopyWithImpl<RSILauncherStateData>(
this as RSILauncherStateData, _$identity);
@override @override
$Res call({ bool operator ==(Object other) {
Object? version = null, return identical(this, other) ||
Object? data = null, (other.runtimeType == runtimeType &&
Object? serverData = null, other is RSILauncherStateData &&
Object? isPatchInstalled = null, (identical(other.version, version) || other.version == version) &&
Object? enabledLocalization = freezed, (identical(other.data, data) || other.data == data) &&
Object? enableDownloaderBoost = freezed, (identical(other.serverData, serverData) ||
}) { other.serverData == serverData) &&
return _then(_value.copyWith( (identical(other.isPatchInstalled, isPatchInstalled) ||
version: null == version other.isPatchInstalled == isPatchInstalled) &&
? _value.version (identical(other.enabledLocalization, enabledLocalization) ||
: version // ignore: cast_nullable_to_non_nullable other.enabledLocalization == enabledLocalization) &&
as String, (identical(other.enableDownloaderBoost, enableDownloaderBoost) ||
data: null == data other.enableDownloaderBoost == enableDownloaderBoost));
? _value.data }
: data // ignore: cast_nullable_to_non_nullable
as asar_api.RsiLauncherAsarData, @override
serverData: null == serverData int get hashCode => Object.hash(runtimeType, version, data, serverData,
? _value.serverData isPatchInstalled, enabledLocalization, enableDownloaderBoost);
: serverData // ignore: cast_nullable_to_non_nullable
as String, @override
isPatchInstalled: null == isPatchInstalled String toString() {
? _value.isPatchInstalled return 'RSILauncherStateData(version: $version, data: $data, serverData: $serverData, isPatchInstalled: $isPatchInstalled, enabledLocalization: $enabledLocalization, enableDownloaderBoost: $enableDownloaderBoost)';
: isPatchInstalled // ignore: cast_nullable_to_non_nullable
as bool,
enabledLocalization: freezed == enabledLocalization
? _value.enabledLocalization
: enabledLocalization // ignore: cast_nullable_to_non_nullable
as String?,
enableDownloaderBoost: freezed == enableDownloaderBoost
? _value.enableDownloaderBoost
: enableDownloaderBoost // ignore: cast_nullable_to_non_nullable
as bool?,
) as $Val);
} }
} }
/// @nodoc /// @nodoc
abstract class _$$RSILauncherStateDataImplCopyWith<$Res> abstract mixin class $RSILauncherStateDataCopyWith<$Res> {
implements $RSILauncherStateDataCopyWith<$Res> { factory $RSILauncherStateDataCopyWith(RSILauncherStateData value,
factory _$$RSILauncherStateDataImplCopyWith(_$RSILauncherStateDataImpl value, $Res Function(RSILauncherStateData) _then) =
$Res Function(_$RSILauncherStateDataImpl) then) = _$RSILauncherStateDataCopyWithImpl;
__$$RSILauncherStateDataImplCopyWithImpl<$Res>;
@override
@useResult @useResult
$Res call( $Res call(
{String version, {String version,
@ -115,12 +73,12 @@ abstract class _$$RSILauncherStateDataImplCopyWith<$Res>
} }
/// @nodoc /// @nodoc
class __$$RSILauncherStateDataImplCopyWithImpl<$Res> class _$RSILauncherStateDataCopyWithImpl<$Res>
extends _$RSILauncherStateDataCopyWithImpl<$Res, _$RSILauncherStateDataImpl> implements $RSILauncherStateDataCopyWith<$Res> {
implements _$$RSILauncherStateDataImplCopyWith<$Res> { _$RSILauncherStateDataCopyWithImpl(this._self, this._then);
__$$RSILauncherStateDataImplCopyWithImpl(_$RSILauncherStateDataImpl _value,
$Res Function(_$RSILauncherStateDataImpl) _then) final RSILauncherStateData _self;
: super(_value, _then); final $Res Function(RSILauncherStateData) _then;
/// Create a copy of RSILauncherStateData /// Create a copy of RSILauncherStateData
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -134,29 +92,29 @@ class __$$RSILauncherStateDataImplCopyWithImpl<$Res>
Object? enabledLocalization = freezed, Object? enabledLocalization = freezed,
Object? enableDownloaderBoost = freezed, Object? enableDownloaderBoost = freezed,
}) { }) {
return _then(_$RSILauncherStateDataImpl( return _then(_self.copyWith(
version: null == version version: null == version
? _value.version ? _self.version
: version // ignore: cast_nullable_to_non_nullable : version // ignore: cast_nullable_to_non_nullable
as String, as String,
data: null == data data: null == data
? _value.data ? _self.data
: data // ignore: cast_nullable_to_non_nullable : data // ignore: cast_nullable_to_non_nullable
as asar_api.RsiLauncherAsarData, as asar_api.RsiLauncherAsarData,
serverData: null == serverData serverData: null == serverData
? _value.serverData ? _self.serverData
: serverData // ignore: cast_nullable_to_non_nullable : serverData // ignore: cast_nullable_to_non_nullable
as String, as String,
isPatchInstalled: null == isPatchInstalled isPatchInstalled: null == isPatchInstalled
? _value.isPatchInstalled ? _self.isPatchInstalled
: isPatchInstalled // ignore: cast_nullable_to_non_nullable : isPatchInstalled // ignore: cast_nullable_to_non_nullable
as bool, as bool,
enabledLocalization: freezed == enabledLocalization enabledLocalization: freezed == enabledLocalization
? _value.enabledLocalization ? _self.enabledLocalization
: enabledLocalization // ignore: cast_nullable_to_non_nullable : enabledLocalization // ignore: cast_nullable_to_non_nullable
as String?, as String?,
enableDownloaderBoost: freezed == enableDownloaderBoost enableDownloaderBoost: freezed == enableDownloaderBoost
? _value.enableDownloaderBoost ? _self.enableDownloaderBoost
: enableDownloaderBoost // ignore: cast_nullable_to_non_nullable : enableDownloaderBoost // ignore: cast_nullable_to_non_nullable
as bool?, as bool?,
)); ));
@ -165,8 +123,8 @@ class __$$RSILauncherStateDataImplCopyWithImpl<$Res>
/// @nodoc /// @nodoc
class _$RSILauncherStateDataImpl implements _RSILauncherStateData { class _RSILauncherStateData implements RSILauncherStateData {
const _$RSILauncherStateDataImpl( const _RSILauncherStateData(
{required this.version, {required this.version,
required this.data, required this.data,
required this.serverData, required this.serverData,
@ -188,16 +146,20 @@ class _$RSILauncherStateDataImpl implements _RSILauncherStateData {
@override @override
final bool? enableDownloaderBoost; final bool? enableDownloaderBoost;
/// Create a copy of RSILauncherStateData
/// with the given fields replaced by the non-null parameter values.
@override @override
String toString() { @JsonKey(includeFromJson: false, includeToJson: false)
return 'RSILauncherStateData(version: $version, data: $data, serverData: $serverData, isPatchInstalled: $isPatchInstalled, enabledLocalization: $enabledLocalization, enableDownloaderBoost: $enableDownloaderBoost)'; @pragma('vm:prefer-inline')
} _$RSILauncherStateDataCopyWith<_RSILauncherStateData> get copyWith =>
__$RSILauncherStateDataCopyWithImpl<_RSILauncherStateData>(
this, _$identity);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$RSILauncherStateDataImpl && other is _RSILauncherStateData &&
(identical(other.version, version) || other.version == version) && (identical(other.version, version) || other.version == version) &&
(identical(other.data, data) || other.data == data) && (identical(other.data, data) || other.data == data) &&
(identical(other.serverData, serverData) || (identical(other.serverData, serverData) ||
@ -214,43 +176,76 @@ class _$RSILauncherStateDataImpl implements _RSILauncherStateData {
int get hashCode => Object.hash(runtimeType, version, data, serverData, int get hashCode => Object.hash(runtimeType, version, data, serverData,
isPatchInstalled, enabledLocalization, enableDownloaderBoost); isPatchInstalled, enabledLocalization, enableDownloaderBoost);
@override
String toString() {
return 'RSILauncherStateData(version: $version, data: $data, serverData: $serverData, isPatchInstalled: $isPatchInstalled, enabledLocalization: $enabledLocalization, enableDownloaderBoost: $enableDownloaderBoost)';
}
}
/// @nodoc
abstract mixin class _$RSILauncherStateDataCopyWith<$Res>
implements $RSILauncherStateDataCopyWith<$Res> {
factory _$RSILauncherStateDataCopyWith(_RSILauncherStateData value,
$Res Function(_RSILauncherStateData) _then) =
__$RSILauncherStateDataCopyWithImpl;
@override
@useResult
$Res call(
{String version,
asar_api.RsiLauncherAsarData data,
String serverData,
bool isPatchInstalled,
String? enabledLocalization,
bool? enableDownloaderBoost});
}
/// @nodoc
class __$RSILauncherStateDataCopyWithImpl<$Res>
implements _$RSILauncherStateDataCopyWith<$Res> {
__$RSILauncherStateDataCopyWithImpl(this._self, this._then);
final _RSILauncherStateData _self;
final $Res Function(_RSILauncherStateData) _then;
/// Create a copy of RSILauncherStateData /// Create a copy of RSILauncherStateData
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$RSILauncherStateDataImplCopyWith<_$RSILauncherStateDataImpl> $Res call({
get copyWith => Object? version = null,
__$$RSILauncherStateDataImplCopyWithImpl<_$RSILauncherStateDataImpl>( Object? data = null,
this, _$identity); Object? serverData = null,
Object? isPatchInstalled = null,
Object? enabledLocalization = freezed,
Object? enableDownloaderBoost = freezed,
}) {
return _then(_RSILauncherStateData(
version: null == version
? _self.version
: version // ignore: cast_nullable_to_non_nullable
as String,
data: null == data
? _self.data
: data // ignore: cast_nullable_to_non_nullable
as asar_api.RsiLauncherAsarData,
serverData: null == serverData
? _self.serverData
: serverData // ignore: cast_nullable_to_non_nullable
as String,
isPatchInstalled: null == isPatchInstalled
? _self.isPatchInstalled
: isPatchInstalled // ignore: cast_nullable_to_non_nullable
as bool,
enabledLocalization: freezed == enabledLocalization
? _self.enabledLocalization
: enabledLocalization // ignore: cast_nullable_to_non_nullable
as String?,
enableDownloaderBoost: freezed == enableDownloaderBoost
? _self.enableDownloaderBoost
: enableDownloaderBoost // ignore: cast_nullable_to_non_nullable
as bool?,
));
}
} }
abstract class _RSILauncherStateData implements RSILauncherStateData { // dart format on
const factory _RSILauncherStateData(
{required final String version,
required final asar_api.RsiLauncherAsarData data,
required final String serverData,
final bool isPatchInstalled,
final String? enabledLocalization,
final bool? enableDownloaderBoost}) = _$RSILauncherStateDataImpl;
@override
String get version;
@override
asar_api.RsiLauncherAsarData get data;
@override
String get serverData;
@override
bool get isPatchInstalled;
@override
String? get enabledLocalization;
@override
bool? get enableDownloaderBoost;
/// Create a copy of RSILauncherStateData
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$RSILauncherStateDataImplCopyWith<_$RSILauncherStateDataImpl>
get copyWith => throw _privateConstructorUsedError;
}

View File

@ -27,7 +27,7 @@ final Map<String?, String> logAnalyzeSearchTypeMap = {
}; };
@freezed @freezed
class LogAnalyzeLineData with _$LogAnalyzeLineData { abstract class LogAnalyzeLineData with _$LogAnalyzeLineData {
const factory LogAnalyzeLineData({ const factory LogAnalyzeLineData({
required String type, required String type,
required String title, required String title,

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file // coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint // ignore_for_file: type=lint
@ -9,93 +10,61 @@ part of 'log_analyze_provider.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; 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 /// @nodoc
mixin _$LogAnalyzeLineData { mixin _$LogAnalyzeLineData {
String get type => throw _privateConstructorUsedError; String get type;
String get title => throw _privateConstructorUsedError; String get title;
String? get data => throw _privateConstructorUsedError; String? get data;
String? get dateTime => throw _privateConstructorUsedError; String? get dateTime;
/// Create a copy of LogAnalyzeLineData /// Create a copy of LogAnalyzeLineData
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
$LogAnalyzeLineDataCopyWith<LogAnalyzeLineData> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $LogAnalyzeLineDataCopyWith<$Res> {
factory $LogAnalyzeLineDataCopyWith(
LogAnalyzeLineData value, $Res Function(LogAnalyzeLineData) then) =
_$LogAnalyzeLineDataCopyWithImpl<$Res, LogAnalyzeLineData>;
@useResult
$Res call({String type, String title, String? data, String? dateTime});
}
/// @nodoc
class _$LogAnalyzeLineDataCopyWithImpl<$Res, $Val extends LogAnalyzeLineData>
implements $LogAnalyzeLineDataCopyWith<$Res> {
_$LogAnalyzeLineDataCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of LogAnalyzeLineData
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
$LogAnalyzeLineDataCopyWith<LogAnalyzeLineData> get copyWith =>
_$LogAnalyzeLineDataCopyWithImpl<LogAnalyzeLineData>(
this as LogAnalyzeLineData, _$identity);
@override @override
$Res call({ bool operator ==(Object other) {
Object? type = null, return identical(this, other) ||
Object? title = null, (other.runtimeType == runtimeType &&
Object? data = freezed, other is LogAnalyzeLineData &&
Object? dateTime = freezed, (identical(other.type, type) || other.type == type) &&
}) { (identical(other.title, title) || other.title == title) &&
return _then(_value.copyWith( (identical(other.data, data) || other.data == data) &&
type: null == type (identical(other.dateTime, dateTime) ||
? _value.type other.dateTime == dateTime));
: type // ignore: cast_nullable_to_non_nullable }
as String,
title: null == title @override
? _value.title int get hashCode => Object.hash(runtimeType, type, title, data, dateTime);
: title // ignore: cast_nullable_to_non_nullable
as String, @override
data: freezed == data String toString() {
? _value.data return 'LogAnalyzeLineData(type: $type, title: $title, data: $data, dateTime: $dateTime)';
: data // ignore: cast_nullable_to_non_nullable
as String?,
dateTime: freezed == dateTime
? _value.dateTime
: dateTime // ignore: cast_nullable_to_non_nullable
as String?,
) as $Val);
} }
} }
/// @nodoc /// @nodoc
abstract class _$$LogAnalyzeLineDataImplCopyWith<$Res> abstract mixin class $LogAnalyzeLineDataCopyWith<$Res> {
implements $LogAnalyzeLineDataCopyWith<$Res> { factory $LogAnalyzeLineDataCopyWith(
factory _$$LogAnalyzeLineDataImplCopyWith(_$LogAnalyzeLineDataImpl value, LogAnalyzeLineData value, $Res Function(LogAnalyzeLineData) _then) =
$Res Function(_$LogAnalyzeLineDataImpl) then) = _$LogAnalyzeLineDataCopyWithImpl;
__$$LogAnalyzeLineDataImplCopyWithImpl<$Res>;
@override
@useResult @useResult
$Res call({String type, String title, String? data, String? dateTime}); $Res call({String type, String title, String? data, String? dateTime});
} }
/// @nodoc /// @nodoc
class __$$LogAnalyzeLineDataImplCopyWithImpl<$Res> class _$LogAnalyzeLineDataCopyWithImpl<$Res>
extends _$LogAnalyzeLineDataCopyWithImpl<$Res, _$LogAnalyzeLineDataImpl> implements $LogAnalyzeLineDataCopyWith<$Res> {
implements _$$LogAnalyzeLineDataImplCopyWith<$Res> { _$LogAnalyzeLineDataCopyWithImpl(this._self, this._then);
__$$LogAnalyzeLineDataImplCopyWithImpl(_$LogAnalyzeLineDataImpl _value,
$Res Function(_$LogAnalyzeLineDataImpl) _then) final LogAnalyzeLineData _self;
: super(_value, _then); final $Res Function(LogAnalyzeLineData) _then;
/// Create a copy of LogAnalyzeLineData /// Create a copy of LogAnalyzeLineData
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -107,21 +76,21 @@ class __$$LogAnalyzeLineDataImplCopyWithImpl<$Res>
Object? data = freezed, Object? data = freezed,
Object? dateTime = freezed, Object? dateTime = freezed,
}) { }) {
return _then(_$LogAnalyzeLineDataImpl( return _then(_self.copyWith(
type: null == type type: null == type
? _value.type ? _self.type
: type // ignore: cast_nullable_to_non_nullable : type // ignore: cast_nullable_to_non_nullable
as String, as String,
title: null == title title: null == title
? _value.title ? _self.title
: title // ignore: cast_nullable_to_non_nullable : title // ignore: cast_nullable_to_non_nullable
as String, as String,
data: freezed == data data: freezed == data
? _value.data ? _self.data
: data // ignore: cast_nullable_to_non_nullable : data // ignore: cast_nullable_to_non_nullable
as String?, as String?,
dateTime: freezed == dateTime dateTime: freezed == dateTime
? _value.dateTime ? _self.dateTime
: dateTime // ignore: cast_nullable_to_non_nullable : dateTime // ignore: cast_nullable_to_non_nullable
as String?, as String?,
)); ));
@ -130,8 +99,8 @@ class __$$LogAnalyzeLineDataImplCopyWithImpl<$Res>
/// @nodoc /// @nodoc
class _$LogAnalyzeLineDataImpl implements _LogAnalyzeLineData { class _LogAnalyzeLineData implements LogAnalyzeLineData {
const _$LogAnalyzeLineDataImpl( const _LogAnalyzeLineData(
{required this.type, required this.title, this.data, this.dateTime}); {required this.type, required this.title, this.data, this.dateTime});
@override @override
@ -143,16 +112,19 @@ class _$LogAnalyzeLineDataImpl implements _LogAnalyzeLineData {
@override @override
final String? dateTime; final String? dateTime;
/// Create a copy of LogAnalyzeLineData
/// with the given fields replaced by the non-null parameter values.
@override @override
String toString() { @JsonKey(includeFromJson: false, includeToJson: false)
return 'LogAnalyzeLineData(type: $type, title: $title, data: $data, dateTime: $dateTime)'; @pragma('vm:prefer-inline')
} _$LogAnalyzeLineDataCopyWith<_LogAnalyzeLineData> get copyWith =>
__$LogAnalyzeLineDataCopyWithImpl<_LogAnalyzeLineData>(this, _$identity);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$LogAnalyzeLineDataImpl && other is _LogAnalyzeLineData &&
(identical(other.type, type) || other.type == type) && (identical(other.type, type) || other.type == type) &&
(identical(other.title, title) || other.title == title) && (identical(other.title, title) || other.title == title) &&
(identical(other.data, data) || other.data == data) && (identical(other.data, data) || other.data == data) &&
@ -163,36 +135,60 @@ class _$LogAnalyzeLineDataImpl implements _LogAnalyzeLineData {
@override @override
int get hashCode => Object.hash(runtimeType, type, title, data, dateTime); int get hashCode => Object.hash(runtimeType, type, title, data, dateTime);
@override
String toString() {
return 'LogAnalyzeLineData(type: $type, title: $title, data: $data, dateTime: $dateTime)';
}
}
/// @nodoc
abstract mixin class _$LogAnalyzeLineDataCopyWith<$Res>
implements $LogAnalyzeLineDataCopyWith<$Res> {
factory _$LogAnalyzeLineDataCopyWith(
_LogAnalyzeLineData value, $Res Function(_LogAnalyzeLineData) _then) =
__$LogAnalyzeLineDataCopyWithImpl;
@override
@useResult
$Res call({String type, String title, String? data, String? dateTime});
}
/// @nodoc
class __$LogAnalyzeLineDataCopyWithImpl<$Res>
implements _$LogAnalyzeLineDataCopyWith<$Res> {
__$LogAnalyzeLineDataCopyWithImpl(this._self, this._then);
final _LogAnalyzeLineData _self;
final $Res Function(_LogAnalyzeLineData) _then;
/// Create a copy of LogAnalyzeLineData /// Create a copy of LogAnalyzeLineData
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$LogAnalyzeLineDataImplCopyWith<_$LogAnalyzeLineDataImpl> get copyWith => $Res call({
__$$LogAnalyzeLineDataImplCopyWithImpl<_$LogAnalyzeLineDataImpl>( Object? type = null,
this, _$identity); Object? title = null,
Object? data = freezed,
Object? dateTime = freezed,
}) {
return _then(_LogAnalyzeLineData(
type: null == type
? _self.type
: type // ignore: cast_nullable_to_non_nullable
as String,
title: null == title
? _self.title
: title // ignore: cast_nullable_to_non_nullable
as String,
data: freezed == data
? _self.data
: data // ignore: cast_nullable_to_non_nullable
as String?,
dateTime: freezed == dateTime
? _self.dateTime
: dateTime // ignore: cast_nullable_to_non_nullable
as String?,
));
}
} }
abstract class _LogAnalyzeLineData implements LogAnalyzeLineData { // dart format on
const factory _LogAnalyzeLineData(
{required final String type,
required final String title,
final String? data,
final String? dateTime}) = _$LogAnalyzeLineDataImpl;
@override
String get type;
@override
String get title;
@override
String? get data;
@override
String? get dateTime;
/// Create a copy of LogAnalyzeLineData
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$LogAnalyzeLineDataImplCopyWith<_$LogAnalyzeLineDataImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@ -43,7 +43,7 @@ class ToolsItemData {
} }
@freezed @freezed
class ToolsUIState with _$ToolsUIState { abstract class ToolsUIState with _$ToolsUIState {
factory ToolsUIState({ factory ToolsUIState({
@Default(false) bool working, @Default(false) bool working,
@Default("") String scInstalledPath, @Default("") String scInstalledPath,

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file // coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND // GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint // ignore_for_file: type=lint
@ -9,108 +10,69 @@ part of 'tools_ui_model.dart';
// FreezedGenerator // FreezedGenerator
// ************************************************************************** // **************************************************************************
// dart format off
T _$identity<T>(T value) => value; 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 /// @nodoc
mixin _$ToolsUIState { mixin _$ToolsUIState {
bool get working => throw _privateConstructorUsedError; bool get working;
String get scInstalledPath => throw _privateConstructorUsedError; String get scInstalledPath;
String get rsiLauncherInstalledPath => throw _privateConstructorUsedError; String get rsiLauncherInstalledPath;
List<String> get scInstallPaths => throw _privateConstructorUsedError; List<String> get scInstallPaths;
List<String> get rsiLauncherInstallPaths => List<String> get rsiLauncherInstallPaths;
throw _privateConstructorUsedError; List<ToolsItemData> get items;
List<ToolsItemData> get items => throw _privateConstructorUsedError; bool get isItemLoading;
bool get isItemLoading => throw _privateConstructorUsedError;
/// Create a copy of ToolsUIState /// Create a copy of ToolsUIState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false) @JsonKey(includeFromJson: false, includeToJson: false)
$ToolsUIStateCopyWith<ToolsUIState> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ToolsUIStateCopyWith<$Res> {
factory $ToolsUIStateCopyWith(
ToolsUIState value, $Res Function(ToolsUIState) then) =
_$ToolsUIStateCopyWithImpl<$Res, ToolsUIState>;
@useResult
$Res call(
{bool working,
String scInstalledPath,
String rsiLauncherInstalledPath,
List<String> scInstallPaths,
List<String> rsiLauncherInstallPaths,
List<ToolsItemData> items,
bool isItemLoading});
}
/// @nodoc
class _$ToolsUIStateCopyWithImpl<$Res, $Val extends ToolsUIState>
implements $ToolsUIStateCopyWith<$Res> {
_$ToolsUIStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of ToolsUIState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
$ToolsUIStateCopyWith<ToolsUIState> get copyWith =>
_$ToolsUIStateCopyWithImpl<ToolsUIState>(
this as ToolsUIState, _$identity);
@override @override
$Res call({ bool operator ==(Object other) {
Object? working = null, return identical(this, other) ||
Object? scInstalledPath = null, (other.runtimeType == runtimeType &&
Object? rsiLauncherInstalledPath = null, other is ToolsUIState &&
Object? scInstallPaths = null, (identical(other.working, working) || other.working == working) &&
Object? rsiLauncherInstallPaths = null, (identical(other.scInstalledPath, scInstalledPath) ||
Object? items = null, other.scInstalledPath == scInstalledPath) &&
Object? isItemLoading = null, (identical(
}) { other.rsiLauncherInstalledPath, rsiLauncherInstalledPath) ||
return _then(_value.copyWith( other.rsiLauncherInstalledPath == rsiLauncherInstalledPath) &&
working: null == working const DeepCollectionEquality()
? _value.working .equals(other.scInstallPaths, scInstallPaths) &&
: working // ignore: cast_nullable_to_non_nullable const DeepCollectionEquality().equals(
as bool, other.rsiLauncherInstallPaths, rsiLauncherInstallPaths) &&
scInstalledPath: null == scInstalledPath const DeepCollectionEquality().equals(other.items, items) &&
? _value.scInstalledPath (identical(other.isItemLoading, isItemLoading) ||
: scInstalledPath // ignore: cast_nullable_to_non_nullable other.isItemLoading == isItemLoading));
as String, }
rsiLauncherInstalledPath: null == rsiLauncherInstalledPath
? _value.rsiLauncherInstalledPath @override
: rsiLauncherInstalledPath // ignore: cast_nullable_to_non_nullable int get hashCode => Object.hash(
as String, runtimeType,
scInstallPaths: null == scInstallPaths working,
? _value.scInstallPaths scInstalledPath,
: scInstallPaths // ignore: cast_nullable_to_non_nullable rsiLauncherInstalledPath,
as List<String>, const DeepCollectionEquality().hash(scInstallPaths),
rsiLauncherInstallPaths: null == rsiLauncherInstallPaths const DeepCollectionEquality().hash(rsiLauncherInstallPaths),
? _value.rsiLauncherInstallPaths const DeepCollectionEquality().hash(items),
: rsiLauncherInstallPaths // ignore: cast_nullable_to_non_nullable isItemLoading);
as List<String>,
items: null == items @override
? _value.items String toString() {
: items // ignore: cast_nullable_to_non_nullable return 'ToolsUIState(working: $working, scInstalledPath: $scInstalledPath, rsiLauncherInstalledPath: $rsiLauncherInstalledPath, scInstallPaths: $scInstallPaths, rsiLauncherInstallPaths: $rsiLauncherInstallPaths, items: $items, isItemLoading: $isItemLoading)';
as List<ToolsItemData>,
isItemLoading: null == isItemLoading
? _value.isItemLoading
: isItemLoading // ignore: cast_nullable_to_non_nullable
as bool,
) as $Val);
} }
} }
/// @nodoc /// @nodoc
abstract class _$$ToolsUIStateImplCopyWith<$Res> abstract mixin class $ToolsUIStateCopyWith<$Res> {
implements $ToolsUIStateCopyWith<$Res> { factory $ToolsUIStateCopyWith(
factory _$$ToolsUIStateImplCopyWith( ToolsUIState value, $Res Function(ToolsUIState) _then) =
_$ToolsUIStateImpl value, $Res Function(_$ToolsUIStateImpl) then) = _$ToolsUIStateCopyWithImpl;
__$$ToolsUIStateImplCopyWithImpl<$Res>;
@override
@useResult @useResult
$Res call( $Res call(
{bool working, {bool working,
@ -123,12 +85,11 @@ abstract class _$$ToolsUIStateImplCopyWith<$Res>
} }
/// @nodoc /// @nodoc
class __$$ToolsUIStateImplCopyWithImpl<$Res> class _$ToolsUIStateCopyWithImpl<$Res> implements $ToolsUIStateCopyWith<$Res> {
extends _$ToolsUIStateCopyWithImpl<$Res, _$ToolsUIStateImpl> _$ToolsUIStateCopyWithImpl(this._self, this._then);
implements _$$ToolsUIStateImplCopyWith<$Res> {
__$$ToolsUIStateImplCopyWithImpl( final ToolsUIState _self;
_$ToolsUIStateImpl _value, $Res Function(_$ToolsUIStateImpl) _then) final $Res Function(ToolsUIState) _then;
: super(_value, _then);
/// Create a copy of ToolsUIState /// Create a copy of ToolsUIState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@ -143,33 +104,33 @@ class __$$ToolsUIStateImplCopyWithImpl<$Res>
Object? items = null, Object? items = null,
Object? isItemLoading = null, Object? isItemLoading = null,
}) { }) {
return _then(_$ToolsUIStateImpl( return _then(_self.copyWith(
working: null == working working: null == working
? _value.working ? _self.working
: working // ignore: cast_nullable_to_non_nullable : working // ignore: cast_nullable_to_non_nullable
as bool, as bool,
scInstalledPath: null == scInstalledPath scInstalledPath: null == scInstalledPath
? _value.scInstalledPath ? _self.scInstalledPath
: scInstalledPath // ignore: cast_nullable_to_non_nullable : scInstalledPath // ignore: cast_nullable_to_non_nullable
as String, as String,
rsiLauncherInstalledPath: null == rsiLauncherInstalledPath rsiLauncherInstalledPath: null == rsiLauncherInstalledPath
? _value.rsiLauncherInstalledPath ? _self.rsiLauncherInstalledPath
: rsiLauncherInstalledPath // ignore: cast_nullable_to_non_nullable : rsiLauncherInstalledPath // ignore: cast_nullable_to_non_nullable
as String, as String,
scInstallPaths: null == scInstallPaths scInstallPaths: null == scInstallPaths
? _value._scInstallPaths ? _self.scInstallPaths
: scInstallPaths // ignore: cast_nullable_to_non_nullable : scInstallPaths // ignore: cast_nullable_to_non_nullable
as List<String>, as List<String>,
rsiLauncherInstallPaths: null == rsiLauncherInstallPaths rsiLauncherInstallPaths: null == rsiLauncherInstallPaths
? _value._rsiLauncherInstallPaths ? _self.rsiLauncherInstallPaths
: rsiLauncherInstallPaths // ignore: cast_nullable_to_non_nullable : rsiLauncherInstallPaths // ignore: cast_nullable_to_non_nullable
as List<String>, as List<String>,
items: null == items items: null == items
? _value._items ? _self.items
: items // ignore: cast_nullable_to_non_nullable : items // ignore: cast_nullable_to_non_nullable
as List<ToolsItemData>, as List<ToolsItemData>,
isItemLoading: null == isItemLoading isItemLoading: null == isItemLoading
? _value.isItemLoading ? _self.isItemLoading
: isItemLoading // ignore: cast_nullable_to_non_nullable : isItemLoading // ignore: cast_nullable_to_non_nullable
as bool, as bool,
)); ));
@ -178,8 +139,8 @@ class __$$ToolsUIStateImplCopyWithImpl<$Res>
/// @nodoc /// @nodoc
class _$ToolsUIStateImpl implements _ToolsUIState { class _ToolsUIState implements ToolsUIState {
_$ToolsUIStateImpl( _ToolsUIState(
{this.working = false, {this.working = false,
this.scInstalledPath = "", this.scInstalledPath = "",
this.rsiLauncherInstalledPath = "", this.rsiLauncherInstalledPath = "",
@ -232,16 +193,19 @@ class _$ToolsUIStateImpl implements _ToolsUIState {
@JsonKey() @JsonKey()
final bool isItemLoading; final bool isItemLoading;
/// Create a copy of ToolsUIState
/// with the given fields replaced by the non-null parameter values.
@override @override
String toString() { @JsonKey(includeFromJson: false, includeToJson: false)
return 'ToolsUIState(working: $working, scInstalledPath: $scInstalledPath, rsiLauncherInstalledPath: $rsiLauncherInstalledPath, scInstallPaths: $scInstallPaths, rsiLauncherInstallPaths: $rsiLauncherInstallPaths, items: $items, isItemLoading: $isItemLoading)'; @pragma('vm:prefer-inline')
} _$ToolsUIStateCopyWith<_ToolsUIState> get copyWith =>
__$ToolsUIStateCopyWithImpl<_ToolsUIState>(this, _$identity);
@override @override
bool operator ==(Object other) { bool operator ==(Object other) {
return identical(this, other) || return identical(this, other) ||
(other.runtimeType == runtimeType && (other.runtimeType == runtimeType &&
other is _$ToolsUIStateImpl && other is _ToolsUIState &&
(identical(other.working, working) || other.working == working) && (identical(other.working, working) || other.working == working) &&
(identical(other.scInstalledPath, scInstalledPath) || (identical(other.scInstalledPath, scInstalledPath) ||
other.scInstalledPath == scInstalledPath) && other.scInstalledPath == scInstalledPath) &&
@ -268,44 +232,82 @@ class _$ToolsUIStateImpl implements _ToolsUIState {
const DeepCollectionEquality().hash(_items), const DeepCollectionEquality().hash(_items),
isItemLoading); isItemLoading);
@override
String toString() {
return 'ToolsUIState(working: $working, scInstalledPath: $scInstalledPath, rsiLauncherInstalledPath: $rsiLauncherInstalledPath, scInstallPaths: $scInstallPaths, rsiLauncherInstallPaths: $rsiLauncherInstallPaths, items: $items, isItemLoading: $isItemLoading)';
}
}
/// @nodoc
abstract mixin class _$ToolsUIStateCopyWith<$Res>
implements $ToolsUIStateCopyWith<$Res> {
factory _$ToolsUIStateCopyWith(
_ToolsUIState value, $Res Function(_ToolsUIState) _then) =
__$ToolsUIStateCopyWithImpl;
@override
@useResult
$Res call(
{bool working,
String scInstalledPath,
String rsiLauncherInstalledPath,
List<String> scInstallPaths,
List<String> rsiLauncherInstallPaths,
List<ToolsItemData> items,
bool isItemLoading});
}
/// @nodoc
class __$ToolsUIStateCopyWithImpl<$Res>
implements _$ToolsUIStateCopyWith<$Res> {
__$ToolsUIStateCopyWithImpl(this._self, this._then);
final _ToolsUIState _self;
final $Res Function(_ToolsUIState) _then;
/// Create a copy of ToolsUIState /// Create a copy of ToolsUIState
/// with the given fields replaced by the non-null parameter values. /// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override @override
@pragma('vm:prefer-inline') @pragma('vm:prefer-inline')
_$$ToolsUIStateImplCopyWith<_$ToolsUIStateImpl> get copyWith => $Res call({
__$$ToolsUIStateImplCopyWithImpl<_$ToolsUIStateImpl>(this, _$identity); Object? working = null,
Object? scInstalledPath = null,
Object? rsiLauncherInstalledPath = null,
Object? scInstallPaths = null,
Object? rsiLauncherInstallPaths = null,
Object? items = null,
Object? isItemLoading = null,
}) {
return _then(_ToolsUIState(
working: null == working
? _self.working
: working // ignore: cast_nullable_to_non_nullable
as bool,
scInstalledPath: null == scInstalledPath
? _self.scInstalledPath
: scInstalledPath // ignore: cast_nullable_to_non_nullable
as String,
rsiLauncherInstalledPath: null == rsiLauncherInstalledPath
? _self.rsiLauncherInstalledPath
: rsiLauncherInstalledPath // ignore: cast_nullable_to_non_nullable
as String,
scInstallPaths: null == scInstallPaths
? _self._scInstallPaths
: scInstallPaths // ignore: cast_nullable_to_non_nullable
as List<String>,
rsiLauncherInstallPaths: null == rsiLauncherInstallPaths
? _self._rsiLauncherInstallPaths
: rsiLauncherInstallPaths // ignore: cast_nullable_to_non_nullable
as List<String>,
items: null == items
? _self._items
: items // ignore: cast_nullable_to_non_nullable
as List<ToolsItemData>,
isItemLoading: null == isItemLoading
? _self.isItemLoading
: isItemLoading // ignore: cast_nullable_to_non_nullable
as bool,
));
}
} }
abstract class _ToolsUIState implements ToolsUIState { // dart format on
factory _ToolsUIState(
{final bool working,
final String scInstalledPath,
final String rsiLauncherInstalledPath,
final List<String> scInstallPaths,
final List<String> rsiLauncherInstallPaths,
final List<ToolsItemData> items,
final bool isItemLoading}) = _$ToolsUIStateImpl;
@override
bool get working;
@override
String get scInstalledPath;
@override
String get rsiLauncherInstalledPath;
@override
List<String> get scInstallPaths;
@override
List<String> get rsiLauncherInstallPaths;
@override
List<ToolsItemData> get items;
@override
bool get isItemLoading;
/// Create a copy of ToolsUIState
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ToolsUIStateImplCopyWith<_$ToolsUIStateImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@ -9,7 +9,7 @@ environment:
# Add regular dependencies here. # Add regular dependencies here.
dependencies: dependencies:
# path: ^1.8.0 # path: ^1.8.0
analyzer: ^6.4.1 analyzer: any
uuid: ^4.3.3 uuid: ^4.3.3
translator: ^1.0.0 translator: ^1.0.0

View File

@ -5,31 +5,26 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: _fe_analyzer_shared name: _fe_analyzer_shared
sha256: "16e298750b6d0af7ce8a3ba7c18c69c3785d11b15ec83f6dcd0ad2a0009b3cab" sha256: dc27559385e905ad30838356c5f5d574014ba39872d732111cd07ac0beff4c57
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "76.0.0" version: "80.0.0"
_macros:
dependency: transitive
description: dart
source: sdk
version: "0.3.3"
analyzer: analyzer:
dependency: transitive dependency: transitive
description: description:
name: analyzer name: analyzer
sha256: "1f14db053a8c23e260789e9b0980fa27f2680dd640932cae5e1137cce0e46e1e" sha256: "192d1c5b944e7e53b24b5586db760db934b177d4147c42fbca8c8c5f1eb8d11e"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.11.0" version: "7.3.0"
analyzer_plugin: analyzer_plugin:
dependency: transitive dependency: transitive
description: description:
name: analyzer_plugin name: analyzer_plugin
sha256: "9661b30b13a685efaee9f02e5d01ed9f2b423bd889d28a304d02d704aee69161" sha256: b3075265c5ab222f8b3188342dcb50b476286394a40323e85d1fa725035d40a4
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.11.3" version: "0.13.0"
archive: archive:
dependency: "direct main" dependency: "direct main"
description: description:
@ -139,10 +134,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: built_value name: built_value
sha256: ea90e81dc4a25a043d9bee692d20ed6d1c4a1662a28c03a96417446c093ed6b4 sha256: "082001b5c3dc495d4a42f1d5789990505df20d8547d42507c29050af6933ee27"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "8.9.5" version: "8.10.1"
card_swiper: card_swiper:
dependency: "direct main" dependency: "direct main"
description: description:
@ -259,34 +254,34 @@ packages:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: custom_lint name: custom_lint
sha256: "3486c470bb93313a9417f926c7dd694a2e349220992d7b9d14534dc49c15bba9" sha256: "409c485fd14f544af1da965d5a0d160ee57cd58b63eeaa7280a4f28cf5bda7f1"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.7.0" version: "0.7.5"
custom_lint_builder: custom_lint_builder:
dependency: transitive dependency: transitive
description: description:
name: custom_lint_builder name: custom_lint_builder
sha256: "42cdc41994eeeddab0d7a722c7093ec52bd0761921eeb2cbdbf33d192a234759" sha256: "107e0a43606138015777590ee8ce32f26ba7415c25b722ff0908a6f5d7a4c228"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.7.0" version: "0.7.5"
custom_lint_core: custom_lint_core:
dependency: transitive dependency: transitive
description: description:
name: custom_lint_core name: custom_lint_core
sha256: "02450c3e45e2a6e8b26c4d16687596ab3c4644dd5792e3313aa9ceba5a49b7f5" sha256: "31110af3dde9d29fb10828ca33f1dce24d2798477b167675543ce3d208dee8be"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.7.0" version: "0.7.5"
custom_lint_visitor: custom_lint_visitor:
dependency: transitive dependency: transitive
description: description:
name: custom_lint_visitor name: custom_lint_visitor
sha256: bfe9b7a09c4775a587b58d10ebb871d4fe618237639b1e84d5ec62d7dfef25f9 sha256: "36282d85714af494ee2d7da8c8913630aa6694da99f104fb2ed4afcf8fc857d8"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.0+6.11.0" version: "1.0.0+7.3.0"
dart_rss: dart_rss:
dependency: "direct main" dependency: "direct main"
description: description:
@ -299,10 +294,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: dart_style name: dart_style
sha256: "7306ab8a2359a48d22310ad823521d723acfed60ee1f7e37388e8986853b6820" sha256: "5b236382b47ee411741447c1f1e111459c941ea1b3f2b540dde54c210a3662af"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.3.8" version: "3.1.0"
desktop_multi_window: desktop_multi_window:
dependency: "direct main" dependency: "direct main"
description: description:
@ -363,10 +358,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: extended_image_library name: extended_image_library
sha256: ae468c31c375064964de11cbb31310a58c4462df6e3bae1a0bc0066f586795d5 sha256: "1f9a24d3a00c2633891c6a7b5cab2807999eb2d5b597e5133b63f49d113811fe"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "5.0.0" version: "5.0.1"
fake_async: fake_async:
dependency: transitive dependency: transitive
description: description:
@ -387,10 +382,10 @@ packages:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: ffigen name: ffigen
sha256: "2119b4fe3aad0db94dc9531b90283c4640a6231070e613c400b426a4da08c704" sha256: cb3edbfb68ac5283102a2deb7057913d3a1fb16552dacda0c07eb144497e4891
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "16.1.0" version: "19.0.0"
file: file:
dependency: "direct main" dependency: "direct main"
description: description:
@ -427,10 +422,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: fluent_ui name: fluent_ui
sha256: "76c4ba700bb26ac9894b9c6b16cae40f36f78266b2281c995d814b01a7c75356" sha256: "8645eabacb46bfc9632fadc6e106756cdc6f2a4efb5a4fed4410bd3131306fe8"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.11.5" version: "4.12.0"
flutter: flutter:
dependency: "direct main" dependency: "direct main"
description: flutter description: flutter
@ -464,10 +459,10 @@ packages:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: flutter_lints name: flutter_lints
sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" sha256: "3105dc8492f6183fb076ccf1f351ac3d60564bff92e20bfc4af9cc1651f4e7e1"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "5.0.0" version: "6.0.0"
flutter_localizations: flutter_localizations:
dependency: "direct main" dependency: "direct main"
description: flutter description: flutter
@ -493,10 +488,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: flutter_rust_bridge name: flutter_rust_bridge
sha256: b416ff56002789e636244fb4cc449f587656eff995e5a7169457eb0593fcaddb sha256: "5a5c7a5deeef2cc2ffe6076a33b0429f4a20ceac22a397297aed2b1eb067e611"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.10.0" version: "2.9.0"
flutter_staggered_grid_view: flutter_staggered_grid_view:
dependency: "direct main" dependency: "direct main"
description: description:
@ -543,18 +538,18 @@ packages:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: freezed name: freezed
sha256: "44c19278dd9d89292cf46e97dc0c1e52ce03275f40a97c5a348e802a924bf40e" sha256: "6022db4c7bfa626841b2a10f34dd1e1b68e8f8f9650db6112dcdeeca45ca793c"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.5.7" version: "3.0.6"
freezed_annotation: freezed_annotation:
dependency: "direct main" dependency: "direct main"
description: description:
name: freezed_annotation name: freezed_annotation
sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 sha256: c87ff004c8aa6af2d531668b46a4ea379f7191dc6dfa066acd53d506da6e044b
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.4.4" version: "3.0.0"
frontend_server_client: frontend_server_client:
dependency: transitive dependency: transitive
description: description:
@ -639,10 +634,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: hive_ce name: hive_ce
sha256: "192b7334299e3672efa1f85d544fef0091c5c592be5caada61417e37723addc6" sha256: "708bb39050998707c5d422752159f91944d3c81ab42d80e1bd0ee37d8e130658"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.11.2" version: "2.11.3"
hooks_riverpod: hooks_riverpod:
dependency: "direct main" dependency: "direct main"
description: description:
@ -671,10 +666,10 @@ packages:
dependency: "direct overridden" dependency: "direct overridden"
description: description:
name: http name: http
sha256: fe7ab022b76f3034adc518fb6ea04a82387620e19977665ea18d30a1cf43442f sha256: "2c11f3f94c687ee9bad77c171151672986360b2b001d109814ee7140b2cf261b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.3.0" version: "1.4.0"
http2: http2:
dependency: transitive dependency: transitive
description: description:
@ -735,10 +730,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: isolate_channel name: isolate_channel
sha256: bafedfbcc1e9796ada179b5dac7043b33eb85d35204b089ca37d480d9c0068df sha256: f3d36f783b301e6b312c3450eeb2656b0e7d1db81331af2a151d9083a3f6b18d
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.2.2" version: "0.2.2+1"
isolate_contactor: isolate_contactor:
dependency: transitive dependency: transitive
description: description:
@ -783,10 +778,10 @@ packages:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: json_serializable name: json_serializable
sha256: c2fcb3920cf2b6ae6845954186420fca40bc0a8abcc84903b7801f17d7050d7c sha256: c50ef5fc083d5b5e12eef489503ba3bf5ccc899e487d691584699b4bdefeea8c
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.9.0" version: "6.9.5"
jwt_decode: jwt_decode:
dependency: "direct main" dependency: "direct main"
description: description:
@ -823,10 +818,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: lints name: lints
sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 sha256: a5e2b223cb7c9c8efdc663ef484fdd95bb243bff242ef5b13e26883547fce9a0
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "5.1.1" version: "6.0.0"
logging: logging:
dependency: transitive dependency: transitive
description: description:
@ -839,18 +834,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: macos_window_utils name: macos_window_utils
sha256: "28ebb4e6d5cbaa1330b5f78d13cf9693779830d0ffc64b471f8d384dd73b7b21" sha256: b5832b9a9df1741d78b76ea77811803fbcc944599b3b41950a9f19e822731023
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.7.1" version: "1.8.1"
macros:
dependency: transitive
description:
name: macros
sha256: "1d9e801cd66f7ea3663c45fc708450db1fa57f988142c64289142c9b7ee80656"
url: "https://pub.dev"
source: hosted
version: "0.1.3-main.0"
markdown: markdown:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1031,10 +1018,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: protobuf name: protobuf
sha256: fbb0c37d435641d0b84813c1dad41e6fa61ddc880a320bce16b3063ecec35aa6 sha256: "579fe5557eae58e3adca2e999e38f02441d8aa908703854a9e0a0f47fa857731"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.0.0" version: "4.1.0"
pub_semver: pub_semver:
dependency: transitive dependency: transitive
description: description:
@ -1111,10 +1098,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: riverpod_analyzer_utils name: riverpod_analyzer_utils
sha256: c6b8222b2b483cb87ae77ad147d6408f400c64f060df7a225b127f4afef4f8c8 sha256: "03a17170088c63aab6c54c44456f5ab78876a1ddb6032ffde1662ddab4959611"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.5.8" version: "0.5.10"
riverpod_annotation: riverpod_annotation:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1127,18 +1114,18 @@ packages:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: riverpod_generator name: riverpod_generator
sha256: "63546d70952015f0981361636bf8f356d9cfd9d7f6f0815e3c07789a41233188" sha256: "44a0992d54473eb199ede00e2260bd3c262a86560e3c6f6374503d86d0580e36"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.6.3" version: "2.6.5"
riverpod_lint: riverpod_lint:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: riverpod_lint name: riverpod_lint
sha256: "83e4caa337a9840469b7b9bd8c2351ce85abad80f570d84146911b32086fbd99" sha256: "89a52b7334210dbff8605c3edf26cfe69b15062beed5cbfeff2c3812c33c9e35"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.6.3" version: "2.6.5"
rust_builder: rust_builder:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1258,10 +1245,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: source_gen name: source_gen
sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" sha256: "35c8150ece9e8c8d263337a265153c3329667640850b9304861faea59fc98f6b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.5.0" version: "2.0.0"
source_helper: source_helper:
dependency: transitive dependency: transitive
description: description:
@ -1474,10 +1461,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: vector_graphics_compiler name: vector_graphics_compiler
sha256: "1b4b9e706a10294258727674a340ae0d6e64a7231980f9f9a3d12e4b42407aad" sha256: "557a315b7d2a6dbb0aaaff84d857967ce6bdc96a63dc6ee2a57ce5a6ee5d3331"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.1.16" version: "1.1.17"
vector_math: vector_math:
dependency: transitive dependency: transitive
description: description:
@ -1530,10 +1517,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: win32 name: win32
sha256: dc6ecaa00a7c708e5b4d10ee7bec8c270e9276dfcab1783f57e9962d7884305f sha256: "329edf97fdd893e0f1e3b9e88d6a0e627128cc17cc316a8d67fda8f1451178ba"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "5.12.0" version: "5.13.0"
win32_registry: win32_registry:
dependency: transitive dependency: transitive
description: description:
@ -1546,10 +1533,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: window_manager name: window_manager
sha256: "732896e1416297c63c9e3fb95aea72d0355f61390263982a47fd519169dc5059" sha256: "51d50168ab267d344b975b15390426b1243600d436770d3f13de67e55b05ec16"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.4.3" version: "0.5.0"
xdg_directories: xdg_directories:
dependency: transitive dependency: transitive
description: description:
@ -1583,5 +1570,5 @@ packages:
source: hosted source: hosted
version: "2.2.2" version: "2.2.2"
sdks: sdks:
dart: ">=3.7.0 <4.0.0" dart: ">=3.8.0 <4.0.0"
flutter: ">=3.29.0" flutter: ">=3.32.0"

View File

@ -19,7 +19,7 @@ dependencies:
hooks_riverpod: ^2.6.1 hooks_riverpod: ^2.6.1
json_annotation: ^4.9.0 json_annotation: ^4.9.0
go_router: ^15.1.2 go_router: ^15.1.2
window_manager: ^0.4.0 window_manager: ^0.5.0
fluent_ui: ^4.11.5 fluent_ui: ^4.11.5
flutter_staggered_grid_view: ^0.7.0 flutter_staggered_grid_view: ^0.7.0
flutter_acrylic: ^1.1.4 flutter_acrylic: ^1.1.4
@ -43,8 +43,8 @@ dependencies:
flutter_tilt: ^3.0.0 flutter_tilt: ^3.0.0
card_swiper: ^3.0.1 card_swiper: ^3.0.1
ffi: ^2.1.0 ffi: ^2.1.0
flutter_rust_bridge: 2.10.0 flutter_rust_bridge: 2.9.0
freezed_annotation: ^2.4.1 freezed_annotation: ^3.0.0
meta: ^1.9.1 meta: ^1.9.1
hexcolor: ^3.0.1 hexcolor: ^3.0.1
dart_rss: ^3.0.1 dart_rss: ^3.0.1
@ -77,16 +77,15 @@ dependency_overrides:
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
flutter_lints: ^6.0.0
flutter_lints: ^5.0.0
msix: ^3.16.4 msix: ^3.16.4
build_runner: ^2.4.8 build_runner: ^2.4.8
freezed: ^2.4.5 freezed: ^3.0.6
json_serializable: ^6.7.1 json_serializable: ^6.7.1
riverpod_generator: ^2.6.2 riverpod_generator: ^2.6.2
custom_lint: ^0.7.0 custom_lint: ^0.7.0
riverpod_lint: ^2.6.2 riverpod_lint: ^2.6.2
ffigen: ^16.0.0 ffigen: ^19.0.0
sct_dev_tools: sct_dev_tools:
path: ./packages/sct_dev_tools path: ./packages/sct_dev_tools

9
rust/Cargo.lock generated
View File

@ -897,9 +897,9 @@ dependencies = [
[[package]] [[package]]
name = "flutter_rust_bridge" name = "flutter_rust_bridge"
version = "2.10.0" version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff1d2ad18166cead8c1b92b1c00e64aacc32e6ebd1ac95f77089c276c9c6bd8c" checksum = "2f8c0dee6249225e815dcff3f3a39b98d9f66fdb3c392a432715b646bfa4da02"
dependencies = [ dependencies = [
"allo-isolate", "allo-isolate",
"android_logger", "android_logger",
@ -926,9 +926,9 @@ dependencies = [
[[package]] [[package]]
name = "flutter_rust_bridge_macros" name = "flutter_rust_bridge_macros"
version = "2.10.0" version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "36cf75fba54902e67db5eef4a520df1c9f604db6f71f106fbc012477e2d81542" checksum = "8e88d604908d9eccb4ca9c26640ce41033165cbef041460e704ae28bd5208bce"
dependencies = [ dependencies = [
"hex", "hex",
"md-5", "md-5",
@ -2373,6 +2373,7 @@ dependencies = [
"scopeguard", "scopeguard",
"tokio", "tokio",
"url", "url",
"walkdir",
"win32job", "win32job",
"windows 0.61.1", "windows 0.61.1",
] ]

View File

@ -11,7 +11,7 @@ strip = "debuginfo"
crate-type = ["cdylib", "staticlib"] crate-type = ["cdylib", "staticlib"]
[dependencies] [dependencies]
flutter_rust_bridge = "=2.10.0" flutter_rust_bridge = "=2.9.0"
tokio = { version = "1", features = ["rt", "rt-multi-thread", "macros", "process"] } tokio = { version = "1", features = ["rt", "rt-multi-thread", "macros", "process"] }
futures = { version = "0.3", default-features = false, features = ["executor"] } futures = { version = "0.3", default-features = false, features = ["executor"] }
url = "2.5" url = "2.5"
@ -19,10 +19,10 @@ once_cell = "1.20"
reqwest = { version = "0.12", features = ["rustls-tls-webpki-roots", "cookies", "gzip", "json", "stream"] } reqwest = { version = "0.12", features = ["rustls-tls-webpki-roots", "cookies", "gzip", "json", "stream"] }
hickory-resolver = { version = "0.25" } hickory-resolver = { version = "0.25" }
anyhow = "1.0" anyhow = "1.0"
scopeguard = "1.2" scopeguard = "1.2"
notify-rust = "4" notify-rust = "4"
asar = "0.3.0" asar = "0.3.0"
walkdir = "2.5.0"
[target.'cfg(windows)'.dependencies] [target.'cfg(windows)'.dependencies]
windows = { version = "0.61.1", features = ["Win32_UI_WindowsAndMessaging"] } windows = { version = "0.61.1", features = ["Win32_UI_WindowsAndMessaging"] }

View File

@ -2,6 +2,7 @@ use std::fs::File;
use asar::{AsarReader, AsarWriter}; use asar::{AsarReader, AsarWriter};
use tokio::fs; use tokio::fs;
use walkdir::WalkDir;
pub struct RsiLauncherAsarData { pub struct RsiLauncherAsarData {
pub asar_path: String, pub asar_path: String,
@ -11,18 +12,50 @@ pub struct RsiLauncherAsarData {
impl RsiLauncherAsarData { impl RsiLauncherAsarData {
pub async fn write_main_js(&self, content: Vec<u8>) -> anyhow::Result<()> { pub async fn write_main_js(&self, content: Vec<u8>) -> anyhow::Result<()> {
println!("[RsiLauncherAsarData] write_main_js");
let mut asar_writer = AsarWriter::new(); let mut asar_writer = AsarWriter::new();
let asar_mem_file = fs::read(self.asar_path.clone()).await?; let asar_mem_file = fs::read(self.asar_path.clone()).await?;
let asar = AsarReader::new(&asar_mem_file, None)?; let asar = AsarReader::new(&asar_mem_file, None)?;
let symlink_path = format!("{}.unpacked", self.asar_path);
asar.files().iter().for_each(|v| { asar.files().iter().for_each(|v| {
let (path, file) = v; let (path, file) = v;
let path_string = path.clone().into_os_string().into_string().unwrap(); let path_string = path.clone().into_os_string().into_string().unwrap();
if path_string == self.main_js_path { if path_string == self.main_js_path {
asar_writer.write_file(path, &content, true).unwrap(); asar_writer.write_file(path, &content, true).unwrap();
} else { } else {
asar_writer.write_file(path, file.data(), true).unwrap(); // check file exists in symlink_dir
let file_path = format!("{}/{}", symlink_path, path_string);
if std::fs::metadata(&file_path).is_ok() {
println!("[RsiLauncherAsarData] skip file: {}", path_string);
} else {
println!("[RsiLauncherAsarData] write_file: {}", path_string);
asar_writer.write_file(path, file.data(), true).unwrap();
}
} }
}); });
// check if symlink_dir exists
if fs::metadata(&symlink_path).await.is_ok() {
// loop symlink_dir
for entry in WalkDir::new(symlink_path.clone())
.follow_links(true)
.into_iter()
.filter_map(|e| e.ok())
{
let f_path = entry.path();
if f_path.is_file() {
let relative_path = f_path.strip_prefix(&symlink_path)?;
let relative_path_str = relative_path.to_str().unwrap();
asar_writer.write_file(relative_path, &fs::read(f_path).await?, true, )?;
// asar_writer.write_symlink(relative_path_str, f_path)?;
println!(
"[RsiLauncherAsarData] write symlink file: {} -> {}",
relative_path_str,
f_path.to_str().unwrap_or("??")
);
}
}
}
// rm old asar // rm old asar
fs::remove_file(&self.asar_path).await?; fs::remove_file(&self.asar_path).await?;
// write new asar // write new asar
@ -49,4 +82,4 @@ pub async fn get_rsi_launcher_asar_data(asar_path: &str) -> anyhow::Result<RsiLa
main_js_path, main_js_path,
main_js_content, main_js_content,
}) })
} }