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
dart_output: lib/common/rust/
full_dep: true
web: false
web: false
enable_lifetime: true

View File

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

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
@ -9,225 +10,32 @@ part of 'app.dart';
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
/// @nodoc
mixin _$AppGlobalState {
String? get deviceUUID => throw _privateConstructorUsedError;
String? get applicationSupportDir => throw _privateConstructorUsedError;
String? get applicationBinaryModuleDir => throw _privateConstructorUsedError;
AppVersionData? get networkVersionData => throw _privateConstructorUsedError;
ThemeConf get themeConf => throw _privateConstructorUsedError;
Locale? get appLocale => throw _privateConstructorUsedError;
Box<dynamic>? get appConfBox => throw _privateConstructorUsedError;
String? get deviceUUID;
String? get applicationSupportDir;
String? get applicationBinaryModuleDir;
AppVersionData? get networkVersionData;
ThemeConf get themeConf;
Locale? get appLocale;
Box? get appConfBox;
/// Create a copy of AppGlobalState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$AppGlobalStateCopyWith<AppGlobalState> get copyWith =>
throw _privateConstructorUsedError;
}
/// @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)';
}
_$AppGlobalStateCopyWithImpl<AppGlobalState>(
this as AppGlobalState, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$AppGlobalStateImpl &&
other is AppGlobalState &&
(identical(other.deviceUUID, deviceUUID) ||
other.deviceUUID == deviceUUID) &&
(identical(other.applicationSupportDir, applicationSupportDir) ||
@ -257,124 +65,305 @@ class _$AppGlobalStateImpl implements _AppGlobalState {
appLocale,
appConfBox);
/// Create a copy of AppGlobalState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$AppGlobalStateImplCopyWith<_$AppGlobalStateImpl> get copyWith =>
__$$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);
String toString() {
return 'AppGlobalState(deviceUUID: $deviceUUID, applicationSupportDir: $applicationSupportDir, applicationBinaryModuleDir: $applicationBinaryModuleDir, networkVersionData: $networkVersionData, themeConf: $themeConf, appLocale: $appLocale, appConfBox: $appConfBox)';
}
}
/// @nodoc
abstract class _$$ThemeConfImplCopyWith<$Res>
implements $ThemeConfCopyWith<$Res> {
factory _$$ThemeConfImplCopyWith(
_$ThemeConfImpl value, $Res Function(_$ThemeConfImpl) then) =
__$$ThemeConfImplCopyWithImpl<$Res>;
abstract mixin class $AppGlobalStateCopyWith<$Res> {
factory $AppGlobalStateCopyWith(
AppGlobalState value, $Res Function(AppGlobalState) _then) =
_$AppGlobalStateCopyWithImpl;
@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
$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
$Res call({Color backgroundColor, Color menuColor, Color micaColor});
}
/// @nodoc
class __$$ThemeConfImplCopyWithImpl<$Res>
extends _$ThemeConfCopyWithImpl<$Res, _$ThemeConfImpl>
implements _$$ThemeConfImplCopyWith<$Res> {
__$$ThemeConfImplCopyWithImpl(
_$ThemeConfImpl _value, $Res Function(_$ThemeConfImpl) _then)
: super(_value, _then);
class _$ThemeConfCopyWithImpl<$Res> implements $ThemeConfCopyWith<$Res> {
_$ThemeConfCopyWithImpl(this._self, this._then);
final ThemeConf _self;
final $Res Function(ThemeConf) _then;
/// Create a copy of ThemeConf
/// with the given fields replaced by the non-null parameter values.
@ -385,17 +374,17 @@ class __$$ThemeConfImplCopyWithImpl<$Res>
Object? menuColor = null,
Object? micaColor = null,
}) {
return _then(_$ThemeConfImpl(
return _then(_self.copyWith(
backgroundColor: null == backgroundColor
? _value.backgroundColor
? _self.backgroundColor
: backgroundColor // ignore: cast_nullable_to_non_nullable
as Color,
menuColor: null == menuColor
? _value.menuColor
? _self.menuColor
: menuColor // ignore: cast_nullable_to_non_nullable
as Color,
micaColor: null == micaColor
? _value.micaColor
? _self.micaColor
: micaColor // ignore: cast_nullable_to_non_nullable
as Color,
));
@ -404,8 +393,8 @@ class __$$ThemeConfImplCopyWithImpl<$Res>
/// @nodoc
class _$ThemeConfImpl implements _ThemeConf {
const _$ThemeConfImpl(
class _ThemeConf implements ThemeConf {
const _ThemeConf(
{this.backgroundColor = const Color(0xbf132431),
this.menuColor = const Color(0xf2132431),
this.micaColor = const Color(0xff0a3142)});
@ -420,16 +409,19 @@ class _$ThemeConfImpl implements _ThemeConf {
@JsonKey()
final Color micaColor;
/// Create a copy of ThemeConf
/// with the given fields replaced by the non-null parameter values.
@override
String toString() {
return 'ThemeConf(backgroundColor: $backgroundColor, menuColor: $menuColor, micaColor: $micaColor)';
}
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$ThemeConfCopyWith<_ThemeConf> get copyWith =>
__$ThemeConfCopyWithImpl<_ThemeConf>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ThemeConfImpl &&
other is _ThemeConf &&
(identical(other.backgroundColor, backgroundColor) ||
other.backgroundColor == backgroundColor) &&
(identical(other.menuColor, menuColor) ||
@ -442,32 +434,54 @@ class _$ThemeConfImpl implements _ThemeConf {
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>
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
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ThemeConfImplCopyWith<_$ThemeConfImpl> get copyWith =>
__$$ThemeConfImplCopyWithImpl<_$ThemeConfImpl>(this, _$identity);
$Res call({
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 {
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;
}
// dart format on

View File

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

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
@ -9,107 +10,70 @@ part of 'multi_window_manager.dart';
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
MultiWindowAppState _$MultiWindowAppStateFromJson(Map<String, dynamic> json) {
return _MultiWindowAppState.fromJson(json);
}
/// @nodoc
mixin _$MultiWindowAppState {
String get backgroundColor => throw _privateConstructorUsedError;
String get menuColor => throw _privateConstructorUsedError;
String get micaColor => throw _privateConstructorUsedError;
List<String> get gameInstallPaths => throw _privateConstructorUsedError;
String? get languageCode => throw _privateConstructorUsedError;
String? get countryCode => throw _privateConstructorUsedError;
/// Serializes this MultiWindowAppState to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
String get backgroundColor;
String get menuColor;
String get micaColor;
List<String> get gameInstallPaths;
String? get languageCode;
String? get countryCode;
/// Create a copy of MultiWindowAppState
/// with the given fields replaced by the non-null parameter values.
@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')
$MultiWindowAppStateCopyWith<MultiWindowAppState> get copyWith =>
_$MultiWindowAppStateCopyWithImpl<MultiWindowAppState>(
this as MultiWindowAppState, _$identity);
/// Serializes this MultiWindowAppState to a JSON map.
Map<String, dynamic> toJson();
@override
$Res call({
Object? backgroundColor = null,
Object? menuColor = null,
Object? micaColor = null,
Object? gameInstallPaths = null,
Object? languageCode = freezed,
Object? countryCode = freezed,
}) {
return _then(_value.copyWith(
backgroundColor: null == backgroundColor
? _value.backgroundColor
: backgroundColor // ignore: cast_nullable_to_non_nullable
as String,
menuColor: null == menuColor
? _value.menuColor
: menuColor // ignore: cast_nullable_to_non_nullable
as String,
micaColor: null == micaColor
? _value.micaColor
: micaColor // ignore: cast_nullable_to_non_nullable
as String,
gameInstallPaths: null == gameInstallPaths
? _value.gameInstallPaths
: gameInstallPaths // ignore: cast_nullable_to_non_nullable
as List<String>,
languageCode: freezed == languageCode
? _value.languageCode
: languageCode // ignore: cast_nullable_to_non_nullable
as String?,
countryCode: freezed == countryCode
? _value.countryCode
: countryCode // ignore: cast_nullable_to_non_nullable
as String?,
) as $Val);
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is MultiWindowAppState &&
(identical(other.backgroundColor, backgroundColor) ||
other.backgroundColor == backgroundColor) &&
(identical(other.menuColor, menuColor) ||
other.menuColor == menuColor) &&
(identical(other.micaColor, micaColor) ||
other.micaColor == micaColor) &&
const DeepCollectionEquality()
.equals(other.gameInstallPaths, gameInstallPaths) &&
(identical(other.languageCode, languageCode) ||
other.languageCode == languageCode) &&
(identical(other.countryCode, countryCode) ||
other.countryCode == countryCode));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
backgroundColor,
menuColor,
micaColor,
const DeepCollectionEquality().hash(gameInstallPaths),
languageCode,
countryCode);
@override
String toString() {
return 'MultiWindowAppState(backgroundColor: $backgroundColor, menuColor: $menuColor, micaColor: $micaColor, gameInstallPaths: $gameInstallPaths, languageCode: $languageCode, countryCode: $countryCode)';
}
}
/// @nodoc
abstract class _$$MultiWindowAppStateImplCopyWith<$Res>
implements $MultiWindowAppStateCopyWith<$Res> {
factory _$$MultiWindowAppStateImplCopyWith(_$MultiWindowAppStateImpl value,
$Res Function(_$MultiWindowAppStateImpl) then) =
__$$MultiWindowAppStateImplCopyWithImpl<$Res>;
@override
abstract mixin class $MultiWindowAppStateCopyWith<$Res> {
factory $MultiWindowAppStateCopyWith(
MultiWindowAppState value, $Res Function(MultiWindowAppState) _then) =
_$MultiWindowAppStateCopyWithImpl;
@useResult
$Res call(
{String backgroundColor,
@ -121,12 +85,12 @@ abstract class _$$MultiWindowAppStateImplCopyWith<$Res>
}
/// @nodoc
class __$$MultiWindowAppStateImplCopyWithImpl<$Res>
extends _$MultiWindowAppStateCopyWithImpl<$Res, _$MultiWindowAppStateImpl>
implements _$$MultiWindowAppStateImplCopyWith<$Res> {
__$$MultiWindowAppStateImplCopyWithImpl(_$MultiWindowAppStateImpl _value,
$Res Function(_$MultiWindowAppStateImpl) _then)
: super(_value, _then);
class _$MultiWindowAppStateCopyWithImpl<$Res>
implements $MultiWindowAppStateCopyWith<$Res> {
_$MultiWindowAppStateCopyWithImpl(this._self, this._then);
final MultiWindowAppState _self;
final $Res Function(MultiWindowAppState) _then;
/// Create a copy of MultiWindowAppState
/// with the given fields replaced by the non-null parameter values.
@ -140,29 +104,29 @@ class __$$MultiWindowAppStateImplCopyWithImpl<$Res>
Object? languageCode = freezed,
Object? countryCode = freezed,
}) {
return _then(_$MultiWindowAppStateImpl(
return _then(_self.copyWith(
backgroundColor: null == backgroundColor
? _value.backgroundColor
? _self.backgroundColor
: backgroundColor // ignore: cast_nullable_to_non_nullable
as String,
menuColor: null == menuColor
? _value.menuColor
? _self.menuColor
: menuColor // ignore: cast_nullable_to_non_nullable
as String,
micaColor: null == micaColor
? _value.micaColor
? _self.micaColor
: micaColor // ignore: cast_nullable_to_non_nullable
as String,
gameInstallPaths: null == gameInstallPaths
? _value._gameInstallPaths
? _self.gameInstallPaths
: gameInstallPaths // ignore: cast_nullable_to_non_nullable
as List<String>,
languageCode: freezed == languageCode
? _value.languageCode
? _self.languageCode
: languageCode // ignore: cast_nullable_to_non_nullable
as String?,
countryCode: freezed == countryCode
? _value.countryCode
? _self.countryCode
: countryCode // ignore: cast_nullable_to_non_nullable
as String?,
));
@ -171,8 +135,8 @@ class __$$MultiWindowAppStateImplCopyWithImpl<$Res>
/// @nodoc
@JsonSerializable()
class _$MultiWindowAppStateImpl implements _MultiWindowAppState {
const _$MultiWindowAppStateImpl(
class _MultiWindowAppState implements MultiWindowAppState {
const _MultiWindowAppState(
{required this.backgroundColor,
required this.menuColor,
required this.micaColor,
@ -180,9 +144,8 @@ class _$MultiWindowAppStateImpl implements _MultiWindowAppState {
this.languageCode,
this.countryCode})
: _gameInstallPaths = gameInstallPaths;
factory _$MultiWindowAppStateImpl.fromJson(Map<String, dynamic> json) =>
_$$MultiWindowAppStateImplFromJson(json);
factory _MultiWindowAppState.fromJson(Map<String, dynamic> json) =>
_$MultiWindowAppStateFromJson(json);
@override
final String backgroundColor;
@ -204,16 +167,27 @@ class _$MultiWindowAppStateImpl implements _MultiWindowAppState {
@override
final String? countryCode;
/// Create a copy of MultiWindowAppState
/// with the given fields replaced by the non-null parameter values.
@override
String toString() {
return 'MultiWindowAppState(backgroundColor: $backgroundColor, menuColor: $menuColor, micaColor: $micaColor, gameInstallPaths: $gameInstallPaths, languageCode: $languageCode, countryCode: $countryCode)';
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$MultiWindowAppStateCopyWith<_MultiWindowAppState> get copyWith =>
__$MultiWindowAppStateCopyWithImpl<_MultiWindowAppState>(
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$MultiWindowAppStateToJson(
this,
);
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$MultiWindowAppStateImpl &&
other is _MultiWindowAppState &&
(identical(other.backgroundColor, backgroundColor) ||
other.backgroundColor == backgroundColor) &&
(identical(other.menuColor, menuColor) ||
@ -239,52 +213,76 @@ class _$MultiWindowAppStateImpl implements _MultiWindowAppState {
languageCode,
countryCode);
/// Create a copy of MultiWindowAppState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$MultiWindowAppStateImplCopyWith<_$MultiWindowAppStateImpl> get copyWith =>
__$$MultiWindowAppStateImplCopyWithImpl<_$MultiWindowAppStateImpl>(
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$MultiWindowAppStateImplToJson(
this,
);
String toString() {
return 'MultiWindowAppState(backgroundColor: $backgroundColor, menuColor: $menuColor, micaColor: $micaColor, gameInstallPaths: $gameInstallPaths, languageCode: $languageCode, countryCode: $countryCode)';
}
}
abstract class _MultiWindowAppState implements MultiWindowAppState {
const factory _MultiWindowAppState(
{required final String backgroundColor,
required final String menuColor,
required final String micaColor,
required final List<String> gameInstallPaths,
final String? languageCode,
final String? countryCode}) = _$MultiWindowAppStateImpl;
/// @nodoc
abstract mixin class _$MultiWindowAppStateCopyWith<$Res>
implements $MultiWindowAppStateCopyWith<$Res> {
factory _$MultiWindowAppStateCopyWith(_MultiWindowAppState value,
$Res Function(_MultiWindowAppState) _then) =
__$MultiWindowAppStateCopyWithImpl;
@override
@useResult
$Res call(
{String backgroundColor,
String menuColor,
String micaColor,
List<String> gameInstallPaths,
String? languageCode,
String? countryCode});
}
factory _MultiWindowAppState.fromJson(Map<String, dynamic> json) =
_$MultiWindowAppStateImpl.fromJson;
/// @nodoc
class __$MultiWindowAppStateCopyWithImpl<$Res>
implements _$MultiWindowAppStateCopyWith<$Res> {
__$MultiWindowAppStateCopyWithImpl(this._self, this._then);
@override
String get backgroundColor;
@override
String get menuColor;
@override
String get micaColor;
@override
List<String> get gameInstallPaths;
@override
String? get languageCode;
@override
String? get countryCode;
final _MultiWindowAppState _self;
final $Res Function(_MultiWindowAppState) _then;
/// Create a copy of MultiWindowAppState
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$MultiWindowAppStateImplCopyWith<_$MultiWindowAppStateImpl> get copyWith =>
throw _privateConstructorUsedError;
@pragma('vm:prefer-inline')
$Res call({
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
// **************************************************************************
_$MultiWindowAppStateImpl _$$MultiWindowAppStateImplFromJson(
Map<String, dynamic> json) =>
_$MultiWindowAppStateImpl(
_MultiWindowAppState _$MultiWindowAppStateFromJson(Map<String, dynamic> json) =>
_MultiWindowAppState(
backgroundColor: json['backgroundColor'] as String,
menuColor: json['menuColor'] as String,
micaColor: json['micaColor'] as String,
@ -19,8 +18,8 @@ _$MultiWindowAppStateImpl _$$MultiWindowAppStateImplFromJson(
countryCode: json['countryCode'] as String?,
);
Map<String, dynamic> _$$MultiWindowAppStateImplToJson(
_$MultiWindowAppStateImpl instance) =>
Map<String, dynamic> _$MultiWindowAppStateToJson(
_MultiWindowAppState instance) =>
<String, dynamic>{
'backgroundColor': instance.backgroundColor,
'menuColor': instance.menuColor,

View File

@ -5,7 +5,7 @@ part 'nav_api_data.freezed.dart';
part 'nav_api_data.g.dart';
@freezed
class NavApiDocsItemData with _$NavApiDocsItemData {
abstract class NavApiDocsItemData with _$NavApiDocsItemData {
const factory NavApiDocsItemData({
@Default('') @JsonKey(name: 'id') String id,
@Default('') @JsonKey(name: 'name') String name,
@ -31,7 +31,7 @@ class NavApiDocsItemData with _$NavApiDocsItemData {
}
@freezed
class NavApiDocsItemImageData with _$NavApiDocsItemImageData {
abstract class NavApiDocsItemImageData with _$NavApiDocsItemImageData {
const factory NavApiDocsItemImageData({
@Default('') @JsonKey(name: 'id') String id,
@Default(NavApiDocsItemImageCreatedByData())
@ -63,7 +63,7 @@ class NavApiDocsItemImageData with _$NavApiDocsItemImageData {
}
@freezed
class NavApiDocsItemImageCreatedByData with _$NavApiDocsItemImageCreatedByData {
abstract class NavApiDocsItemImageCreatedByData with _$NavApiDocsItemImageCreatedByData {
const factory NavApiDocsItemImageCreatedByData({
@Default('') @JsonKey(name: 'id') String id,
@Default('') @JsonKey(name: 'sub') String sub,
@ -87,7 +87,7 @@ class NavApiDocsItemImageCreatedByData with _$NavApiDocsItemImageCreatedByData {
}
@freezed
class NavApiDocsItemImageSizesThumbnailData
abstract class NavApiDocsItemImageSizesThumbnailData
with _$NavApiDocsItemImageSizesThumbnailData {
const factory NavApiDocsItemImageSizesThumbnailData({
@Default('') @JsonKey(name: 'url') String url,
@ -106,7 +106,7 @@ class NavApiDocsItemImageSizesThumbnailData
}
@freezed
class NavApiDocsItemImageSizesData with _$NavApiDocsItemImageSizesData {
abstract class NavApiDocsItemImageSizesData with _$NavApiDocsItemImageSizesData {
const factory NavApiDocsItemImageSizesData({
@Default(NavApiDocsItemImageSizesThumbnailData())
@JsonKey(name: 'thumbnail')
@ -132,7 +132,7 @@ class NavApiDocsItemImageSizesData with _$NavApiDocsItemImageSizesData {
}
@freezed
class NavApiDocsItemImageSizesPreloadData
abstract class NavApiDocsItemImageSizesPreloadData
with _$NavApiDocsItemImageSizesPreloadData {
const factory NavApiDocsItemImageSizesPreloadData({
@JsonKey(name: 'url') dynamic url,
@ -151,7 +151,7 @@ class NavApiDocsItemImageSizesPreloadData
}
@freezed
class NavApiDocsItemImageSizesCardData with _$NavApiDocsItemImageSizesCardData {
abstract class NavApiDocsItemImageSizesCardData with _$NavApiDocsItemImageSizesCardData {
const factory NavApiDocsItemImageSizesCardData({
@Default('') @JsonKey(name: 'url') String url,
@Default(0) @JsonKey(name: 'width') int width,
@ -169,7 +169,7 @@ class NavApiDocsItemImageSizesCardData with _$NavApiDocsItemImageSizesCardData {
}
@freezed
class NavApiDocsItemImageSizesTabletData
abstract class NavApiDocsItemImageSizesTabletData
with _$NavApiDocsItemImageSizesTabletData {
const factory NavApiDocsItemImageSizesTabletData({
@Default('') @JsonKey(name: 'url') String url,
@ -188,7 +188,7 @@ class NavApiDocsItemImageSizesTabletData
}
@freezed
class NavApiDocsItemImageSizesAvatarData
abstract class NavApiDocsItemImageSizesAvatarData
with _$NavApiDocsItemImageSizesAvatarData {
const factory NavApiDocsItemImageSizesAvatarData({
@Default('') @JsonKey(name: 'url') String url,
@ -207,7 +207,7 @@ class NavApiDocsItemImageSizesAvatarData
}
@freezed
class NavApiDocsItemTagsItemData with _$NavApiDocsItemTagsItemData {
abstract class NavApiDocsItemTagsItemData with _$NavApiDocsItemTagsItemData {
const factory NavApiDocsItemTagsItemData({
@Default('') @JsonKey(name: 'id') String id,
@Default('') @JsonKey(name: 'name') String name,
@ -223,7 +223,7 @@ class NavApiDocsItemTagsItemData with _$NavApiDocsItemTagsItemData {
}
@freezed
class NavApiData with _$NavApiData {
abstract class NavApiData with _$NavApiData {
const factory NavApiData({
@Default(<NavApiDocsItemData>[])
@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
// **************************************************************************
_$NavApiDocsItemDataImpl _$$NavApiDocsItemDataImplFromJson(
Map<String, dynamic> json) =>
_$NavApiDocsItemDataImpl(
_NavApiDocsItemData _$NavApiDocsItemDataFromJson(Map<String, dynamic> json) =>
_NavApiDocsItemData(
id: json['id'] as String? ?? '',
name: json['name'] as String? ?? '',
slug: json['slug'] as String? ?? '',
@ -29,8 +28,7 @@ _$NavApiDocsItemDataImpl _$$NavApiDocsItemDataImplFromJson(
createdAt: json['createdAt'] as String? ?? '',
);
Map<String, dynamic> _$$NavApiDocsItemDataImplToJson(
_$NavApiDocsItemDataImpl instance) =>
Map<String, dynamic> _$NavApiDocsItemDataToJson(_NavApiDocsItemData instance) =>
<String, dynamic>{
'id': instance.id,
'name': instance.name,
@ -45,9 +43,9 @@ Map<String, dynamic> _$$NavApiDocsItemDataImplToJson(
'createdAt': instance.createdAt,
};
_$NavApiDocsItemImageDataImpl _$$NavApiDocsItemImageDataImplFromJson(
_NavApiDocsItemImageData _$NavApiDocsItemImageDataFromJson(
Map<String, dynamic> json) =>
_$NavApiDocsItemImageDataImpl(
_NavApiDocsItemImageData(
id: json['id'] as String? ?? '',
createdBy: json['createdBy'] == null
? const NavApiDocsItemImageCreatedByData()
@ -73,8 +71,8 @@ _$NavApiDocsItemImageDataImpl _$$NavApiDocsItemImageDataImplFromJson(
json['sizes'] as Map<String, dynamic>),
);
Map<String, dynamic> _$$NavApiDocsItemImageDataImplToJson(
_$NavApiDocsItemImageDataImpl instance) =>
Map<String, dynamic> _$NavApiDocsItemImageDataToJson(
_NavApiDocsItemImageData instance) =>
<String, dynamic>{
'id': instance.id,
'createdBy': instance.createdBy,
@ -95,29 +93,27 @@ Map<String, dynamic> _$$NavApiDocsItemImageDataImplToJson(
'sizes': instance.sizes,
};
_$NavApiDocsItemImageCreatedByDataImpl
_$$NavApiDocsItemImageCreatedByDataImplFromJson(
Map<String, dynamic> json) =>
_$NavApiDocsItemImageCreatedByDataImpl(
id: json['id'] as String? ?? '',
sub: json['sub'] as String? ?? '',
externalProvider: json['external_provider'] as String? ?? '',
username: json['username'] as String? ?? '',
name: json['name'] as String? ?? '',
roles: (json['roles'] as List<dynamic>?)
?.map((e) => e as String)
.toList() ??
_NavApiDocsItemImageCreatedByData _$NavApiDocsItemImageCreatedByDataFromJson(
Map<String, dynamic> json) =>
_NavApiDocsItemImageCreatedByData(
id: json['id'] as String? ?? '',
sub: json['sub'] as String? ?? '',
externalProvider: json['external_provider'] as String? ?? '',
username: json['username'] as String? ?? '',
name: json['name'] as String? ?? '',
roles:
(json['roles'] as List<dynamic>?)?.map((e) => e as String).toList() ??
const <String>[],
avatarUrl: json['avatar_url'] as String? ?? '',
updatedAt: json['updatedAt'] as String? ?? '',
createdAt: json['createdAt'] as String? ?? '',
email: json['email'] as String? ?? '',
loginAttempts: (json['loginAttempts'] as num?)?.toInt() ?? 0,
avatar: json['avatar'] as String? ?? '',
);
avatarUrl: json['avatar_url'] as String? ?? '',
updatedAt: json['updatedAt'] as String? ?? '',
createdAt: json['createdAt'] as String? ?? '',
email: json['email'] as String? ?? '',
loginAttempts: (json['loginAttempts'] as num?)?.toInt() ?? 0,
avatar: json['avatar'] as String? ?? '',
);
Map<String, dynamic> _$$NavApiDocsItemImageCreatedByDataImplToJson(
_$NavApiDocsItemImageCreatedByDataImpl instance) =>
Map<String, dynamic> _$NavApiDocsItemImageCreatedByDataToJson(
_NavApiDocsItemImageCreatedByData instance) =>
<String, dynamic>{
'id': instance.id,
'sub': instance.sub,
@ -133,10 +129,10 @@ Map<String, dynamic> _$$NavApiDocsItemImageCreatedByDataImplToJson(
'avatar': instance.avatar,
};
_$NavApiDocsItemImageSizesThumbnailDataImpl
_$$NavApiDocsItemImageSizesThumbnailDataImplFromJson(
_NavApiDocsItemImageSizesThumbnailData
_$NavApiDocsItemImageSizesThumbnailDataFromJson(
Map<String, dynamic> json) =>
_$NavApiDocsItemImageSizesThumbnailDataImpl(
_NavApiDocsItemImageSizesThumbnailData(
url: json['url'] as String? ?? '',
width: (json['width'] as num?)?.toInt() ?? 0,
height: (json['height'] as num?)?.toInt() ?? 0,
@ -145,8 +141,8 @@ _$NavApiDocsItemImageSizesThumbnailDataImpl
filename: json['filename'] as String? ?? '',
);
Map<String, dynamic> _$$NavApiDocsItemImageSizesThumbnailDataImplToJson(
_$NavApiDocsItemImageSizesThumbnailDataImpl instance) =>
Map<String, dynamic> _$NavApiDocsItemImageSizesThumbnailDataToJson(
_NavApiDocsItemImageSizesThumbnailData instance) =>
<String, dynamic>{
'url': instance.url,
'width': instance.width,
@ -156,9 +152,9 @@ Map<String, dynamic> _$$NavApiDocsItemImageSizesThumbnailDataImplToJson(
'filename': instance.filename,
};
_$NavApiDocsItemImageSizesDataImpl _$$NavApiDocsItemImageSizesDataImplFromJson(
_NavApiDocsItemImageSizesData _$NavApiDocsItemImageSizesDataFromJson(
Map<String, dynamic> json) =>
_$NavApiDocsItemImageSizesDataImpl(
_NavApiDocsItemImageSizesData(
thumbnail: json['thumbnail'] == null
? const NavApiDocsItemImageSizesThumbnailData()
: NavApiDocsItemImageSizesThumbnailData.fromJson(
@ -181,8 +177,8 @@ _$NavApiDocsItemImageSizesDataImpl _$$NavApiDocsItemImageSizesDataImplFromJson(
json['avatar'] as Map<String, dynamic>),
);
Map<String, dynamic> _$$NavApiDocsItemImageSizesDataImplToJson(
_$NavApiDocsItemImageSizesDataImpl instance) =>
Map<String, dynamic> _$NavApiDocsItemImageSizesDataToJson(
_NavApiDocsItemImageSizesData instance) =>
<String, dynamic>{
'thumbnail': instance.thumbnail,
'preload': instance.preload,
@ -191,10 +187,9 @@ Map<String, dynamic> _$$NavApiDocsItemImageSizesDataImplToJson(
'avatar': instance.avatar,
};
_$NavApiDocsItemImageSizesPreloadDataImpl
_$$NavApiDocsItemImageSizesPreloadDataImplFromJson(
Map<String, dynamic> json) =>
_$NavApiDocsItemImageSizesPreloadDataImpl(
_NavApiDocsItemImageSizesPreloadData
_$NavApiDocsItemImageSizesPreloadDataFromJson(Map<String, dynamic> json) =>
_NavApiDocsItemImageSizesPreloadData(
url: json['url'],
width: json['width'],
height: json['height'],
@ -203,8 +198,8 @@ _$NavApiDocsItemImageSizesPreloadDataImpl
filename: json['filename'],
);
Map<String, dynamic> _$$NavApiDocsItemImageSizesPreloadDataImplToJson(
_$NavApiDocsItemImageSizesPreloadDataImpl instance) =>
Map<String, dynamic> _$NavApiDocsItemImageSizesPreloadDataToJson(
_NavApiDocsItemImageSizesPreloadData instance) =>
<String, dynamic>{
'url': instance.url,
'width': instance.width,
@ -214,78 +209,75 @@ Map<String, dynamic> _$$NavApiDocsItemImageSizesPreloadDataImplToJson(
'filename': instance.filename,
};
_$NavApiDocsItemImageSizesCardDataImpl
_$$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(
_NavApiDocsItemImageSizesCardData _$NavApiDocsItemImageSizesCardDataFromJson(
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? ?? '',
name: json['name'] as String? ?? '',
slug: json['slug'] as String? ?? '',
@ -293,8 +285,8 @@ _$NavApiDocsItemTagsItemDataImpl _$$NavApiDocsItemTagsItemDataImplFromJson(
createdAt: json['createdAt'] as String? ?? '',
);
Map<String, dynamic> _$$NavApiDocsItemTagsItemDataImplToJson(
_$NavApiDocsItemTagsItemDataImpl instance) =>
Map<String, dynamic> _$NavApiDocsItemTagsItemDataToJson(
_NavApiDocsItemTagsItemData instance) =>
<String, dynamic>{
'id': instance.id,
'name': instance.name,
@ -303,8 +295,7 @@ Map<String, dynamic> _$$NavApiDocsItemTagsItemDataImplToJson(
'createdAt': instance.createdAt,
};
_$NavApiDataImpl _$$NavApiDataImplFromJson(Map<String, dynamic> json) =>
_$NavApiDataImpl(
_NavApiData _$NavApiDataFromJson(Map<String, dynamic> json) => _NavApiData(
docs: (json['docs'] as List<dynamic>?)
?.map(
(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,
);
Map<String, dynamic> _$$NavApiDataImplToJson(_$NavApiDataImpl instance) =>
Map<String, dynamic> _$NavApiDataToJson(_NavApiData instance) =>
<String, dynamic>{
'docs': instance.docs,
'hasNextPage': instance.hasNextPage,

View File

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

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
@ -9,139 +10,25 @@ part of 'aria2c.dart';
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
/// @nodoc
mixin _$Aria2cModelState {
String get aria2cDir => throw _privateConstructorUsedError;
Aria2c? get aria2c => throw _privateConstructorUsedError;
Aria2GlobalStat? get aria2globalStat => throw _privateConstructorUsedError;
mixin _$Aria2cModelState implements DiagnosticableTreeMixin {
String get aria2cDir;
Aria2c? get aria2c;
Aria2GlobalStat? get aria2globalStat;
/// Create a copy of Aria2cModelState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$Aria2cModelStateCopyWith<Aria2cModelState> get copyWith =>
throw _privateConstructorUsedError;
}
/// @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)';
}
_$Aria2cModelStateCopyWithImpl<Aria2cModelState>(
this as Aria2cModelState, _$identity);
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
super.debugFillProperties(properties);
properties
..add(DiagnosticsProperty('type', 'Aria2cModelState'))
..add(DiagnosticsProperty('aria2cDir', aria2cDir))
@ -153,7 +40,7 @@ class _$Aria2cModelStateImpl
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$Aria2cModelStateImpl &&
other is Aria2cModelState &&
(identical(other.aria2cDir, aria2cDir) ||
other.aria2cDir == aria2cDir) &&
(identical(other.aria2c, aria2c) || other.aria2c == aria2c) &&
@ -165,33 +52,154 @@ class _$Aria2cModelStateImpl
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> {
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
/// 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)
@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
@pragma('vm:prefer-inline')
_$$Aria2cModelStateImplCopyWith<_$Aria2cModelStateImpl> get copyWith =>
__$$Aria2cModelStateImplCopyWithImpl<_$Aria2cModelStateImpl>(
this, _$identity);
$Res call({
Object? aria2cDir = null,
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 {
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;
}
// dart format on

View File

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

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
@ -9,109 +10,78 @@ part of 'unp4kc.dart';
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
/// @nodoc
mixin _$Unp4kcState {
bool get startUp => throw _privateConstructorUsedError;
Map<String, AppUnp4kP4kItemData>? get files =>
throw _privateConstructorUsedError;
MemoryFileSystem? get fs => throw _privateConstructorUsedError;
String get curPath => throw _privateConstructorUsedError;
String? get endMessage => throw _privateConstructorUsedError;
MapEntry<String, String>? get tempOpenFile =>
throw _privateConstructorUsedError;
String get errorMessage => throw _privateConstructorUsedError;
mixin _$Unp4kcState implements DiagnosticableTreeMixin {
bool get startUp;
Map<String, AppUnp4kP4kItemData>? get files;
MemoryFileSystem? get fs;
String get curPath;
String? get endMessage;
MapEntry<String, String>? get tempOpenFile;
String get errorMessage;
/// Create a copy of Unp4kcState
/// with the given fields replaced by the non-null parameter values.
@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')
$Unp4kcStateCopyWith<Unp4kcState> get copyWith =>
_$Unp4kcStateCopyWithImpl<Unp4kcState>(this as Unp4kcState, _$identity);
@override
$Res call({
Object? startUp = null,
Object? files = freezed,
Object? fs = freezed,
Object? curPath = null,
Object? endMessage = freezed,
Object? tempOpenFile = freezed,
Object? errorMessage = null,
}) {
return _then(_value.copyWith(
startUp: null == startUp
? _value.startUp
: startUp // ignore: cast_nullable_to_non_nullable
as bool,
files: freezed == files
? _value.files
: files // ignore: cast_nullable_to_non_nullable
as Map<String, AppUnp4kP4kItemData>?,
fs: freezed == fs
? _value.fs
: fs // ignore: cast_nullable_to_non_nullable
as MemoryFileSystem?,
curPath: null == curPath
? _value.curPath
: curPath // ignore: cast_nullable_to_non_nullable
as String,
endMessage: freezed == endMessage
? _value.endMessage
: endMessage // ignore: cast_nullable_to_non_nullable
as String?,
tempOpenFile: freezed == tempOpenFile
? _value.tempOpenFile
: tempOpenFile // ignore: cast_nullable_to_non_nullable
as MapEntry<String, String>?,
errorMessage: null == errorMessage
? _value.errorMessage
: errorMessage // ignore: cast_nullable_to_non_nullable
as String,
) as $Val);
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
properties
..add(DiagnosticsProperty('type', 'Unp4kcState'))
..add(DiagnosticsProperty('startUp', startUp))
..add(DiagnosticsProperty('files', files))
..add(DiagnosticsProperty('fs', fs))
..add(DiagnosticsProperty('curPath', curPath))
..add(DiagnosticsProperty('endMessage', endMessage))
..add(DiagnosticsProperty('tempOpenFile', tempOpenFile))
..add(DiagnosticsProperty('errorMessage', errorMessage));
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is Unp4kcState &&
(identical(other.startUp, startUp) || other.startUp == startUp) &&
const DeepCollectionEquality().equals(other.files, files) &&
(identical(other.fs, fs) || other.fs == fs) &&
(identical(other.curPath, curPath) || other.curPath == curPath) &&
(identical(other.endMessage, endMessage) ||
other.endMessage == endMessage) &&
(identical(other.tempOpenFile, tempOpenFile) ||
other.tempOpenFile == tempOpenFile) &&
(identical(other.errorMessage, errorMessage) ||
other.errorMessage == errorMessage));
}
@override
int get hashCode => Object.hash(
runtimeType,
startUp,
const DeepCollectionEquality().hash(files),
fs,
curPath,
endMessage,
tempOpenFile,
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 class _$$Unp4kcStateImplCopyWith<$Res>
implements $Unp4kcStateCopyWith<$Res> {
factory _$$Unp4kcStateImplCopyWith(
_$Unp4kcStateImpl value, $Res Function(_$Unp4kcStateImpl) then) =
__$$Unp4kcStateImplCopyWithImpl<$Res>;
@override
abstract mixin class $Unp4kcStateCopyWith<$Res> {
factory $Unp4kcStateCopyWith(
Unp4kcState value, $Res Function(Unp4kcState) _then) =
_$Unp4kcStateCopyWithImpl;
@useResult
$Res call(
{bool startUp,
@ -124,12 +94,11 @@ abstract class _$$Unp4kcStateImplCopyWith<$Res>
}
/// @nodoc
class __$$Unp4kcStateImplCopyWithImpl<$Res>
extends _$Unp4kcStateCopyWithImpl<$Res, _$Unp4kcStateImpl>
implements _$$Unp4kcStateImplCopyWith<$Res> {
__$$Unp4kcStateImplCopyWithImpl(
_$Unp4kcStateImpl _value, $Res Function(_$Unp4kcStateImpl) _then)
: super(_value, _then);
class _$Unp4kcStateCopyWithImpl<$Res> implements $Unp4kcStateCopyWith<$Res> {
_$Unp4kcStateCopyWithImpl(this._self, this._then);
final Unp4kcState _self;
final $Res Function(Unp4kcState) _then;
/// Create a copy of Unp4kcState
/// with the given fields replaced by the non-null parameter values.
@ -144,33 +113,33 @@ class __$$Unp4kcStateImplCopyWithImpl<$Res>
Object? tempOpenFile = freezed,
Object? errorMessage = null,
}) {
return _then(_$Unp4kcStateImpl(
return _then(_self.copyWith(
startUp: null == startUp
? _value.startUp
? _self.startUp
: startUp // ignore: cast_nullable_to_non_nullable
as bool,
files: freezed == files
? _value._files
? _self.files
: files // ignore: cast_nullable_to_non_nullable
as Map<String, AppUnp4kP4kItemData>?,
fs: freezed == fs
? _value.fs
? _self.fs
: fs // ignore: cast_nullable_to_non_nullable
as MemoryFileSystem?,
curPath: null == curPath
? _value.curPath
? _self.curPath
: curPath // ignore: cast_nullable_to_non_nullable
as String,
endMessage: freezed == endMessage
? _value.endMessage
? _self.endMessage
: endMessage // ignore: cast_nullable_to_non_nullable
as String?,
tempOpenFile: freezed == tempOpenFile
? _value.tempOpenFile
? _self.tempOpenFile
: tempOpenFile // ignore: cast_nullable_to_non_nullable
as MapEntry<String, String>?,
errorMessage: null == errorMessage
? _value.errorMessage
? _self.errorMessage
: errorMessage // ignore: cast_nullable_to_non_nullable
as String,
));
@ -179,8 +148,8 @@ class __$$Unp4kcStateImplCopyWithImpl<$Res>
/// @nodoc
class _$Unp4kcStateImpl with DiagnosticableTreeMixin implements _Unp4kcState {
const _$Unp4kcStateImpl(
class _Unp4kcState with DiagnosticableTreeMixin implements Unp4kcState {
const _Unp4kcState(
{required this.startUp,
final Map<String, AppUnp4kP4kItemData>? files,
this.fs,
@ -214,14 +183,16 @@ class _$Unp4kcStateImpl with DiagnosticableTreeMixin implements _Unp4kcState {
@JsonKey()
final String errorMessage;
/// Create a copy of Unp4kcState
/// with the given fields replaced by the non-null parameter values.
@override
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
return 'Unp4kcState(startUp: $startUp, files: $files, fs: $fs, curPath: $curPath, endMessage: $endMessage, tempOpenFile: $tempOpenFile, errorMessage: $errorMessage)';
}
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$Unp4kcStateCopyWith<_Unp4kcState> get copyWith =>
__$Unp4kcStateCopyWithImpl<_Unp4kcState>(this, _$identity);
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
super.debugFillProperties(properties);
properties
..add(DiagnosticsProperty('type', 'Unp4kcState'))
..add(DiagnosticsProperty('startUp', startUp))
@ -237,7 +208,7 @@ class _$Unp4kcStateImpl with DiagnosticableTreeMixin implements _Unp4kcState {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$Unp4kcStateImpl &&
other is _Unp4kcState &&
(identical(other.startUp, startUp) || other.startUp == startUp) &&
const DeepCollectionEquality().equals(other._files, _files) &&
(identical(other.fs, fs) || other.fs == fs) &&
@ -261,44 +232,81 @@ class _$Unp4kcStateImpl with DiagnosticableTreeMixin implements _Unp4kcState {
tempOpenFile,
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
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$Unp4kcStateImplCopyWith<_$Unp4kcStateImpl> get copyWith =>
__$$Unp4kcStateImplCopyWithImpl<_$Unp4kcStateImpl>(this, _$identity);
$Res call({
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 {
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;
}
// dart format on

View File

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

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
@ -9,121 +10,79 @@ part of 'home_game_login_dialog_ui_model.dart';
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
/// @nodoc
mixin _$HomeGameLoginState {
int get loginStatus => throw _privateConstructorUsedError;
String? get nickname => throw _privateConstructorUsedError;
String? get avatarUrl => throw _privateConstructorUsedError;
String? get authToken => throw _privateConstructorUsedError;
String? get webToken => throw _privateConstructorUsedError;
Map<dynamic, dynamic>? get releaseInfo => throw _privateConstructorUsedError;
RsiGameLibraryData? get libraryData => throw _privateConstructorUsedError;
String? get installPath => throw _privateConstructorUsedError;
bool? get isDeviceSupportWinHello => throw _privateConstructorUsedError;
int get loginStatus;
String? get nickname;
String? get avatarUrl;
String? get authToken;
String? get webToken;
Map? get releaseInfo;
RsiGameLibraryData? get libraryData;
String? get installPath;
bool? get isDeviceSupportWinHello;
/// Create a copy of HomeGameLoginState
/// with the given fields replaced by the non-null parameter values.
@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')
$HomeGameLoginStateCopyWith<HomeGameLoginState> get copyWith =>
_$HomeGameLoginStateCopyWithImpl<HomeGameLoginState>(
this as HomeGameLoginState, _$identity);
@override
$Res call({
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(_value.copyWith(
loginStatus: null == loginStatus
? _value.loginStatus
: loginStatus // ignore: cast_nullable_to_non_nullable
as int,
nickname: freezed == nickname
? _value.nickname
: nickname // ignore: cast_nullable_to_non_nullable
as String?,
avatarUrl: freezed == avatarUrl
? _value.avatarUrl
: avatarUrl // ignore: cast_nullable_to_non_nullable
as String?,
authToken: freezed == authToken
? _value.authToken
: authToken // ignore: cast_nullable_to_non_nullable
as String?,
webToken: freezed == webToken
? _value.webToken
: webToken // ignore: cast_nullable_to_non_nullable
as String?,
releaseInfo: freezed == releaseInfo
? _value.releaseInfo
: releaseInfo // ignore: cast_nullable_to_non_nullable
as Map<dynamic, dynamic>?,
libraryData: freezed == libraryData
? _value.libraryData
: libraryData // ignore: cast_nullable_to_non_nullable
as RsiGameLibraryData?,
installPath: freezed == installPath
? _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);
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is HomeGameLoginState &&
(identical(other.loginStatus, loginStatus) ||
other.loginStatus == loginStatus) &&
(identical(other.nickname, nickname) ||
other.nickname == nickname) &&
(identical(other.avatarUrl, avatarUrl) ||
other.avatarUrl == avatarUrl) &&
(identical(other.authToken, authToken) ||
other.authToken == authToken) &&
(identical(other.webToken, webToken) ||
other.webToken == webToken) &&
const DeepCollectionEquality()
.equals(other.releaseInfo, releaseInfo) &&
(identical(other.libraryData, libraryData) ||
other.libraryData == libraryData) &&
(identical(other.installPath, installPath) ||
other.installPath == installPath) &&
(identical(
other.isDeviceSupportWinHello, isDeviceSupportWinHello) ||
other.isDeviceSupportWinHello == isDeviceSupportWinHello));
}
@override
int get hashCode => Object.hash(
runtimeType,
loginStatus,
nickname,
avatarUrl,
authToken,
webToken,
const DeepCollectionEquality().hash(releaseInfo),
libraryData,
installPath,
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 class _$$LoginStatusImplCopyWith<$Res>
implements $HomeGameLoginStateCopyWith<$Res> {
factory _$$LoginStatusImplCopyWith(
_$LoginStatusImpl value, $Res Function(_$LoginStatusImpl) then) =
__$$LoginStatusImplCopyWithImpl<$Res>;
@override
abstract mixin class $HomeGameLoginStateCopyWith<$Res> {
factory $HomeGameLoginStateCopyWith(
HomeGameLoginState value, $Res Function(HomeGameLoginState) _then) =
_$HomeGameLoginStateCopyWithImpl;
@useResult
$Res call(
{int loginStatus,
@ -131,19 +90,19 @@ abstract class _$$LoginStatusImplCopyWith<$Res>
String? avatarUrl,
String? authToken,
String? webToken,
Map<dynamic, dynamic>? releaseInfo,
Map? releaseInfo,
RsiGameLibraryData? libraryData,
String? installPath,
bool? isDeviceSupportWinHello});
}
/// @nodoc
class __$$LoginStatusImplCopyWithImpl<$Res>
extends _$HomeGameLoginStateCopyWithImpl<$Res, _$LoginStatusImpl>
implements _$$LoginStatusImplCopyWith<$Res> {
__$$LoginStatusImplCopyWithImpl(
_$LoginStatusImpl _value, $Res Function(_$LoginStatusImpl) _then)
: super(_value, _then);
class _$HomeGameLoginStateCopyWithImpl<$Res>
implements $HomeGameLoginStateCopyWith<$Res> {
_$HomeGameLoginStateCopyWithImpl(this._self, this._then);
final HomeGameLoginState _self;
final $Res Function(HomeGameLoginState) _then;
/// Create a copy of HomeGameLoginState
/// with the given fields replaced by the non-null parameter values.
@ -160,41 +119,41 @@ class __$$LoginStatusImplCopyWithImpl<$Res>
Object? installPath = freezed,
Object? isDeviceSupportWinHello = freezed,
}) {
return _then(_$LoginStatusImpl(
return _then(_self.copyWith(
loginStatus: null == loginStatus
? _value.loginStatus
? _self.loginStatus
: loginStatus // ignore: cast_nullable_to_non_nullable
as int,
nickname: freezed == nickname
? _value.nickname
? _self.nickname
: nickname // ignore: cast_nullable_to_non_nullable
as String?,
avatarUrl: freezed == avatarUrl
? _value.avatarUrl
? _self.avatarUrl
: avatarUrl // ignore: cast_nullable_to_non_nullable
as String?,
authToken: freezed == authToken
? _value.authToken
? _self.authToken
: authToken // ignore: cast_nullable_to_non_nullable
as String?,
webToken: freezed == webToken
? _value.webToken
? _self.webToken
: webToken // ignore: cast_nullable_to_non_nullable
as String?,
releaseInfo: freezed == releaseInfo
? _value._releaseInfo
? _self.releaseInfo
: releaseInfo // ignore: cast_nullable_to_non_nullable
as Map<dynamic, dynamic>?,
as Map?,
libraryData: freezed == libraryData
? _value.libraryData
? _self.libraryData
: libraryData // ignore: cast_nullable_to_non_nullable
as RsiGameLibraryData?,
installPath: freezed == installPath
? _value.installPath
? _self.installPath
: installPath // ignore: cast_nullable_to_non_nullable
as String?,
isDeviceSupportWinHello: freezed == isDeviceSupportWinHello
? _value.isDeviceSupportWinHello
? _self.isDeviceSupportWinHello
: isDeviceSupportWinHello // ignore: cast_nullable_to_non_nullable
as bool?,
));
@ -203,14 +162,14 @@ class __$$LoginStatusImplCopyWithImpl<$Res>
/// @nodoc
class _$LoginStatusImpl implements _LoginStatus {
_$LoginStatusImpl(
class _LoginStatus implements HomeGameLoginState {
_LoginStatus(
{required this.loginStatus,
this.nickname,
this.avatarUrl,
this.authToken,
this.webToken,
final Map<dynamic, dynamic>? releaseInfo,
final Map? releaseInfo,
this.libraryData,
this.installPath,
this.isDeviceSupportWinHello})
@ -226,9 +185,9 @@ class _$LoginStatusImpl implements _LoginStatus {
final String? authToken;
@override
final String? webToken;
final Map<dynamic, dynamic>? _releaseInfo;
final Map? _releaseInfo;
@override
Map<dynamic, dynamic>? get releaseInfo {
Map? get releaseInfo {
final value = _releaseInfo;
if (value == null) return null;
if (_releaseInfo is EqualUnmodifiableMapView) return _releaseInfo;
@ -243,16 +202,19 @@ class _$LoginStatusImpl implements _LoginStatus {
@override
final bool? isDeviceSupportWinHello;
/// Create a copy of HomeGameLoginState
/// with the given fields replaced by the non-null parameter values.
@override
String toString() {
return 'HomeGameLoginState(loginStatus: $loginStatus, nickname: $nickname, avatarUrl: $avatarUrl, authToken: $authToken, webToken: $webToken, releaseInfo: $releaseInfo, libraryData: $libraryData, installPath: $installPath, isDeviceSupportWinHello: $isDeviceSupportWinHello)';
}
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$LoginStatusCopyWith<_LoginStatus> get copyWith =>
__$LoginStatusCopyWithImpl<_LoginStatus>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$LoginStatusImpl &&
other is _LoginStatus &&
(identical(other.loginStatus, loginStatus) ||
other.loginStatus == loginStatus) &&
(identical(other.nickname, nickname) ||
@ -287,50 +249,93 @@ class _$LoginStatusImpl implements _LoginStatus {
installPath,
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
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$LoginStatusImplCopyWith<_$LoginStatusImpl> get copyWith =>
__$$LoginStatusImplCopyWithImpl<_$LoginStatusImpl>(this, _$identity);
$Res call({
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 {
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;
}
// dart format on

View File

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

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
@ -9,88 +10,57 @@ part of 'home_downloader_ui_model.dart';
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
/// @nodoc
mixin _$HomeDownloaderUIState {
List<Aria2Task> get tasks => throw _privateConstructorUsedError;
List<Aria2Task> get waitingTasks => throw _privateConstructorUsedError;
List<Aria2Task> get stoppedTasks => throw _privateConstructorUsedError;
Aria2GlobalStat? get globalStat => throw _privateConstructorUsedError;
List<Aria2Task> get tasks;
List<Aria2Task> get waitingTasks;
List<Aria2Task> get stoppedTasks;
Aria2GlobalStat? get globalStat;
/// Create a copy of HomeDownloaderUIState
/// with the given fields replaced by the non-null parameter values.
@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')
$HomeDownloaderUIStateCopyWith<HomeDownloaderUIState> get copyWith =>
_$HomeDownloaderUIStateCopyWithImpl<HomeDownloaderUIState>(
this as HomeDownloaderUIState, _$identity);
@override
$Res call({
Object? tasks = null,
Object? waitingTasks = null,
Object? stoppedTasks = null,
Object? globalStat = freezed,
}) {
return _then(_value.copyWith(
tasks: null == tasks
? _value.tasks
: tasks // ignore: cast_nullable_to_non_nullable
as List<Aria2Task>,
waitingTasks: null == waitingTasks
? _value.waitingTasks
: waitingTasks // ignore: cast_nullable_to_non_nullable
as List<Aria2Task>,
stoppedTasks: null == stoppedTasks
? _value.stoppedTasks
: stoppedTasks // ignore: cast_nullable_to_non_nullable
as List<Aria2Task>,
globalStat: freezed == globalStat
? _value.globalStat
: globalStat // ignore: cast_nullable_to_non_nullable
as Aria2GlobalStat?,
) as $Val);
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is HomeDownloaderUIState &&
const DeepCollectionEquality().equals(other.tasks, tasks) &&
const DeepCollectionEquality()
.equals(other.waitingTasks, waitingTasks) &&
const DeepCollectionEquality()
.equals(other.stoppedTasks, stoppedTasks) &&
(identical(other.globalStat, globalStat) ||
other.globalStat == globalStat));
}
@override
int get hashCode => Object.hash(
runtimeType,
const DeepCollectionEquality().hash(tasks),
const DeepCollectionEquality().hash(waitingTasks),
const DeepCollectionEquality().hash(stoppedTasks),
globalStat);
@override
String toString() {
return 'HomeDownloaderUIState(tasks: $tasks, waitingTasks: $waitingTasks, stoppedTasks: $stoppedTasks, globalStat: $globalStat)';
}
}
/// @nodoc
abstract class _$$HomeDownloaderUIStateImplCopyWith<$Res>
implements $HomeDownloaderUIStateCopyWith<$Res> {
factory _$$HomeDownloaderUIStateImplCopyWith(
_$HomeDownloaderUIStateImpl value,
$Res Function(_$HomeDownloaderUIStateImpl) then) =
__$$HomeDownloaderUIStateImplCopyWithImpl<$Res>;
@override
abstract mixin class $HomeDownloaderUIStateCopyWith<$Res> {
factory $HomeDownloaderUIStateCopyWith(HomeDownloaderUIState value,
$Res Function(HomeDownloaderUIState) _then) =
_$HomeDownloaderUIStateCopyWithImpl;
@useResult
$Res call(
{List<Aria2Task> tasks,
@ -100,13 +70,12 @@ abstract class _$$HomeDownloaderUIStateImplCopyWith<$Res>
}
/// @nodoc
class __$$HomeDownloaderUIStateImplCopyWithImpl<$Res>
extends _$HomeDownloaderUIStateCopyWithImpl<$Res,
_$HomeDownloaderUIStateImpl>
implements _$$HomeDownloaderUIStateImplCopyWith<$Res> {
__$$HomeDownloaderUIStateImplCopyWithImpl(_$HomeDownloaderUIStateImpl _value,
$Res Function(_$HomeDownloaderUIStateImpl) _then)
: super(_value, _then);
class _$HomeDownloaderUIStateCopyWithImpl<$Res>
implements $HomeDownloaderUIStateCopyWith<$Res> {
_$HomeDownloaderUIStateCopyWithImpl(this._self, this._then);
final HomeDownloaderUIState _self;
final $Res Function(HomeDownloaderUIState) _then;
/// Create a copy of HomeDownloaderUIState
/// with the given fields replaced by the non-null parameter values.
@ -118,21 +87,21 @@ class __$$HomeDownloaderUIStateImplCopyWithImpl<$Res>
Object? stoppedTasks = null,
Object? globalStat = freezed,
}) {
return _then(_$HomeDownloaderUIStateImpl(
return _then(_self.copyWith(
tasks: null == tasks
? _value._tasks
? _self.tasks
: tasks // ignore: cast_nullable_to_non_nullable
as List<Aria2Task>,
waitingTasks: null == waitingTasks
? _value._waitingTasks
? _self.waitingTasks
: waitingTasks // ignore: cast_nullable_to_non_nullable
as List<Aria2Task>,
stoppedTasks: null == stoppedTasks
? _value._stoppedTasks
? _self.stoppedTasks
: stoppedTasks // ignore: cast_nullable_to_non_nullable
as List<Aria2Task>,
globalStat: freezed == globalStat
? _value.globalStat
? _self.globalStat
: globalStat // ignore: cast_nullable_to_non_nullable
as Aria2GlobalStat?,
));
@ -141,8 +110,8 @@ class __$$HomeDownloaderUIStateImplCopyWithImpl<$Res>
/// @nodoc
class _$HomeDownloaderUIStateImpl implements _HomeDownloaderUIState {
_$HomeDownloaderUIStateImpl(
class _HomeDownloaderUIState implements HomeDownloaderUIState {
_HomeDownloaderUIState(
{final List<Aria2Task> tasks = const [],
final List<Aria2Task> waitingTasks = const [],
final List<Aria2Task> stoppedTasks = const [],
@ -181,16 +150,20 @@ class _$HomeDownloaderUIStateImpl implements _HomeDownloaderUIState {
@override
final Aria2GlobalStat? globalStat;
/// Create a copy of HomeDownloaderUIState
/// with the given fields replaced by the non-null parameter values.
@override
String toString() {
return 'HomeDownloaderUIState(tasks: $tasks, waitingTasks: $waitingTasks, stoppedTasks: $stoppedTasks, globalStat: $globalStat)';
}
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$HomeDownloaderUIStateCopyWith<_HomeDownloaderUIState> get copyWith =>
__$HomeDownloaderUIStateCopyWithImpl<_HomeDownloaderUIState>(
this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$HomeDownloaderUIStateImpl &&
other is _HomeDownloaderUIState &&
const DeepCollectionEquality().equals(other._tasks, _tasks) &&
const DeepCollectionEquality()
.equals(other._waitingTasks, _waitingTasks) &&
@ -208,36 +181,64 @@ class _$HomeDownloaderUIStateImpl implements _HomeDownloaderUIState {
const DeepCollectionEquality().hash(_stoppedTasks),
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
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$HomeDownloaderUIStateImplCopyWith<_$HomeDownloaderUIStateImpl>
get copyWith => __$$HomeDownloaderUIStateImplCopyWithImpl<
_$HomeDownloaderUIStateImpl>(this, _$identity);
$Res call({
Object? tasks = null,
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 {
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;
}
// dart format on

View File

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

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
@ -9,94 +10,62 @@ part of 'game_doctor_ui_model.dart';
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
/// @nodoc
mixin _$HomeGameDoctorState {
bool get isChecking => throw _privateConstructorUsedError;
bool get isFixing => throw _privateConstructorUsedError;
String get lastScreenInfo => throw _privateConstructorUsedError;
String get isFixingString => throw _privateConstructorUsedError;
List<MapEntry<String, String>>? get checkResult =>
throw _privateConstructorUsedError;
bool get isChecking;
bool get isFixing;
String get lastScreenInfo;
String get isFixingString;
List<MapEntry<String, String>>? get checkResult;
/// Create a copy of HomeGameDoctorState
/// with the given fields replaced by the non-null parameter values.
@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')
$HomeGameDoctorStateCopyWith<HomeGameDoctorState> get copyWith =>
_$HomeGameDoctorStateCopyWithImpl<HomeGameDoctorState>(
this as HomeGameDoctorState, _$identity);
@override
$Res call({
Object? isChecking = null,
Object? isFixing = null,
Object? lastScreenInfo = null,
Object? isFixingString = null,
Object? checkResult = freezed,
}) {
return _then(_value.copyWith(
isChecking: null == isChecking
? _value.isChecking
: isChecking // ignore: cast_nullable_to_non_nullable
as bool,
isFixing: null == isFixing
? _value.isFixing
: isFixing // ignore: cast_nullable_to_non_nullable
as bool,
lastScreenInfo: null == lastScreenInfo
? _value.lastScreenInfo
: lastScreenInfo // ignore: cast_nullable_to_non_nullable
as String,
isFixingString: null == isFixingString
? _value.isFixingString
: isFixingString // ignore: cast_nullable_to_non_nullable
as String,
checkResult: freezed == checkResult
? _value.checkResult
: checkResult // ignore: cast_nullable_to_non_nullable
as List<MapEntry<String, String>>?,
) as $Val);
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is HomeGameDoctorState &&
(identical(other.isChecking, isChecking) ||
other.isChecking == isChecking) &&
(identical(other.isFixing, isFixing) ||
other.isFixing == isFixing) &&
(identical(other.lastScreenInfo, lastScreenInfo) ||
other.lastScreenInfo == lastScreenInfo) &&
(identical(other.isFixingString, isFixingString) ||
other.isFixingString == isFixingString) &&
const DeepCollectionEquality()
.equals(other.checkResult, checkResult));
}
@override
int get hashCode => Object.hash(
runtimeType,
isChecking,
isFixing,
lastScreenInfo,
isFixingString,
const DeepCollectionEquality().hash(checkResult));
@override
String toString() {
return 'HomeGameDoctorState(isChecking: $isChecking, isFixing: $isFixing, lastScreenInfo: $lastScreenInfo, isFixingString: $isFixingString, checkResult: $checkResult)';
}
}
/// @nodoc
abstract class _$$HomeGameDoctorStateImplCopyWith<$Res>
implements $HomeGameDoctorStateCopyWith<$Res> {
factory _$$HomeGameDoctorStateImplCopyWith(_$HomeGameDoctorStateImpl value,
$Res Function(_$HomeGameDoctorStateImpl) then) =
__$$HomeGameDoctorStateImplCopyWithImpl<$Res>;
@override
abstract mixin class $HomeGameDoctorStateCopyWith<$Res> {
factory $HomeGameDoctorStateCopyWith(
HomeGameDoctorState value, $Res Function(HomeGameDoctorState) _then) =
_$HomeGameDoctorStateCopyWithImpl;
@useResult
$Res call(
{bool isChecking,
@ -107,12 +76,12 @@ abstract class _$$HomeGameDoctorStateImplCopyWith<$Res>
}
/// @nodoc
class __$$HomeGameDoctorStateImplCopyWithImpl<$Res>
extends _$HomeGameDoctorStateCopyWithImpl<$Res, _$HomeGameDoctorStateImpl>
implements _$$HomeGameDoctorStateImplCopyWith<$Res> {
__$$HomeGameDoctorStateImplCopyWithImpl(_$HomeGameDoctorStateImpl _value,
$Res Function(_$HomeGameDoctorStateImpl) _then)
: super(_value, _then);
class _$HomeGameDoctorStateCopyWithImpl<$Res>
implements $HomeGameDoctorStateCopyWith<$Res> {
_$HomeGameDoctorStateCopyWithImpl(this._self, this._then);
final HomeGameDoctorState _self;
final $Res Function(HomeGameDoctorState) _then;
/// Create a copy of HomeGameDoctorState
/// with the given fields replaced by the non-null parameter values.
@ -125,25 +94,25 @@ class __$$HomeGameDoctorStateImplCopyWithImpl<$Res>
Object? isFixingString = null,
Object? checkResult = freezed,
}) {
return _then(_$HomeGameDoctorStateImpl(
return _then(_self.copyWith(
isChecking: null == isChecking
? _value.isChecking
? _self.isChecking
: isChecking // ignore: cast_nullable_to_non_nullable
as bool,
isFixing: null == isFixing
? _value.isFixing
? _self.isFixing
: isFixing // ignore: cast_nullable_to_non_nullable
as bool,
lastScreenInfo: null == lastScreenInfo
? _value.lastScreenInfo
? _self.lastScreenInfo
: lastScreenInfo // ignore: cast_nullable_to_non_nullable
as String,
isFixingString: null == isFixingString
? _value.isFixingString
? _self.isFixingString
: isFixingString // ignore: cast_nullable_to_non_nullable
as String,
checkResult: freezed == checkResult
? _value._checkResult
? _self.checkResult
: checkResult // ignore: cast_nullable_to_non_nullable
as List<MapEntry<String, String>>?,
));
@ -152,8 +121,8 @@ class __$$HomeGameDoctorStateImplCopyWithImpl<$Res>
/// @nodoc
class _$HomeGameDoctorStateImpl implements _HomeGameDoctorState {
_$HomeGameDoctorStateImpl(
class _HomeGameDoctorState implements HomeGameDoctorState {
_HomeGameDoctorState(
{this.isChecking = false,
this.isFixing = false,
this.lastScreenInfo = "",
@ -183,16 +152,20 @@ class _$HomeGameDoctorStateImpl implements _HomeGameDoctorState {
return EqualUnmodifiableListView(value);
}
/// Create a copy of HomeGameDoctorState
/// with the given fields replaced by the non-null parameter values.
@override
String toString() {
return 'HomeGameDoctorState(isChecking: $isChecking, isFixing: $isFixing, lastScreenInfo: $lastScreenInfo, isFixingString: $isFixingString, checkResult: $checkResult)';
}
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$HomeGameDoctorStateCopyWith<_HomeGameDoctorState> get copyWith =>
__$HomeGameDoctorStateCopyWithImpl<_HomeGameDoctorState>(
this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$HomeGameDoctorStateImpl &&
other is _HomeGameDoctorState &&
(identical(other.isChecking, isChecking) ||
other.isChecking == isChecking) &&
(identical(other.isFixing, isFixing) ||
@ -214,40 +187,70 @@ class _$HomeGameDoctorStateImpl implements _HomeGameDoctorState {
isFixingString,
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
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$HomeGameDoctorStateImplCopyWith<_$HomeGameDoctorStateImpl> get copyWith =>
__$$HomeGameDoctorStateImplCopyWithImpl<_$HomeGameDoctorStateImpl>(
this, _$identity);
$Res call({
Object? isChecking = null,
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 {
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;
}
// dart format on

View File

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

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
@ -9,152 +10,96 @@ part of 'home_ui_model.dart';
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
/// @nodoc
mixin _$HomeUIModelState {
AppPlacardData? get appPlacardData => throw _privateConstructorUsedError;
bool get isFixing => throw _privateConstructorUsedError;
String get isFixingString => throw _privateConstructorUsedError;
String? get scInstalledPath => throw _privateConstructorUsedError;
List<String> get scInstallPaths => throw _privateConstructorUsedError;
AppWebLocalizationVersionsData? get webLocalizationVersionsData =>
throw _privateConstructorUsedError;
String get lastScreenInfo => throw _privateConstructorUsedError;
List<RssItem>? get rssVideoItems => throw _privateConstructorUsedError;
List<RssItem>? get rssTextItems => throw _privateConstructorUsedError;
MapEntry<String, bool>? get localizationUpdateInfo =>
throw _privateConstructorUsedError;
List<dynamic>? get scServerStatus => throw _privateConstructorUsedError;
List<CountdownFestivalItemData>? get countdownFestivalListData =>
throw _privateConstructorUsedError;
Map<String, bool> get isGameRunning => throw _privateConstructorUsedError;
AppPlacardData? get appPlacardData;
bool get isFixing;
String get isFixingString;
String? get scInstalledPath;
List<String> get scInstallPaths;
AppWebLocalizationVersionsData? get webLocalizationVersionsData;
String get lastScreenInfo;
List<RssItem>? get rssVideoItems;
List<RssItem>? get rssTextItems;
MapEntry<String, bool>? get localizationUpdateInfo;
List? get scServerStatus;
List<CountdownFestivalItemData>? get countdownFestivalListData;
Map<String, bool> get isGameRunning;
/// Create a copy of HomeUIModelState
/// with the given fields replaced by the non-null parameter values.
@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')
$HomeUIModelStateCopyWith<HomeUIModelState> get copyWith =>
_$HomeUIModelStateCopyWithImpl<HomeUIModelState>(
this as HomeUIModelState, _$identity);
@override
$Res call({
Object? appPlacardData = freezed,
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(_value.copyWith(
appPlacardData: freezed == appPlacardData
? _value.appPlacardData
: appPlacardData // ignore: cast_nullable_to_non_nullable
as AppPlacardData?,
isFixing: null == isFixing
? _value.isFixing
: isFixing // ignore: cast_nullable_to_non_nullable
as bool,
isFixingString: null == isFixingString
? _value.isFixingString
: isFixingString // ignore: cast_nullable_to_non_nullable
as String,
scInstalledPath: freezed == scInstalledPath
? _value.scInstalledPath
: scInstalledPath // ignore: cast_nullable_to_non_nullable
as String?,
scInstallPaths: null == scInstallPaths
? _value.scInstallPaths
: scInstallPaths // ignore: cast_nullable_to_non_nullable
as List<String>,
webLocalizationVersionsData: freezed == webLocalizationVersionsData
? _value.webLocalizationVersionsData
: webLocalizationVersionsData // ignore: cast_nullable_to_non_nullable
as AppWebLocalizationVersionsData?,
lastScreenInfo: null == lastScreenInfo
? _value.lastScreenInfo
: lastScreenInfo // ignore: cast_nullable_to_non_nullable
as String,
rssVideoItems: freezed == rssVideoItems
? _value.rssVideoItems
: rssVideoItems // ignore: cast_nullable_to_non_nullable
as List<RssItem>?,
rssTextItems: freezed == rssTextItems
? _value.rssTextItems
: rssTextItems // ignore: cast_nullable_to_non_nullable
as List<RssItem>?,
localizationUpdateInfo: freezed == localizationUpdateInfo
? _value.localizationUpdateInfo
: 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);
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is HomeUIModelState &&
(identical(other.appPlacardData, appPlacardData) ||
other.appPlacardData == appPlacardData) &&
(identical(other.isFixing, isFixing) ||
other.isFixing == isFixing) &&
(identical(other.isFixingString, isFixingString) ||
other.isFixingString == isFixingString) &&
(identical(other.scInstalledPath, scInstalledPath) ||
other.scInstalledPath == scInstalledPath) &&
const DeepCollectionEquality()
.equals(other.scInstallPaths, scInstallPaths) &&
(identical(other.webLocalizationVersionsData,
webLocalizationVersionsData) ||
other.webLocalizationVersionsData ==
webLocalizationVersionsData) &&
(identical(other.lastScreenInfo, lastScreenInfo) ||
other.lastScreenInfo == lastScreenInfo) &&
const DeepCollectionEquality()
.equals(other.rssVideoItems, rssVideoItems) &&
const DeepCollectionEquality()
.equals(other.rssTextItems, rssTextItems) &&
(identical(other.localizationUpdateInfo, localizationUpdateInfo) ||
other.localizationUpdateInfo == localizationUpdateInfo) &&
const DeepCollectionEquality()
.equals(other.scServerStatus, scServerStatus) &&
const DeepCollectionEquality().equals(
other.countdownFestivalListData, countdownFestivalListData) &&
const DeepCollectionEquality()
.equals(other.isGameRunning, isGameRunning));
}
@override
int get hashCode => Object.hash(
runtimeType,
appPlacardData,
isFixing,
isFixingString,
scInstalledPath,
const DeepCollectionEquality().hash(scInstallPaths),
webLocalizationVersionsData,
lastScreenInfo,
const DeepCollectionEquality().hash(rssVideoItems),
const DeepCollectionEquality().hash(rssTextItems),
localizationUpdateInfo,
const DeepCollectionEquality().hash(scServerStatus),
const DeepCollectionEquality().hash(countdownFestivalListData),
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 class _$$HomeUIModelStateImplCopyWith<$Res>
implements $HomeUIModelStateCopyWith<$Res> {
factory _$$HomeUIModelStateImplCopyWith(_$HomeUIModelStateImpl value,
$Res Function(_$HomeUIModelStateImpl) then) =
__$$HomeUIModelStateImplCopyWithImpl<$Res>;
@override
abstract mixin class $HomeUIModelStateCopyWith<$Res> {
factory $HomeUIModelStateCopyWith(
HomeUIModelState value, $Res Function(HomeUIModelState) _then) =
_$HomeUIModelStateCopyWithImpl;
@useResult
$Res call(
{AppPlacardData? appPlacardData,
@ -167,18 +112,18 @@ abstract class _$$HomeUIModelStateImplCopyWith<$Res>
List<RssItem>? rssVideoItems,
List<RssItem>? rssTextItems,
MapEntry<String, bool>? localizationUpdateInfo,
List<dynamic>? scServerStatus,
List? scServerStatus,
List<CountdownFestivalItemData>? countdownFestivalListData,
Map<String, bool> isGameRunning});
}
/// @nodoc
class __$$HomeUIModelStateImplCopyWithImpl<$Res>
extends _$HomeUIModelStateCopyWithImpl<$Res, _$HomeUIModelStateImpl>
implements _$$HomeUIModelStateImplCopyWith<$Res> {
__$$HomeUIModelStateImplCopyWithImpl(_$HomeUIModelStateImpl _value,
$Res Function(_$HomeUIModelStateImpl) _then)
: super(_value, _then);
class _$HomeUIModelStateCopyWithImpl<$Res>
implements $HomeUIModelStateCopyWith<$Res> {
_$HomeUIModelStateCopyWithImpl(this._self, this._then);
final HomeUIModelState _self;
final $Res Function(HomeUIModelState) _then;
/// Create a copy of HomeUIModelState
/// with the given fields replaced by the non-null parameter values.
@ -199,57 +144,57 @@ class __$$HomeUIModelStateImplCopyWithImpl<$Res>
Object? countdownFestivalListData = freezed,
Object? isGameRunning = null,
}) {
return _then(_$HomeUIModelStateImpl(
return _then(_self.copyWith(
appPlacardData: freezed == appPlacardData
? _value.appPlacardData
? _self.appPlacardData
: appPlacardData // ignore: cast_nullable_to_non_nullable
as AppPlacardData?,
isFixing: null == isFixing
? _value.isFixing
? _self.isFixing
: isFixing // ignore: cast_nullable_to_non_nullable
as bool,
isFixingString: null == isFixingString
? _value.isFixingString
? _self.isFixingString
: isFixingString // ignore: cast_nullable_to_non_nullable
as String,
scInstalledPath: freezed == scInstalledPath
? _value.scInstalledPath
? _self.scInstalledPath
: scInstalledPath // ignore: cast_nullable_to_non_nullable
as String?,
scInstallPaths: null == scInstallPaths
? _value._scInstallPaths
? _self.scInstallPaths
: scInstallPaths // ignore: cast_nullable_to_non_nullable
as List<String>,
webLocalizationVersionsData: freezed == webLocalizationVersionsData
? _value.webLocalizationVersionsData
? _self.webLocalizationVersionsData
: webLocalizationVersionsData // ignore: cast_nullable_to_non_nullable
as AppWebLocalizationVersionsData?,
lastScreenInfo: null == lastScreenInfo
? _value.lastScreenInfo
? _self.lastScreenInfo
: lastScreenInfo // ignore: cast_nullable_to_non_nullable
as String,
rssVideoItems: freezed == rssVideoItems
? _value._rssVideoItems
? _self.rssVideoItems
: rssVideoItems // ignore: cast_nullable_to_non_nullable
as List<RssItem>?,
rssTextItems: freezed == rssTextItems
? _value._rssTextItems
? _self.rssTextItems
: rssTextItems // ignore: cast_nullable_to_non_nullable
as List<RssItem>?,
localizationUpdateInfo: freezed == localizationUpdateInfo
? _value.localizationUpdateInfo
? _self.localizationUpdateInfo
: localizationUpdateInfo // ignore: cast_nullable_to_non_nullable
as MapEntry<String, bool>?,
scServerStatus: freezed == scServerStatus
? _value._scServerStatus
? _self.scServerStatus
: scServerStatus // ignore: cast_nullable_to_non_nullable
as List<dynamic>?,
as List?,
countdownFestivalListData: freezed == countdownFestivalListData
? _value._countdownFestivalListData
? _self.countdownFestivalListData
: countdownFestivalListData // ignore: cast_nullable_to_non_nullable
as List<CountdownFestivalItemData>?,
isGameRunning: null == isGameRunning
? _value._isGameRunning
? _self.isGameRunning
: isGameRunning // ignore: cast_nullable_to_non_nullable
as Map<String, bool>,
));
@ -258,8 +203,8 @@ class __$$HomeUIModelStateImplCopyWithImpl<$Res>
/// @nodoc
class _$HomeUIModelStateImpl implements _HomeUIModelState {
_$HomeUIModelStateImpl(
class _HomeUIModelState implements HomeUIModelState {
_HomeUIModelState(
{this.appPlacardData,
this.isFixing = false,
this.isFixingString = "",
@ -270,7 +215,7 @@ class _$HomeUIModelStateImpl implements _HomeUIModelState {
final List<RssItem>? rssVideoItems,
final List<RssItem>? rssTextItems,
this.localizationUpdateInfo,
final List<dynamic>? scServerStatus,
final List? scServerStatus,
final List<CountdownFestivalItemData>? countdownFestivalListData,
final Map<String, bool> isGameRunning = const {}})
: _scInstallPaths = scInstallPaths,
@ -326,9 +271,9 @@ class _$HomeUIModelStateImpl implements _HomeUIModelState {
@override
final MapEntry<String, bool>? localizationUpdateInfo;
final List<dynamic>? _scServerStatus;
final List? _scServerStatus;
@override
List<dynamic>? get scServerStatus {
List? get scServerStatus {
final value = _scServerStatus;
if (value == null) return null;
if (_scServerStatus is EqualUnmodifiableListView) return _scServerStatus;
@ -356,16 +301,19 @@ class _$HomeUIModelStateImpl implements _HomeUIModelState {
return EqualUnmodifiableMapView(_isGameRunning);
}
/// Create a copy of HomeUIModelState
/// with the given fields replaced by the non-null parameter values.
@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)';
}
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$HomeUIModelStateCopyWith<_HomeUIModelState> get copyWith =>
__$HomeUIModelStateCopyWithImpl<_HomeUIModelState>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$HomeUIModelStateImpl &&
other is _HomeUIModelState &&
(identical(other.appPlacardData, appPlacardData) ||
other.appPlacardData == appPlacardData) &&
(identical(other.isFixing, isFixing) ||
@ -413,63 +361,118 @@ class _$HomeUIModelStateImpl implements _HomeUIModelState {
const DeepCollectionEquality().hash(_countdownFestivalListData),
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
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$HomeUIModelStateImplCopyWith<_$HomeUIModelStateImpl> get copyWith =>
__$$HomeUIModelStateImplCopyWithImpl<_$HomeUIModelStateImpl>(
this, _$identity);
$Res call({
Object? appPlacardData = freezed,
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 {
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;
}
// dart format on

View File

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

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
@ -9,95 +10,60 @@ part of 'input_method_dialog_ui_model.dart';
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
/// @nodoc
mixin _$InputMethodDialogUIState {
Map<String, String>? get keyMaps => throw _privateConstructorUsedError;
Map<String, String>? get worldMaps => throw _privateConstructorUsedError;
bool get enableAutoCopy => throw _privateConstructorUsedError;
bool get isEnableAutoTranslate => throw _privateConstructorUsedError;
bool get isAutoTranslateWorking => throw _privateConstructorUsedError;
Map<String, String>? get keyMaps;
Map<String, String>? get worldMaps;
bool get enableAutoCopy;
bool get isEnableAutoTranslate;
bool get isAutoTranslateWorking;
/// Create a copy of InputMethodDialogUIState
/// with the given fields replaced by the non-null parameter values.
@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')
$InputMethodDialogUIStateCopyWith<InputMethodDialogUIState> get copyWith =>
_$InputMethodDialogUIStateCopyWithImpl<InputMethodDialogUIState>(
this as InputMethodDialogUIState, _$identity);
@override
$Res call({
Object? keyMaps = freezed,
Object? worldMaps = freezed,
Object? enableAutoCopy = null,
Object? isEnableAutoTranslate = null,
Object? isAutoTranslateWorking = null,
}) {
return _then(_value.copyWith(
keyMaps: freezed == keyMaps
? _value.keyMaps
: keyMaps // ignore: cast_nullable_to_non_nullable
as Map<String, String>?,
worldMaps: freezed == worldMaps
? _value.worldMaps
: worldMaps // ignore: cast_nullable_to_non_nullable
as Map<String, String>?,
enableAutoCopy: null == enableAutoCopy
? _value.enableAutoCopy
: enableAutoCopy // ignore: cast_nullable_to_non_nullable
as bool,
isEnableAutoTranslate: null == isEnableAutoTranslate
? _value.isEnableAutoTranslate
: isEnableAutoTranslate // ignore: cast_nullable_to_non_nullable
as bool,
isAutoTranslateWorking: null == isAutoTranslateWorking
? _value.isAutoTranslateWorking
: isAutoTranslateWorking // ignore: cast_nullable_to_non_nullable
as bool,
) as $Val);
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is InputMethodDialogUIState &&
const DeepCollectionEquality().equals(other.keyMaps, keyMaps) &&
const DeepCollectionEquality().equals(other.worldMaps, worldMaps) &&
(identical(other.enableAutoCopy, enableAutoCopy) ||
other.enableAutoCopy == enableAutoCopy) &&
(identical(other.isEnableAutoTranslate, isEnableAutoTranslate) ||
other.isEnableAutoTranslate == isEnableAutoTranslate) &&
(identical(other.isAutoTranslateWorking, isAutoTranslateWorking) ||
other.isAutoTranslateWorking == isAutoTranslateWorking));
}
@override
int get hashCode => Object.hash(
runtimeType,
const DeepCollectionEquality().hash(keyMaps),
const DeepCollectionEquality().hash(worldMaps),
enableAutoCopy,
isEnableAutoTranslate,
isAutoTranslateWorking);
@override
String toString() {
return 'InputMethodDialogUIState(keyMaps: $keyMaps, worldMaps: $worldMaps, enableAutoCopy: $enableAutoCopy, isEnableAutoTranslate: $isEnableAutoTranslate, isAutoTranslateWorking: $isAutoTranslateWorking)';
}
}
/// @nodoc
abstract class _$$InputMethodDialogUIStateImplCopyWith<$Res>
implements $InputMethodDialogUIStateCopyWith<$Res> {
factory _$$InputMethodDialogUIStateImplCopyWith(
_$InputMethodDialogUIStateImpl value,
$Res Function(_$InputMethodDialogUIStateImpl) then) =
__$$InputMethodDialogUIStateImplCopyWithImpl<$Res>;
@override
abstract mixin class $InputMethodDialogUIStateCopyWith<$Res> {
factory $InputMethodDialogUIStateCopyWith(InputMethodDialogUIState value,
$Res Function(InputMethodDialogUIState) _then) =
_$InputMethodDialogUIStateCopyWithImpl;
@useResult
$Res call(
{Map<String, String>? keyMaps,
@ -108,14 +74,12 @@ abstract class _$$InputMethodDialogUIStateImplCopyWith<$Res>
}
/// @nodoc
class __$$InputMethodDialogUIStateImplCopyWithImpl<$Res>
extends _$InputMethodDialogUIStateCopyWithImpl<$Res,
_$InputMethodDialogUIStateImpl>
implements _$$InputMethodDialogUIStateImplCopyWith<$Res> {
__$$InputMethodDialogUIStateImplCopyWithImpl(
_$InputMethodDialogUIStateImpl _value,
$Res Function(_$InputMethodDialogUIStateImpl) _then)
: super(_value, _then);
class _$InputMethodDialogUIStateCopyWithImpl<$Res>
implements $InputMethodDialogUIStateCopyWith<$Res> {
_$InputMethodDialogUIStateCopyWithImpl(this._self, this._then);
final InputMethodDialogUIState _self;
final $Res Function(InputMethodDialogUIState) _then;
/// Create a copy of InputMethodDialogUIState
/// with the given fields replaced by the non-null parameter values.
@ -128,25 +92,25 @@ class __$$InputMethodDialogUIStateImplCopyWithImpl<$Res>
Object? isEnableAutoTranslate = null,
Object? isAutoTranslateWorking = null,
}) {
return _then(_$InputMethodDialogUIStateImpl(
freezed == keyMaps
? _value._keyMaps
return _then(_self.copyWith(
keyMaps: freezed == keyMaps
? _self.keyMaps
: keyMaps // ignore: cast_nullable_to_non_nullable
as Map<String, String>?,
freezed == worldMaps
? _value._worldMaps
worldMaps: freezed == worldMaps
? _self.worldMaps
: worldMaps // ignore: cast_nullable_to_non_nullable
as Map<String, String>?,
enableAutoCopy: null == enableAutoCopy
? _value.enableAutoCopy
? _self.enableAutoCopy
: enableAutoCopy // ignore: cast_nullable_to_non_nullable
as bool,
isEnableAutoTranslate: null == isEnableAutoTranslate
? _value.isEnableAutoTranslate
? _self.isEnableAutoTranslate
: isEnableAutoTranslate // ignore: cast_nullable_to_non_nullable
as bool,
isAutoTranslateWorking: null == isAutoTranslateWorking
? _value.isAutoTranslateWorking
? _self.isAutoTranslateWorking
: isAutoTranslateWorking // ignore: cast_nullable_to_non_nullable
as bool,
));
@ -155,8 +119,8 @@ class __$$InputMethodDialogUIStateImplCopyWithImpl<$Res>
/// @nodoc
class _$InputMethodDialogUIStateImpl implements _InputMethodDialogUIState {
_$InputMethodDialogUIStateImpl(
class _InputMethodDialogUIState implements InputMethodDialogUIState {
_InputMethodDialogUIState(
final Map<String, String>? keyMaps, final Map<String, String>? worldMaps,
{this.enableAutoCopy = false,
this.isEnableAutoTranslate = false,
@ -194,16 +158,20 @@ class _$InputMethodDialogUIStateImpl implements _InputMethodDialogUIState {
@JsonKey()
final bool isAutoTranslateWorking;
/// Create a copy of InputMethodDialogUIState
/// with the given fields replaced by the non-null parameter values.
@override
String toString() {
return 'InputMethodDialogUIState(keyMaps: $keyMaps, worldMaps: $worldMaps, enableAutoCopy: $enableAutoCopy, isEnableAutoTranslate: $isEnableAutoTranslate, isAutoTranslateWorking: $isAutoTranslateWorking)';
}
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$InputMethodDialogUIStateCopyWith<_InputMethodDialogUIState> get copyWith =>
__$InputMethodDialogUIStateCopyWithImpl<_InputMethodDialogUIState>(
this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$InputMethodDialogUIStateImpl &&
other is _InputMethodDialogUIState &&
const DeepCollectionEquality().equals(other._keyMaps, _keyMaps) &&
const DeepCollectionEquality()
.equals(other._worldMaps, _worldMaps) &&
@ -224,38 +192,70 @@ class _$InputMethodDialogUIStateImpl implements _InputMethodDialogUIState {
isEnableAutoTranslate,
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
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$InputMethodDialogUIStateImplCopyWith<_$InputMethodDialogUIStateImpl>
get copyWith => __$$InputMethodDialogUIStateImplCopyWithImpl<
_$InputMethodDialogUIStateImpl>(this, _$identity);
$Res call({
Object? keyMaps = freezed,
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 {
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;
}
// dart format on

View File

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

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
@ -9,129 +10,27 @@ part of 'server.dart';
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
/// @nodoc
mixin _$InputMethodServerState {
bool get isServerStartup => throw _privateConstructorUsedError;
String? get serverAddressText => throw _privateConstructorUsedError;
bool get isServerStartup;
String? get serverAddressText;
/// Create a copy of InputMethodServerState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$InputMethodServerStateCopyWith<InputMethodServerState> get copyWith =>
throw _privateConstructorUsedError;
}
/// @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)';
}
_$InputMethodServerStateCopyWithImpl<InputMethodServerState>(
this as InputMethodServerState, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$InputMethodServerStateImpl &&
other is InputMethodServerState &&
(identical(other.isServerStartup, isServerStartup) ||
other.isServerStartup == isServerStartup) &&
(identical(other.serverAddressText, serverAddressText) ||
@ -142,30 +41,130 @@ class _$InputMethodServerStateImpl implements _InputMethodServerState {
int get hashCode =>
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
/// 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)
@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
@pragma('vm:prefer-inline')
_$$InputMethodServerStateImplCopyWith<_$InputMethodServerStateImpl>
get copyWith => __$$InputMethodServerStateImplCopyWithImpl<
_$InputMethodServerStateImpl>(this, _$identity);
$Res call({
Object? isServerStartup = null,
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 {
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;
}
// dart format on

View File

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

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
@ -9,127 +10,79 @@ part of 'advanced_localization_ui_model.dart';
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
/// @nodoc
mixin _$AdvancedLocalizationUIState {
String get workingText => throw _privateConstructorUsedError;
Map<String, AppAdvancedLocalizationClassKeysData>? get classMap =>
throw _privateConstructorUsedError;
String? get p4kGlobalIni => throw _privateConstructorUsedError;
String? get serverGlobalIni => throw _privateConstructorUsedError;
String? get customizeGlobalIni => throw _privateConstructorUsedError;
ScLocalizationData? get apiLocalizationData =>
throw _privateConstructorUsedError;
int get p4kGlobalIniLines => throw _privateConstructorUsedError;
int get serverGlobalIniLines => throw _privateConstructorUsedError;
String get errorMessage => throw _privateConstructorUsedError;
String get workingText;
Map<String, AppAdvancedLocalizationClassKeysData>? get classMap;
String? get p4kGlobalIni;
String? get serverGlobalIni;
String? get customizeGlobalIni;
ScLocalizationData? get apiLocalizationData;
int get p4kGlobalIniLines;
int get serverGlobalIniLines;
String get errorMessage;
/// Create a copy of AdvancedLocalizationUIState
/// with the given fields replaced by the non-null parameter values.
@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')
$AdvancedLocalizationUIStateCopyWith<AdvancedLocalizationUIState>
get copyWith => _$AdvancedLocalizationUIStateCopyWithImpl<
AdvancedLocalizationUIState>(
this as AdvancedLocalizationUIState, _$identity);
@override
$Res call({
Object? workingText = null,
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(_value.copyWith(
workingText: null == workingText
? _value.workingText
: workingText // ignore: cast_nullable_to_non_nullable
as String,
classMap: freezed == classMap
? _value.classMap
: classMap // ignore: cast_nullable_to_non_nullable
as Map<String, AppAdvancedLocalizationClassKeysData>?,
p4kGlobalIni: freezed == p4kGlobalIni
? _value.p4kGlobalIni
: p4kGlobalIni // ignore: cast_nullable_to_non_nullable
as String?,
serverGlobalIni: freezed == serverGlobalIni
? _value.serverGlobalIni
: serverGlobalIni // ignore: cast_nullable_to_non_nullable
as String?,
customizeGlobalIni: freezed == customizeGlobalIni
? _value.customizeGlobalIni
: customizeGlobalIni // ignore: cast_nullable_to_non_nullable
as String?,
apiLocalizationData: freezed == apiLocalizationData
? _value.apiLocalizationData
: apiLocalizationData // ignore: cast_nullable_to_non_nullable
as ScLocalizationData?,
p4kGlobalIniLines: null == p4kGlobalIniLines
? _value.p4kGlobalIniLines
: p4kGlobalIniLines // ignore: cast_nullable_to_non_nullable
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);
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is AdvancedLocalizationUIState &&
(identical(other.workingText, workingText) ||
other.workingText == workingText) &&
const DeepCollectionEquality().equals(other.classMap, classMap) &&
(identical(other.p4kGlobalIni, p4kGlobalIni) ||
other.p4kGlobalIni == p4kGlobalIni) &&
(identical(other.serverGlobalIni, serverGlobalIni) ||
other.serverGlobalIni == serverGlobalIni) &&
(identical(other.customizeGlobalIni, customizeGlobalIni) ||
other.customizeGlobalIni == customizeGlobalIni) &&
(identical(other.apiLocalizationData, apiLocalizationData) ||
other.apiLocalizationData == apiLocalizationData) &&
(identical(other.p4kGlobalIniLines, p4kGlobalIniLines) ||
other.p4kGlobalIniLines == p4kGlobalIniLines) &&
(identical(other.serverGlobalIniLines, serverGlobalIniLines) ||
other.serverGlobalIniLines == serverGlobalIniLines) &&
(identical(other.errorMessage, errorMessage) ||
other.errorMessage == errorMessage));
}
@override
int get hashCode => Object.hash(
runtimeType,
workingText,
const DeepCollectionEquality().hash(classMap),
p4kGlobalIni,
serverGlobalIni,
customizeGlobalIni,
apiLocalizationData,
p4kGlobalIniLines,
serverGlobalIniLines,
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 class _$$AdvancedLocalizationUIStateImplCopyWith<$Res>
implements $AdvancedLocalizationUIStateCopyWith<$Res> {
factory _$$AdvancedLocalizationUIStateImplCopyWith(
_$AdvancedLocalizationUIStateImpl value,
$Res Function(_$AdvancedLocalizationUIStateImpl) then) =
__$$AdvancedLocalizationUIStateImplCopyWithImpl<$Res>;
@override
abstract mixin class $AdvancedLocalizationUIStateCopyWith<$Res> {
factory $AdvancedLocalizationUIStateCopyWith(
AdvancedLocalizationUIState value,
$Res Function(AdvancedLocalizationUIState) _then) =
_$AdvancedLocalizationUIStateCopyWithImpl;
@useResult
$Res call(
{String workingText,
@ -144,14 +97,12 @@ abstract class _$$AdvancedLocalizationUIStateImplCopyWith<$Res>
}
/// @nodoc
class __$$AdvancedLocalizationUIStateImplCopyWithImpl<$Res>
extends _$AdvancedLocalizationUIStateCopyWithImpl<$Res,
_$AdvancedLocalizationUIStateImpl>
implements _$$AdvancedLocalizationUIStateImplCopyWith<$Res> {
__$$AdvancedLocalizationUIStateImplCopyWithImpl(
_$AdvancedLocalizationUIStateImpl _value,
$Res Function(_$AdvancedLocalizationUIStateImpl) _then)
: super(_value, _then);
class _$AdvancedLocalizationUIStateCopyWithImpl<$Res>
implements $AdvancedLocalizationUIStateCopyWith<$Res> {
_$AdvancedLocalizationUIStateCopyWithImpl(this._self, this._then);
final AdvancedLocalizationUIState _self;
final $Res Function(AdvancedLocalizationUIState) _then;
/// Create a copy of AdvancedLocalizationUIState
/// with the given fields replaced by the non-null parameter values.
@ -168,41 +119,41 @@ class __$$AdvancedLocalizationUIStateImplCopyWithImpl<$Res>
Object? serverGlobalIniLines = null,
Object? errorMessage = null,
}) {
return _then(_$AdvancedLocalizationUIStateImpl(
return _then(_self.copyWith(
workingText: null == workingText
? _value.workingText
? _self.workingText
: workingText // ignore: cast_nullable_to_non_nullable
as String,
classMap: freezed == classMap
? _value._classMap
? _self.classMap
: classMap // ignore: cast_nullable_to_non_nullable
as Map<String, AppAdvancedLocalizationClassKeysData>?,
p4kGlobalIni: freezed == p4kGlobalIni
? _value.p4kGlobalIni
? _self.p4kGlobalIni
: p4kGlobalIni // ignore: cast_nullable_to_non_nullable
as String?,
serverGlobalIni: freezed == serverGlobalIni
? _value.serverGlobalIni
? _self.serverGlobalIni
: serverGlobalIni // ignore: cast_nullable_to_non_nullable
as String?,
customizeGlobalIni: freezed == customizeGlobalIni
? _value.customizeGlobalIni
? _self.customizeGlobalIni
: customizeGlobalIni // ignore: cast_nullable_to_non_nullable
as String?,
apiLocalizationData: freezed == apiLocalizationData
? _value.apiLocalizationData
? _self.apiLocalizationData
: apiLocalizationData // ignore: cast_nullable_to_non_nullable
as ScLocalizationData?,
p4kGlobalIniLines: null == p4kGlobalIniLines
? _value.p4kGlobalIniLines
? _self.p4kGlobalIniLines
: p4kGlobalIniLines // ignore: cast_nullable_to_non_nullable
as int,
serverGlobalIniLines: null == serverGlobalIniLines
? _value.serverGlobalIniLines
? _self.serverGlobalIniLines
: serverGlobalIniLines // ignore: cast_nullable_to_non_nullable
as int,
errorMessage: null == errorMessage
? _value.errorMessage
? _self.errorMessage
: errorMessage // ignore: cast_nullable_to_non_nullable
as String,
));
@ -211,9 +162,8 @@ class __$$AdvancedLocalizationUIStateImplCopyWithImpl<$Res>
/// @nodoc
class _$AdvancedLocalizationUIStateImpl
implements _AdvancedLocalizationUIState {
_$AdvancedLocalizationUIStateImpl(
class _AdvancedLocalizationUIState implements AdvancedLocalizationUIState {
_AdvancedLocalizationUIState(
{this.workingText = "",
final Map<String, AppAdvancedLocalizationClassKeysData>? classMap,
this.p4kGlobalIni,
@ -256,16 +206,20 @@ class _$AdvancedLocalizationUIStateImpl
@JsonKey()
final String errorMessage;
/// Create a copy of AdvancedLocalizationUIState
/// with the given fields replaced by the non-null parameter values.
@override
String toString() {
return 'AdvancedLocalizationUIState(workingText: $workingText, classMap: $classMap, p4kGlobalIni: $p4kGlobalIni, serverGlobalIni: $serverGlobalIni, customizeGlobalIni: $customizeGlobalIni, apiLocalizationData: $apiLocalizationData, p4kGlobalIniLines: $p4kGlobalIniLines, serverGlobalIniLines: $serverGlobalIniLines, errorMessage: $errorMessage)';
}
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$AdvancedLocalizationUIStateCopyWith<_AdvancedLocalizationUIState>
get copyWith => __$AdvancedLocalizationUIStateCopyWithImpl<
_AdvancedLocalizationUIState>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$AdvancedLocalizationUIStateImpl &&
other is _AdvancedLocalizationUIState &&
(identical(other.workingText, workingText) ||
other.workingText == workingText) &&
const DeepCollectionEquality().equals(other._classMap, _classMap) &&
@ -298,52 +252,95 @@ class _$AdvancedLocalizationUIStateImpl
serverGlobalIniLines,
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
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$AdvancedLocalizationUIStateImplCopyWith<_$AdvancedLocalizationUIStateImpl>
get copyWith => __$$AdvancedLocalizationUIStateImplCopyWithImpl<
_$AdvancedLocalizationUIStateImpl>(this, _$identity);
$Res call({
Object? workingText = null,
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
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;
}
// dart format on

View File

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

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
@ -9,119 +10,78 @@ part of 'localization_ui_model.dart';
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
/// @nodoc
mixin _$LocalizationUIState {
String? get selectedLanguage => throw _privateConstructorUsedError;
String? get installedCommunityInputMethodSupportVersion =>
throw _privateConstructorUsedError;
InputMethodApiLanguageData? get communityInputMethodLanguageData =>
throw _privateConstructorUsedError;
Map<String, ScLocalizationData>? get apiLocalizationData =>
throw _privateConstructorUsedError;
String get workingVersion => throw _privateConstructorUsedError;
MapEntry<bool, String>? get patchStatus => throw _privateConstructorUsedError;
bool? get isInstalledAdvanced => throw _privateConstructorUsedError;
List<String>? get customizeList => throw _privateConstructorUsedError;
String? get selectedLanguage;
String? get installedCommunityInputMethodSupportVersion;
InputMethodApiLanguageData? get communityInputMethodLanguageData;
Map<String, ScLocalizationData>? get apiLocalizationData;
String get workingVersion;
MapEntry<bool, String>? get patchStatus;
bool? get isInstalledAdvanced;
List<String>? get customizeList;
/// Create a copy of LocalizationUIState
/// with the given fields replaced by the non-null parameter values.
@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')
$LocalizationUIStateCopyWith<LocalizationUIState> get copyWith =>
_$LocalizationUIStateCopyWithImpl<LocalizationUIState>(
this as LocalizationUIState, _$identity);
@override
$Res call({
Object? selectedLanguage = freezed,
Object? installedCommunityInputMethodSupportVersion = freezed,
Object? communityInputMethodLanguageData = freezed,
Object? apiLocalizationData = freezed,
Object? workingVersion = null,
Object? patchStatus = freezed,
Object? isInstalledAdvanced = freezed,
Object? customizeList = freezed,
}) {
return _then(_value.copyWith(
selectedLanguage: freezed == selectedLanguage
? _value.selectedLanguage
: selectedLanguage // ignore: cast_nullable_to_non_nullable
as String?,
installedCommunityInputMethodSupportVersion: freezed ==
installedCommunityInputMethodSupportVersion
? _value.installedCommunityInputMethodSupportVersion
: installedCommunityInputMethodSupportVersion // ignore: cast_nullable_to_non_nullable
as String?,
communityInputMethodLanguageData: freezed ==
communityInputMethodLanguageData
? _value.communityInputMethodLanguageData
: communityInputMethodLanguageData // ignore: cast_nullable_to_non_nullable
as InputMethodApiLanguageData?,
apiLocalizationData: freezed == apiLocalizationData
? _value.apiLocalizationData
: apiLocalizationData // ignore: cast_nullable_to_non_nullable
as Map<String, ScLocalizationData>?,
workingVersion: null == workingVersion
? _value.workingVersion
: workingVersion // ignore: cast_nullable_to_non_nullable
as String,
patchStatus: freezed == patchStatus
? _value.patchStatus
: patchStatus // ignore: cast_nullable_to_non_nullable
as MapEntry<bool, String>?,
isInstalledAdvanced: freezed == isInstalledAdvanced
? _value.isInstalledAdvanced
: isInstalledAdvanced // ignore: cast_nullable_to_non_nullable
as bool?,
customizeList: freezed == customizeList
? _value.customizeList
: customizeList // ignore: cast_nullable_to_non_nullable
as List<String>?,
) as $Val);
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is LocalizationUIState &&
(identical(other.selectedLanguage, selectedLanguage) ||
other.selectedLanguage == selectedLanguage) &&
(identical(other.installedCommunityInputMethodSupportVersion,
installedCommunityInputMethodSupportVersion) ||
other.installedCommunityInputMethodSupportVersion ==
installedCommunityInputMethodSupportVersion) &&
(identical(other.communityInputMethodLanguageData,
communityInputMethodLanguageData) ||
other.communityInputMethodLanguageData ==
communityInputMethodLanguageData) &&
const DeepCollectionEquality()
.equals(other.apiLocalizationData, apiLocalizationData) &&
(identical(other.workingVersion, workingVersion) ||
other.workingVersion == workingVersion) &&
(identical(other.patchStatus, patchStatus) ||
other.patchStatus == patchStatus) &&
(identical(other.isInstalledAdvanced, isInstalledAdvanced) ||
other.isInstalledAdvanced == isInstalledAdvanced) &&
const DeepCollectionEquality()
.equals(other.customizeList, customizeList));
}
@override
int get hashCode => Object.hash(
runtimeType,
selectedLanguage,
installedCommunityInputMethodSupportVersion,
communityInputMethodLanguageData,
const DeepCollectionEquality().hash(apiLocalizationData),
workingVersion,
patchStatus,
isInstalledAdvanced,
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 class _$$LocalizationUIStateImplCopyWith<$Res>
implements $LocalizationUIStateCopyWith<$Res> {
factory _$$LocalizationUIStateImplCopyWith(_$LocalizationUIStateImpl value,
$Res Function(_$LocalizationUIStateImpl) then) =
__$$LocalizationUIStateImplCopyWithImpl<$Res>;
@override
abstract mixin class $LocalizationUIStateCopyWith<$Res> {
factory $LocalizationUIStateCopyWith(
LocalizationUIState value, $Res Function(LocalizationUIState) _then) =
_$LocalizationUIStateCopyWithImpl;
@useResult
$Res call(
{String? selectedLanguage,
@ -135,12 +95,12 @@ abstract class _$$LocalizationUIStateImplCopyWith<$Res>
}
/// @nodoc
class __$$LocalizationUIStateImplCopyWithImpl<$Res>
extends _$LocalizationUIStateCopyWithImpl<$Res, _$LocalizationUIStateImpl>
implements _$$LocalizationUIStateImplCopyWith<$Res> {
__$$LocalizationUIStateImplCopyWithImpl(_$LocalizationUIStateImpl _value,
$Res Function(_$LocalizationUIStateImpl) _then)
: super(_value, _then);
class _$LocalizationUIStateCopyWithImpl<$Res>
implements $LocalizationUIStateCopyWith<$Res> {
_$LocalizationUIStateCopyWithImpl(this._self, this._then);
final LocalizationUIState _self;
final $Res Function(LocalizationUIState) _then;
/// Create a copy of LocalizationUIState
/// with the given fields replaced by the non-null parameter values.
@ -156,39 +116,39 @@ class __$$LocalizationUIStateImplCopyWithImpl<$Res>
Object? isInstalledAdvanced = freezed,
Object? customizeList = freezed,
}) {
return _then(_$LocalizationUIStateImpl(
return _then(_self.copyWith(
selectedLanguage: freezed == selectedLanguage
? _value.selectedLanguage
? _self.selectedLanguage
: selectedLanguage // ignore: cast_nullable_to_non_nullable
as String?,
installedCommunityInputMethodSupportVersion: freezed ==
installedCommunityInputMethodSupportVersion
? _value.installedCommunityInputMethodSupportVersion
? _self.installedCommunityInputMethodSupportVersion
: installedCommunityInputMethodSupportVersion // ignore: cast_nullable_to_non_nullable
as String?,
communityInputMethodLanguageData: freezed ==
communityInputMethodLanguageData
? _value.communityInputMethodLanguageData
? _self.communityInputMethodLanguageData
: communityInputMethodLanguageData // ignore: cast_nullable_to_non_nullable
as InputMethodApiLanguageData?,
apiLocalizationData: freezed == apiLocalizationData
? _value._apiLocalizationData
? _self.apiLocalizationData
: apiLocalizationData // ignore: cast_nullable_to_non_nullable
as Map<String, ScLocalizationData>?,
workingVersion: null == workingVersion
? _value.workingVersion
? _self.workingVersion
: workingVersion // ignore: cast_nullable_to_non_nullable
as String,
patchStatus: freezed == patchStatus
? _value.patchStatus
? _self.patchStatus
: patchStatus // ignore: cast_nullable_to_non_nullable
as MapEntry<bool, String>?,
isInstalledAdvanced: freezed == isInstalledAdvanced
? _value.isInstalledAdvanced
? _self.isInstalledAdvanced
: isInstalledAdvanced // ignore: cast_nullable_to_non_nullable
as bool?,
customizeList: freezed == customizeList
? _value._customizeList
? _self.customizeList
: customizeList // ignore: cast_nullable_to_non_nullable
as List<String>?,
));
@ -197,8 +157,8 @@ class __$$LocalizationUIStateImplCopyWithImpl<$Res>
/// @nodoc
class _$LocalizationUIStateImpl implements _LocalizationUIState {
_$LocalizationUIStateImpl(
class _LocalizationUIState implements LocalizationUIState {
_LocalizationUIState(
{this.selectedLanguage,
this.installedCommunityInputMethodSupportVersion,
this.communityInputMethodLanguageData,
@ -244,16 +204,20 @@ class _$LocalizationUIStateImpl implements _LocalizationUIState {
return EqualUnmodifiableListView(value);
}
/// Create a copy of LocalizationUIState
/// with the given fields replaced by the non-null parameter values.
@override
String toString() {
return 'LocalizationUIState(selectedLanguage: $selectedLanguage, installedCommunityInputMethodSupportVersion: $installedCommunityInputMethodSupportVersion, communityInputMethodLanguageData: $communityInputMethodLanguageData, apiLocalizationData: $apiLocalizationData, workingVersion: $workingVersion, patchStatus: $patchStatus, isInstalledAdvanced: $isInstalledAdvanced, customizeList: $customizeList)';
}
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$LocalizationUIStateCopyWith<_LocalizationUIState> get copyWith =>
__$LocalizationUIStateCopyWithImpl<_LocalizationUIState>(
this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$LocalizationUIStateImpl &&
other is _LocalizationUIState &&
(identical(other.selectedLanguage, selectedLanguage) ||
other.selectedLanguage == selectedLanguage) &&
(identical(other.installedCommunityInputMethodSupportVersion,
@ -288,48 +252,90 @@ class _$LocalizationUIStateImpl implements _LocalizationUIState {
isInstalledAdvanced,
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
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$LocalizationUIStateImplCopyWith<_$LocalizationUIStateImpl> get copyWith =>
__$$LocalizationUIStateImplCopyWithImpl<_$LocalizationUIStateImpl>(
this, _$identity);
$Res call({
Object? selectedLanguage = freezed,
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 {
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;
}
// dart format on

View File

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

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
@ -9,89 +10,59 @@ part of 'performance_ui_model.dart';
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
/// @nodoc
mixin _$HomePerformanceUIState {
bool get showGraphicsPerformanceTip => throw _privateConstructorUsedError;
bool get enabled => throw _privateConstructorUsedError;
Map<String, List<GamePerformanceData>>? get performanceMap =>
throw _privateConstructorUsedError;
String get workingString => throw _privateConstructorUsedError;
bool get showGraphicsPerformanceTip;
bool get enabled;
Map<String, List<GamePerformanceData>>? get performanceMap;
String get workingString;
/// Create a copy of HomePerformanceUIState
/// with the given fields replaced by the non-null parameter values.
@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')
$HomePerformanceUIStateCopyWith<HomePerformanceUIState> get copyWith =>
_$HomePerformanceUIStateCopyWithImpl<HomePerformanceUIState>(
this as HomePerformanceUIState, _$identity);
@override
$Res call({
Object? showGraphicsPerformanceTip = null,
Object? enabled = null,
Object? performanceMap = freezed,
Object? workingString = null,
}) {
return _then(_value.copyWith(
showGraphicsPerformanceTip: null == showGraphicsPerformanceTip
? _value.showGraphicsPerformanceTip
: showGraphicsPerformanceTip // ignore: cast_nullable_to_non_nullable
as bool,
enabled: null == enabled
? _value.enabled
: enabled // ignore: cast_nullable_to_non_nullable
as bool,
performanceMap: freezed == performanceMap
? _value.performanceMap
: performanceMap // ignore: cast_nullable_to_non_nullable
as Map<String, List<GamePerformanceData>>?,
workingString: null == workingString
? _value.workingString
: workingString // ignore: cast_nullable_to_non_nullable
as String,
) as $Val);
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is HomePerformanceUIState &&
(identical(other.showGraphicsPerformanceTip,
showGraphicsPerformanceTip) ||
other.showGraphicsPerformanceTip ==
showGraphicsPerformanceTip) &&
(identical(other.enabled, enabled) || other.enabled == enabled) &&
const DeepCollectionEquality()
.equals(other.performanceMap, performanceMap) &&
(identical(other.workingString, workingString) ||
other.workingString == workingString));
}
@override
int get hashCode => Object.hash(
runtimeType,
showGraphicsPerformanceTip,
enabled,
const DeepCollectionEquality().hash(performanceMap),
workingString);
@override
String toString() {
return 'HomePerformanceUIState(showGraphicsPerformanceTip: $showGraphicsPerformanceTip, enabled: $enabled, performanceMap: $performanceMap, workingString: $workingString)';
}
}
/// @nodoc
abstract class _$$HomePerformanceUIStateImplCopyWith<$Res>
implements $HomePerformanceUIStateCopyWith<$Res> {
factory _$$HomePerformanceUIStateImplCopyWith(
_$HomePerformanceUIStateImpl value,
$Res Function(_$HomePerformanceUIStateImpl) then) =
__$$HomePerformanceUIStateImplCopyWithImpl<$Res>;
@override
abstract mixin class $HomePerformanceUIStateCopyWith<$Res> {
factory $HomePerformanceUIStateCopyWith(HomePerformanceUIState value,
$Res Function(HomePerformanceUIState) _then) =
_$HomePerformanceUIStateCopyWithImpl;
@useResult
$Res call(
{bool showGraphicsPerformanceTip,
@ -101,14 +72,12 @@ abstract class _$$HomePerformanceUIStateImplCopyWith<$Res>
}
/// @nodoc
class __$$HomePerformanceUIStateImplCopyWithImpl<$Res>
extends _$HomePerformanceUIStateCopyWithImpl<$Res,
_$HomePerformanceUIStateImpl>
implements _$$HomePerformanceUIStateImplCopyWith<$Res> {
__$$HomePerformanceUIStateImplCopyWithImpl(
_$HomePerformanceUIStateImpl _value,
$Res Function(_$HomePerformanceUIStateImpl) _then)
: super(_value, _then);
class _$HomePerformanceUIStateCopyWithImpl<$Res>
implements $HomePerformanceUIStateCopyWith<$Res> {
_$HomePerformanceUIStateCopyWithImpl(this._self, this._then);
final HomePerformanceUIState _self;
final $Res Function(HomePerformanceUIState) _then;
/// Create a copy of HomePerformanceUIState
/// with the given fields replaced by the non-null parameter values.
@ -120,21 +89,21 @@ class __$$HomePerformanceUIStateImplCopyWithImpl<$Res>
Object? performanceMap = freezed,
Object? workingString = null,
}) {
return _then(_$HomePerformanceUIStateImpl(
return _then(_self.copyWith(
showGraphicsPerformanceTip: null == showGraphicsPerformanceTip
? _value.showGraphicsPerformanceTip
? _self.showGraphicsPerformanceTip
: showGraphicsPerformanceTip // ignore: cast_nullable_to_non_nullable
as bool,
enabled: null == enabled
? _value.enabled
? _self.enabled
: enabled // ignore: cast_nullable_to_non_nullable
as bool,
performanceMap: freezed == performanceMap
? _value._performanceMap
? _self.performanceMap
: performanceMap // ignore: cast_nullable_to_non_nullable
as Map<String, List<GamePerformanceData>>?,
workingString: null == workingString
? _value.workingString
? _self.workingString
: workingString // ignore: cast_nullable_to_non_nullable
as String,
));
@ -143,8 +112,8 @@ class __$$HomePerformanceUIStateImplCopyWithImpl<$Res>
/// @nodoc
class _$HomePerformanceUIStateImpl implements _HomePerformanceUIState {
_$HomePerformanceUIStateImpl(
class _HomePerformanceUIState implements HomePerformanceUIState {
_HomePerformanceUIState(
{this.showGraphicsPerformanceTip = true,
this.enabled = false,
final Map<String, List<GamePerformanceData>>? performanceMap,
@ -171,16 +140,20 @@ class _$HomePerformanceUIStateImpl implements _HomePerformanceUIState {
@JsonKey()
final String workingString;
/// Create a copy of HomePerformanceUIState
/// with the given fields replaced by the non-null parameter values.
@override
String toString() {
return 'HomePerformanceUIState(showGraphicsPerformanceTip: $showGraphicsPerformanceTip, enabled: $enabled, performanceMap: $performanceMap, workingString: $workingString)';
}
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$HomePerformanceUIStateCopyWith<_HomePerformanceUIState> get copyWith =>
__$HomePerformanceUIStateCopyWithImpl<_HomePerformanceUIState>(
this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$HomePerformanceUIStateImpl &&
other is _HomePerformanceUIState &&
(identical(other.showGraphicsPerformanceTip,
showGraphicsPerformanceTip) ||
other.showGraphicsPerformanceTip ==
@ -200,36 +173,64 @@ class _$HomePerformanceUIStateImpl implements _HomePerformanceUIState {
const DeepCollectionEquality().hash(_performanceMap),
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
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$HomePerformanceUIStateImplCopyWith<_$HomePerformanceUIStateImpl>
get copyWith => __$$HomePerformanceUIStateImplCopyWithImpl<
_$HomePerformanceUIStateImpl>(this, _$identity);
$Res call({
Object? showGraphicsPerformanceTip = null,
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 {
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;
}
// dart format on

View File

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

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
@ -9,80 +10,55 @@ part of 'nav_state.dart';
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
/// @nodoc
mixin _$NavState {
List<NavApiDocsItemData>? get items => throw _privateConstructorUsedError;
String get errorInfo => throw _privateConstructorUsedError;
List<NavApiDocsItemData>? get items;
String get errorInfo;
/// Create a copy of NavState
/// with the given fields replaced by the non-null parameter values.
@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')
$NavStateCopyWith<NavState> get copyWith =>
_$NavStateCopyWithImpl<NavState>(this as NavState, _$identity);
@override
$Res call({
Object? items = freezed,
Object? errorInfo = null,
}) {
return _then(_value.copyWith(
items: freezed == items
? _value.items
: items // ignore: cast_nullable_to_non_nullable
as List<NavApiDocsItemData>?,
errorInfo: null == errorInfo
? _value.errorInfo
: errorInfo // ignore: cast_nullable_to_non_nullable
as String,
) as $Val);
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is NavState &&
const DeepCollectionEquality().equals(other.items, items) &&
(identical(other.errorInfo, errorInfo) ||
other.errorInfo == errorInfo));
}
@override
int get hashCode => Object.hash(
runtimeType, const DeepCollectionEquality().hash(items), errorInfo);
@override
String toString() {
return 'NavState(items: $items, errorInfo: $errorInfo)';
}
}
/// @nodoc
abstract class _$$NavStateImplCopyWith<$Res>
implements $NavStateCopyWith<$Res> {
factory _$$NavStateImplCopyWith(
_$NavStateImpl value, $Res Function(_$NavStateImpl) then) =
__$$NavStateImplCopyWithImpl<$Res>;
@override
abstract mixin class $NavStateCopyWith<$Res> {
factory $NavStateCopyWith(NavState value, $Res Function(NavState) _then) =
_$NavStateCopyWithImpl;
@useResult
$Res call({List<NavApiDocsItemData>? items, String errorInfo});
}
/// @nodoc
class __$$NavStateImplCopyWithImpl<$Res>
extends _$NavStateCopyWithImpl<$Res, _$NavStateImpl>
implements _$$NavStateImplCopyWith<$Res> {
__$$NavStateImplCopyWithImpl(
_$NavStateImpl _value, $Res Function(_$NavStateImpl) _then)
: super(_value, _then);
class _$NavStateCopyWithImpl<$Res> implements $NavStateCopyWith<$Res> {
_$NavStateCopyWithImpl(this._self, this._then);
final NavState _self;
final $Res Function(NavState) _then;
/// Create a copy of NavState
/// with the given fields replaced by the non-null parameter values.
@ -92,13 +68,13 @@ class __$$NavStateImplCopyWithImpl<$Res>
Object? items = freezed,
Object? errorInfo = null,
}) {
return _then(_$NavStateImpl(
return _then(_self.copyWith(
items: freezed == items
? _value._items
? _self.items
: items // ignore: cast_nullable_to_non_nullable
as List<NavApiDocsItemData>?,
errorInfo: null == errorInfo
? _value.errorInfo
? _self.errorInfo
: errorInfo // ignore: cast_nullable_to_non_nullable
as String,
));
@ -107,9 +83,8 @@ class __$$NavStateImplCopyWithImpl<$Res>
/// @nodoc
class _$NavStateImpl implements _NavState {
const _$NavStateImpl(
{final List<NavApiDocsItemData>? items, this.errorInfo = ""})
class _NavState implements NavState {
const _NavState({final List<NavApiDocsItemData>? items, this.errorInfo = ""})
: _items = items;
final List<NavApiDocsItemData>? _items;
@ -126,16 +101,19 @@ class _$NavStateImpl implements _NavState {
@JsonKey()
final String errorInfo;
/// Create a copy of NavState
/// with the given fields replaced by the non-null parameter values.
@override
String toString() {
return 'NavState(items: $items, errorInfo: $errorInfo)';
}
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$NavStateCopyWith<_NavState> get copyWith =>
__$NavStateCopyWithImpl<_NavState>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$NavStateImpl &&
other is _NavState &&
const DeepCollectionEquality().equals(other._items, _items) &&
(identical(other.errorInfo, errorInfo) ||
other.errorInfo == errorInfo));
@ -145,29 +123,48 @@ class _$NavStateImpl implements _NavState {
int get hashCode => Object.hash(
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
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$NavStateImplCopyWith<_$NavStateImpl> get copyWith =>
__$$NavStateImplCopyWithImpl<_$NavStateImpl>(this, _$identity);
$Res call({
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 {
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;
}
// dart format on

View File

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

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
@ -9,197 +10,31 @@ part of 'settings_ui_model.dart';
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
/// @nodoc
mixin _$SettingsUIState {
bool get isEnableToolSiteMirrors => throw _privateConstructorUsedError;
String get inputGameLaunchECore => throw _privateConstructorUsedError;
String? get customLauncherPath => throw _privateConstructorUsedError;
String? get customGamePath => throw _privateConstructorUsedError;
int get locationCacheSize => throw _privateConstructorUsedError;
bool get isUseInternalDNS => throw _privateConstructorUsedError;
bool get isEnableToolSiteMirrors;
String get inputGameLaunchECore;
String? get customLauncherPath;
String? get customGamePath;
int get locationCacheSize;
bool get isUseInternalDNS;
/// Create a copy of SettingsUIState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$SettingsUIStateCopyWith<SettingsUIState> get copyWith =>
throw _privateConstructorUsedError;
}
/// @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)';
}
_$SettingsUIStateCopyWithImpl<SettingsUIState>(
this as SettingsUIState, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$SettingsUIStateImpl &&
other is SettingsUIState &&
(identical(
other.isEnableToolSiteMirrors, isEnableToolSiteMirrors) ||
other.isEnableToolSiteMirrors == isEnableToolSiteMirrors) &&
@ -225,42 +60,212 @@ class _$SettingsUIStateImpl implements _SettingsUIState {
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> {
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
/// 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)
@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
@pragma('vm:prefer-inline')
_$$SettingsUIStateImplCopyWith<_$SettingsUIStateImpl> get copyWith =>
__$$SettingsUIStateImplCopyWithImpl<_$SettingsUIStateImpl>(
this, _$identity);
$Res call({
Object? isEnableToolSiteMirrors = null,
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 {
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;
}
// dart format on

View File

@ -21,7 +21,7 @@ import 'package:starcitizen_doctor/widgets/widgets.dart';
part 'rsi_launcher_enhance_dialog_ui.freezed.dart';
@freezed
class RSILauncherStateData with _$RSILauncherStateData {
abstract class RSILauncherStateData with _$RSILauncherStateData {
const factory RSILauncherStateData({
required String version,
required asar_api.RsiLauncherAsarData data,
@ -35,8 +35,7 @@ class RSILauncherStateData with _$RSILauncherStateData {
class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
final bool showNotGameInstallMsg;
const RsiLauncherEnhanceDialogUI(
{super.key, this.showNotGameInstallMsg = false});
const RsiLauncherEnhanceDialogUI({super.key, this.showNotGameInstallMsg = false});
static const supportLocalizationMap = {
"en": NoL10n.langEn,
@ -62,30 +61,25 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
}
workingText.value = S.current.tools_rsi_launcher_enhance_init_msg2;
if (!context.mounted) return;
await _loadEnhanceData(context, ref, assarState)
.unwrap(context: context)
.unwrap(context: context);
await _loadEnhanceData(context, ref, assarState).unwrap(context: context).unwrap(context: context);
workingText.value = "";
}
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 (!context.mounted) return;
showToast(
context, S.current.tools_action_info_rsi_launcher_running_warning,
constraints: BoxConstraints(
maxWidth: MediaQuery.of(context).size.width * .35));
showToast(context, S.current.tools_action_info_rsi_launcher_running_warning,
constraints: BoxConstraints(maxWidth: MediaQuery.of(context).size.width * .35));
workingText.value = "";
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;
if (!context.mounted) return;
await assarState.value?.data
.writeMainJs(content: utf8.encode(newScript))
.unwrap(context: context);
await assarState.value?.data.writeMainJs(content: utf8.encode(newScript)).unwrap(context: context);
AnalyticsApi.touch("rsi_launcher_mod_apply");
await readState();
}
@ -97,16 +91,14 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
}, const []);
return ContentDialog(
constraints:
BoxConstraints(maxWidth: MediaQuery.of(context).size.width * .48),
constraints: BoxConstraints(maxWidth: MediaQuery.of(context).size.width * .48),
title: Row(children: [
IconButton(
icon: const Icon(
FluentIcons.back,
size: 22,
),
onPressed:
workingText.value.isEmpty ? Navigator.of(context).pop : null),
onPressed: workingText.value.isEmpty ? Navigator.of(context).pop : null),
const SizedBox(width: 12),
Text(S.current.tools_rsi_launcher_enhance_title),
]),
@ -119,8 +111,7 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
if (showNotGameInstallMsg) ...[
InfoBar(
title: const SizedBox(),
content: Text(S.current
.home_localization_action_rsi_launcher_no_game_path_msg),
content: Text(S.current.home_localization_action_rsi_launcher_no_game_path_msg),
style: InfoBarThemeData(decoration: (severity) {
return BoxDecoration(
color: Colors.orange,
@ -152,18 +143,16 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
children: [
Expanded(
child: Text(
S.current.tools_rsi_launcher_enhance_msg_version(
assarState.value?.version ?? ""),
S.current.tools_rsi_launcher_enhance_msg_version(assarState.value?.version ?? ""),
style: TextStyle(
color: Colors.white.withValues(alpha: .6),
),
),
),
Text(
S.current.tools_rsi_launcher_enhance_msg_patch_status(
(assarState.value?.isPatchInstalled ?? false)
? S.current.localization_info_installed
: S.current.tools_action_info_not_installed),
S.current.tools_rsi_launcher_enhance_msg_patch_status((assarState.value?.isPatchInstalled ?? false)
? S.current.localization_info_installed
: S.current.tools_action_info_not_installed),
style: TextStyle(
color: Colors.white.withValues(alpha: .6),
),
@ -188,12 +177,10 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(S.current
.tools_rsi_launcher_enhance_title_localization),
Text(S.current.tools_rsi_launcher_enhance_title_localization),
const SizedBox(height: 3),
Text(
S.current
.tools_rsi_launcher_enhance_subtitle_localization,
S.current.tools_rsi_launcher_enhance_subtitle_localization,
style: TextStyle(
fontSize: 13,
color: Colors.white.withValues(alpha: .6),
@ -204,14 +191,11 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
ComboBox(
items: [
for (final key in supportLocalizationMap.keys)
ComboBoxItem(
value: key,
child: Text(supportLocalizationMap[key]!))
ComboBoxItem(value: key, child: Text(supportLocalizationMap[key]!))
],
value: assarState.value?.enabledLocalization,
onChanged: (v) {
assarState.value = assarState.value!
.copyWith(enabledLocalization: v);
assarState.value = assarState.value!.copyWith(enabledLocalization: v);
},
),
],
@ -228,15 +212,11 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(expandEnhance.value
? FluentIcons.chevron_up
: FluentIcons.chevron_down),
Icon(expandEnhance.value ? FluentIcons.chevron_up : FluentIcons.chevron_down),
const SizedBox(width: 12),
Text(expandEnhance.value
? S.current
.tools_rsi_launcher_enhance_action_fold
: S.current
.tools_rsi_launcher_enhance_action_expand),
? S.current.tools_rsi_launcher_enhance_action_fold
: S.current.tools_rsi_launcher_enhance_action_expand),
],
))),
],
@ -250,13 +230,10 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(S.current
.tools_rsi_launcher_enhance_note_msg),
Text(S.current.tools_rsi_launcher_enhance_note_msg),
],
),
constraints: BoxConstraints(
maxWidth:
MediaQuery.of(context).size.width * .55));
constraints: BoxConstraints(maxWidth: MediaQuery.of(context).size.width * .55));
if (!userOK) return;
}
expandEnhance.value = !expandEnhance.value;
@ -275,12 +252,10 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(S.current
.tools_rsi_launcher_enhance_title_download_booster),
Text(S.current.tools_rsi_launcher_enhance_title_download_booster),
const SizedBox(height: 3),
Text(
S.current
.tools_rsi_launcher_enhance_subtitle_download_booster,
S.current.tools_rsi_launcher_enhance_subtitle_download_booster,
style: TextStyle(
fontSize: 13,
color: Colors.white.withValues(alpha: .6),
@ -290,11 +265,9 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
)),
ToggleSwitch(
onChanged: (value) {
assarState.value = assarState.value
?.copyWith(enableDownloaderBoost: value);
assarState.value = assarState.value?.copyWith(enableDownloaderBoost: value);
},
checked: assarState.value?.enableDownloaderBoost ??
false,
checked: assarState.value?.enableDownloaderBoost ?? false,
)
])),
],
@ -303,17 +276,14 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
child: FilledButton(
onPressed: doInstall,
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 4, horizontal: 6),
child: Text(S.current
.tools_rsi_launcher_enhance_action_install),
padding: const EdgeInsets.symmetric(vertical: 4, horizontal: 6),
child: Text(S.current.tools_rsi_launcher_enhance_action_install),
))),
],
const SizedBox(height: 16),
Text(
S.current.tools_rsi_launcher_enhance_msg_uninstall,
style: TextStyle(
color: Colors.white.withValues(alpha: .6), fontSize: 13),
style: TextStyle(color: Colors.white.withValues(alpha: .6), fontSize: 13),
),
],
],
@ -326,8 +296,7 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
final lPath = await SystemHelper.getRSILauncherPath(skipEXE: true);
if (lPath.isEmpty) {
if (!context.mounted) return null;
showToast(context,
S.current.tools_rsi_launcher_enhance_msg_error_launcher_notfound);
showToast(context, S.current.tools_rsi_launcher_enhance_msg_error_launcher_notfound);
return null;
}
dPrint("[RsiLauncherEnhanceDialogUI] rsiLauncherPath ==== $lPath");
@ -335,25 +304,18 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
dPrint("[RsiLauncherEnhanceDialogUI] rsiLauncherDataPath ==== $dataPath");
try {
final data = await asar_api.getRsiLauncherAsarData(asarPath: dataPath);
dPrint(
"[RsiLauncherEnhanceDialogUI] rsiLauncherPath main.js path == ${data.mainJsPath}");
final version =
RegExp(r"main\.(\w+)\.js").firstMatch(data.mainJsPath)?.group(1);
dPrint("[RsiLauncherEnhanceDialogUI] rsiLauncherPath main.js path == ${data.mainJsPath}");
final version = RegExp(r"main\.(\w+)\.js").firstMatch(data.mainJsPath)?.group(1);
if (version == null) {
if (!context.mounted) return null;
showToast(
context,
S.current
.tools_rsi_launcher_enhance_msg_error_get_launcher_info_error);
showToast(context, S.current.tools_rsi_launcher_enhance_msg_error_get_launcher_info_error);
return null;
}
dPrint(
"[RsiLauncherEnhanceDialogUI] rsiLauncherPath main.js version == $version");
dPrint("[RsiLauncherEnhanceDialogUI] rsiLauncherPath main.js version == $version");
final mainJsString = String.fromCharCodes(data.mainJsContent);
final (enabledLocalization, enableDownloaderBoost) =
_readScriptState(mainJsString);
final (enabledLocalization, enableDownloaderBoost) = _readScriptState(mainJsString);
return RSILauncherStateData(
version: version,
@ -365,25 +327,26 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
);
} catch (e) {
if (!context.mounted) return null;
showToast(
context,
S.current
.tools_rsi_launcher_enhance_msg_error_get_launcher_info_error_with_args(
e));
showToast(context, S.current.tools_rsi_launcher_enhance_msg_error_get_launcher_info_error_with_args(e));
return null;
}
}
Future<String> _loadEnhanceData(BuildContext context, WidgetRef ref,
ValueNotifier<RSILauncherStateData?> assarState) async {
Future<String> _loadEnhanceData(
BuildContext context, WidgetRef ref, ValueNotifier<RSILauncherStateData?> assarState) async {
final globalModel = ref.read(appGlobalModelProvider);
final enhancePath =
"${globalModel.applicationSupportDir}/launcher_enhance_data";
final enhanceFile =
File("$enhancePath/${assarState.value?.version}.tar.gz");
final enhancePath = "${globalModel.applicationSupportDir}/launcher_enhance_data";
/// For debug
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()) {
final downloadUrl =
"${URLConf.gitApiRSILauncherEnhanceUrl}/archive/${assarState.value?.version}.tar.gz";
final downloadUrl = "${URLConf.gitApiRSILauncherEnhanceUrl}/archive/${assarState.value?.version}.tar.gz";
final r = await RSHttp.get(downloadUrl).unwrap();
if (r.statusCode != 200 || r.data == null) {
return "";
@ -391,24 +354,18 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
await enhanceFile.create(recursive: true);
await enhanceFile.writeAsBytes(r.data!, flush: true);
}
final severMainJS =
await compute(_readArchive, (enhanceFile.path, "main.js"));
final severMainJS = await compute(_readArchive, (enhanceFile.path, "main.js"));
final serverMainJSString = severMainJS.toString();
final scriptState = _readScriptState(serverMainJSString);
if (assarState.value?.enabledLocalization == null) {
assarState.value =
assarState.value?.copyWith(enabledLocalization: scriptState.$1);
dPrint(
"[RsiLauncherEnhanceDialogUI] _loadEnhanceData enabledLocalization == ${scriptState.$1}");
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(enableDownloaderBoost: scriptState.$2);
dPrint("[RsiLauncherEnhanceDialogUI] _loadEnhanceData enableDownloaderBoost == ${scriptState.$2}");
}
assarState.value =
assarState.value?.copyWith(serverData: serverMainJSString);
assarState.value = assarState.value?.copyWith(serverData: serverMainJSString);
return serverMainJSString;
}
@ -432,12 +389,10 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
}
// ignore: constant_identifier_names
static const SC_TOOLBOX_ENABLED_LOCALIZATION_SCRIPT_START =
"const SC_TOOLBOX_ENABLED_LOCALIZATION = ";
static const SC_TOOLBOX_ENABLED_LOCALIZATION_SCRIPT_START = "const SC_TOOLBOX_ENABLED_LOCALIZATION = ";
// ignore: constant_identifier_names
static const SC_TOOLBOX_ENABLE_DOWNLOADER_BOOST_SCRIPT_START =
"const SC_TOOLBOX_ENABLE_DOWNLOADER_BOOST = ";
static const SC_TOOLBOX_ENABLE_DOWNLOADER_BOOST_SCRIPT_START = "const SC_TOOLBOX_ENABLE_DOWNLOADER_BOOST = ";
(String?, bool?) _readScriptState(String mainJsString) {
String? enabledLocalization;
@ -449,35 +404,44 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
.substring(SC_TOOLBOX_ENABLED_LOCALIZATION_SCRIPT_START.length)
.replaceAll("\"", "")
.replaceAll(";", "");
} else if (lineTrim
.startsWith(SC_TOOLBOX_ENABLE_DOWNLOADER_BOOST_SCRIPT_START)) {
enableDownloaderBoost = lineTrim
.substring(
SC_TOOLBOX_ENABLE_DOWNLOADER_BOOST_SCRIPT_START.length)
.toLowerCase() ==
"true;";
} else if (lineTrim.startsWith(SC_TOOLBOX_ENABLE_DOWNLOADER_BOOST_SCRIPT_START)) {
enableDownloaderBoost =
lineTrim.substring(SC_TOOLBOX_ENABLE_DOWNLOADER_BOOST_SCRIPT_START.length).toLowerCase() == "true;";
}
}
return (enabledLocalization, enableDownloaderBoost);
}
Future<String> _genNewScript(
ValueNotifier<RSILauncherStateData?> assarState) async {
Future<String> _genNewScript(ValueNotifier<RSILauncherStateData?> assarState) async {
final serverScriptLines = assarState.value!.serverData.split("\n");
final StringBuffer scriptBuffer = StringBuffer("");
for (final line in serverScriptLines) {
final lineTrim = line.trim();
if (lineTrim.startsWith(SC_TOOLBOX_ENABLED_LOCALIZATION_SCRIPT_START)) {
scriptBuffer.writeln(
"$SC_TOOLBOX_ENABLED_LOCALIZATION_SCRIPT_START\"${assarState.value!.enabledLocalization}\";");
} else if (lineTrim
.startsWith(SC_TOOLBOX_ENABLE_DOWNLOADER_BOOST_SCRIPT_START)) {
scriptBuffer.writeln(
"$SC_TOOLBOX_ENABLE_DOWNLOADER_BOOST_SCRIPT_START${assarState.value!.enableDownloaderBoost};");
scriptBuffer
.writeln("$SC_TOOLBOX_ENABLED_LOCALIZATION_SCRIPT_START\"${assarState.value!.enabledLocalization}\";");
} else if (lineTrim.startsWith(SC_TOOLBOX_ENABLE_DOWNLOADER_BOOST_SCRIPT_START)) {
scriptBuffer
.writeln("$SC_TOOLBOX_ENABLE_DOWNLOADER_BOOST_SCRIPT_START${assarState.value!.enableDownloaderBoost};");
} else {
scriptBuffer.writeln(line);
}
}
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
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
@ -9,101 +10,58 @@ part of 'rsi_launcher_enhance_dialog_ui.dart';
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
/// @nodoc
mixin _$RSILauncherStateData {
String get version => throw _privateConstructorUsedError;
asar_api.RsiLauncherAsarData get data => throw _privateConstructorUsedError;
String get serverData => throw _privateConstructorUsedError;
bool get isPatchInstalled => throw _privateConstructorUsedError;
String? get enabledLocalization => throw _privateConstructorUsedError;
bool? get enableDownloaderBoost => throw _privateConstructorUsedError;
String get version;
asar_api.RsiLauncherAsarData get data;
String get serverData;
bool get isPatchInstalled;
String? get enabledLocalization;
bool? get enableDownloaderBoost;
/// Create a copy of RSILauncherStateData
/// with the given fields replaced by the non-null parameter values.
@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')
$RSILauncherStateDataCopyWith<RSILauncherStateData> get copyWith =>
_$RSILauncherStateDataCopyWithImpl<RSILauncherStateData>(
this as RSILauncherStateData, _$identity);
@override
$Res call({
Object? version = null,
Object? data = null,
Object? serverData = null,
Object? isPatchInstalled = null,
Object? enabledLocalization = freezed,
Object? enableDownloaderBoost = freezed,
}) {
return _then(_value.copyWith(
version: null == version
? _value.version
: version // ignore: cast_nullable_to_non_nullable
as String,
data: null == data
? _value.data
: data // ignore: cast_nullable_to_non_nullable
as asar_api.RsiLauncherAsarData,
serverData: null == serverData
? _value.serverData
: serverData // ignore: cast_nullable_to_non_nullable
as String,
isPatchInstalled: null == isPatchInstalled
? _value.isPatchInstalled
: 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);
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is RSILauncherStateData &&
(identical(other.version, version) || other.version == version) &&
(identical(other.data, data) || other.data == data) &&
(identical(other.serverData, serverData) ||
other.serverData == serverData) &&
(identical(other.isPatchInstalled, isPatchInstalled) ||
other.isPatchInstalled == isPatchInstalled) &&
(identical(other.enabledLocalization, enabledLocalization) ||
other.enabledLocalization == enabledLocalization) &&
(identical(other.enableDownloaderBoost, enableDownloaderBoost) ||
other.enableDownloaderBoost == enableDownloaderBoost));
}
@override
int get hashCode => Object.hash(runtimeType, version, data, serverData,
isPatchInstalled, enabledLocalization, enableDownloaderBoost);
@override
String toString() {
return 'RSILauncherStateData(version: $version, data: $data, serverData: $serverData, isPatchInstalled: $isPatchInstalled, enabledLocalization: $enabledLocalization, enableDownloaderBoost: $enableDownloaderBoost)';
}
}
/// @nodoc
abstract class _$$RSILauncherStateDataImplCopyWith<$Res>
implements $RSILauncherStateDataCopyWith<$Res> {
factory _$$RSILauncherStateDataImplCopyWith(_$RSILauncherStateDataImpl value,
$Res Function(_$RSILauncherStateDataImpl) then) =
__$$RSILauncherStateDataImplCopyWithImpl<$Res>;
@override
abstract mixin class $RSILauncherStateDataCopyWith<$Res> {
factory $RSILauncherStateDataCopyWith(RSILauncherStateData value,
$Res Function(RSILauncherStateData) _then) =
_$RSILauncherStateDataCopyWithImpl;
@useResult
$Res call(
{String version,
@ -115,12 +73,12 @@ abstract class _$$RSILauncherStateDataImplCopyWith<$Res>
}
/// @nodoc
class __$$RSILauncherStateDataImplCopyWithImpl<$Res>
extends _$RSILauncherStateDataCopyWithImpl<$Res, _$RSILauncherStateDataImpl>
implements _$$RSILauncherStateDataImplCopyWith<$Res> {
__$$RSILauncherStateDataImplCopyWithImpl(_$RSILauncherStateDataImpl _value,
$Res Function(_$RSILauncherStateDataImpl) _then)
: super(_value, _then);
class _$RSILauncherStateDataCopyWithImpl<$Res>
implements $RSILauncherStateDataCopyWith<$Res> {
_$RSILauncherStateDataCopyWithImpl(this._self, this._then);
final RSILauncherStateData _self;
final $Res Function(RSILauncherStateData) _then;
/// Create a copy of RSILauncherStateData
/// with the given fields replaced by the non-null parameter values.
@ -134,29 +92,29 @@ class __$$RSILauncherStateDataImplCopyWithImpl<$Res>
Object? enabledLocalization = freezed,
Object? enableDownloaderBoost = freezed,
}) {
return _then(_$RSILauncherStateDataImpl(
return _then(_self.copyWith(
version: null == version
? _value.version
? _self.version
: version // ignore: cast_nullable_to_non_nullable
as String,
data: null == data
? _value.data
? _self.data
: data // ignore: cast_nullable_to_non_nullable
as asar_api.RsiLauncherAsarData,
serverData: null == serverData
? _value.serverData
? _self.serverData
: serverData // ignore: cast_nullable_to_non_nullable
as String,
isPatchInstalled: null == isPatchInstalled
? _value.isPatchInstalled
? _self.isPatchInstalled
: isPatchInstalled // ignore: cast_nullable_to_non_nullable
as bool,
enabledLocalization: freezed == enabledLocalization
? _value.enabledLocalization
? _self.enabledLocalization
: enabledLocalization // ignore: cast_nullable_to_non_nullable
as String?,
enableDownloaderBoost: freezed == enableDownloaderBoost
? _value.enableDownloaderBoost
? _self.enableDownloaderBoost
: enableDownloaderBoost // ignore: cast_nullable_to_non_nullable
as bool?,
));
@ -165,8 +123,8 @@ class __$$RSILauncherStateDataImplCopyWithImpl<$Res>
/// @nodoc
class _$RSILauncherStateDataImpl implements _RSILauncherStateData {
const _$RSILauncherStateDataImpl(
class _RSILauncherStateData implements RSILauncherStateData {
const _RSILauncherStateData(
{required this.version,
required this.data,
required this.serverData,
@ -188,16 +146,20 @@ class _$RSILauncherStateDataImpl implements _RSILauncherStateData {
@override
final bool? enableDownloaderBoost;
/// Create a copy of RSILauncherStateData
/// with the given fields replaced by the non-null parameter values.
@override
String toString() {
return 'RSILauncherStateData(version: $version, data: $data, serverData: $serverData, isPatchInstalled: $isPatchInstalled, enabledLocalization: $enabledLocalization, enableDownloaderBoost: $enableDownloaderBoost)';
}
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$RSILauncherStateDataCopyWith<_RSILauncherStateData> get copyWith =>
__$RSILauncherStateDataCopyWithImpl<_RSILauncherStateData>(
this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$RSILauncherStateDataImpl &&
other is _RSILauncherStateData &&
(identical(other.version, version) || other.version == version) &&
(identical(other.data, data) || other.data == data) &&
(identical(other.serverData, serverData) ||
@ -214,43 +176,76 @@ class _$RSILauncherStateDataImpl implements _RSILauncherStateData {
int get hashCode => Object.hash(runtimeType, version, data, serverData,
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
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$RSILauncherStateDataImplCopyWith<_$RSILauncherStateDataImpl>
get copyWith =>
__$$RSILauncherStateDataImplCopyWithImpl<_$RSILauncherStateDataImpl>(
this, _$identity);
$Res call({
Object? version = null,
Object? data = null,
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 {
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;
}
// dart format on

View File

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

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
@ -9,93 +10,61 @@ part of 'log_analyze_provider.dart';
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
/// @nodoc
mixin _$LogAnalyzeLineData {
String get type => throw _privateConstructorUsedError;
String get title => throw _privateConstructorUsedError;
String? get data => throw _privateConstructorUsedError;
String? get dateTime => throw _privateConstructorUsedError;
String get type;
String get title;
String? get data;
String? get dateTime;
/// Create a copy of LogAnalyzeLineData
/// with the given fields replaced by the non-null parameter values.
@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')
$LogAnalyzeLineDataCopyWith<LogAnalyzeLineData> get copyWith =>
_$LogAnalyzeLineDataCopyWithImpl<LogAnalyzeLineData>(
this as LogAnalyzeLineData, _$identity);
@override
$Res call({
Object? type = null,
Object? title = null,
Object? data = freezed,
Object? dateTime = freezed,
}) {
return _then(_value.copyWith(
type: null == type
? _value.type
: type // ignore: cast_nullable_to_non_nullable
as String,
title: null == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String,
data: freezed == data
? _value.data
: 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);
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is LogAnalyzeLineData &&
(identical(other.type, type) || other.type == type) &&
(identical(other.title, title) || other.title == title) &&
(identical(other.data, data) || other.data == data) &&
(identical(other.dateTime, dateTime) ||
other.dateTime == dateTime));
}
@override
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 class _$$LogAnalyzeLineDataImplCopyWith<$Res>
implements $LogAnalyzeLineDataCopyWith<$Res> {
factory _$$LogAnalyzeLineDataImplCopyWith(_$LogAnalyzeLineDataImpl value,
$Res Function(_$LogAnalyzeLineDataImpl) then) =
__$$LogAnalyzeLineDataImplCopyWithImpl<$Res>;
@override
abstract mixin class $LogAnalyzeLineDataCopyWith<$Res> {
factory $LogAnalyzeLineDataCopyWith(
LogAnalyzeLineData value, $Res Function(LogAnalyzeLineData) _then) =
_$LogAnalyzeLineDataCopyWithImpl;
@useResult
$Res call({String type, String title, String? data, String? dateTime});
}
/// @nodoc
class __$$LogAnalyzeLineDataImplCopyWithImpl<$Res>
extends _$LogAnalyzeLineDataCopyWithImpl<$Res, _$LogAnalyzeLineDataImpl>
implements _$$LogAnalyzeLineDataImplCopyWith<$Res> {
__$$LogAnalyzeLineDataImplCopyWithImpl(_$LogAnalyzeLineDataImpl _value,
$Res Function(_$LogAnalyzeLineDataImpl) _then)
: super(_value, _then);
class _$LogAnalyzeLineDataCopyWithImpl<$Res>
implements $LogAnalyzeLineDataCopyWith<$Res> {
_$LogAnalyzeLineDataCopyWithImpl(this._self, this._then);
final LogAnalyzeLineData _self;
final $Res Function(LogAnalyzeLineData) _then;
/// Create a copy of LogAnalyzeLineData
/// with the given fields replaced by the non-null parameter values.
@ -107,21 +76,21 @@ class __$$LogAnalyzeLineDataImplCopyWithImpl<$Res>
Object? data = freezed,
Object? dateTime = freezed,
}) {
return _then(_$LogAnalyzeLineDataImpl(
return _then(_self.copyWith(
type: null == type
? _value.type
? _self.type
: type // ignore: cast_nullable_to_non_nullable
as String,
title: null == title
? _value.title
? _self.title
: title // ignore: cast_nullable_to_non_nullable
as String,
data: freezed == data
? _value.data
? _self.data
: data // ignore: cast_nullable_to_non_nullable
as String?,
dateTime: freezed == dateTime
? _value.dateTime
? _self.dateTime
: dateTime // ignore: cast_nullable_to_non_nullable
as String?,
));
@ -130,8 +99,8 @@ class __$$LogAnalyzeLineDataImplCopyWithImpl<$Res>
/// @nodoc
class _$LogAnalyzeLineDataImpl implements _LogAnalyzeLineData {
const _$LogAnalyzeLineDataImpl(
class _LogAnalyzeLineData implements LogAnalyzeLineData {
const _LogAnalyzeLineData(
{required this.type, required this.title, this.data, this.dateTime});
@override
@ -143,16 +112,19 @@ class _$LogAnalyzeLineDataImpl implements _LogAnalyzeLineData {
@override
final String? dateTime;
/// Create a copy of LogAnalyzeLineData
/// with the given fields replaced by the non-null parameter values.
@override
String toString() {
return 'LogAnalyzeLineData(type: $type, title: $title, data: $data, dateTime: $dateTime)';
}
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$LogAnalyzeLineDataCopyWith<_LogAnalyzeLineData> get copyWith =>
__$LogAnalyzeLineDataCopyWithImpl<_LogAnalyzeLineData>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$LogAnalyzeLineDataImpl &&
other is _LogAnalyzeLineData &&
(identical(other.type, type) || other.type == type) &&
(identical(other.title, title) || other.title == title) &&
(identical(other.data, data) || other.data == data) &&
@ -163,36 +135,60 @@ class _$LogAnalyzeLineDataImpl implements _LogAnalyzeLineData {
@override
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
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$LogAnalyzeLineDataImplCopyWith<_$LogAnalyzeLineDataImpl> get copyWith =>
__$$LogAnalyzeLineDataImplCopyWithImpl<_$LogAnalyzeLineDataImpl>(
this, _$identity);
$Res call({
Object? type = null,
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 {
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;
}
// dart format on

View File

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

View File

@ -1,3 +1,4 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
@ -9,108 +10,69 @@ part of 'tools_ui_model.dart';
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
/// @nodoc
mixin _$ToolsUIState {
bool get working => throw _privateConstructorUsedError;
String get scInstalledPath => throw _privateConstructorUsedError;
String get rsiLauncherInstalledPath => throw _privateConstructorUsedError;
List<String> get scInstallPaths => throw _privateConstructorUsedError;
List<String> get rsiLauncherInstallPaths =>
throw _privateConstructorUsedError;
List<ToolsItemData> get items => throw _privateConstructorUsedError;
bool get isItemLoading => throw _privateConstructorUsedError;
bool get working;
String get scInstalledPath;
String get rsiLauncherInstalledPath;
List<String> get scInstallPaths;
List<String> get rsiLauncherInstallPaths;
List<ToolsItemData> get items;
bool get isItemLoading;
/// Create a copy of ToolsUIState
/// with the given fields replaced by the non-null parameter values.
@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')
$ToolsUIStateCopyWith<ToolsUIState> get copyWith =>
_$ToolsUIStateCopyWithImpl<ToolsUIState>(
this as ToolsUIState, _$identity);
@override
$Res call({
Object? working = null,
Object? scInstalledPath = null,
Object? rsiLauncherInstalledPath = null,
Object? scInstallPaths = null,
Object? rsiLauncherInstallPaths = null,
Object? items = null,
Object? isItemLoading = null,
}) {
return _then(_value.copyWith(
working: null == working
? _value.working
: working // ignore: cast_nullable_to_non_nullable
as bool,
scInstalledPath: null == scInstalledPath
? _value.scInstalledPath
: scInstalledPath // ignore: cast_nullable_to_non_nullable
as String,
rsiLauncherInstalledPath: null == rsiLauncherInstalledPath
? _value.rsiLauncherInstalledPath
: rsiLauncherInstalledPath // ignore: cast_nullable_to_non_nullable
as String,
scInstallPaths: null == scInstallPaths
? _value.scInstallPaths
: scInstallPaths // ignore: cast_nullable_to_non_nullable
as List<String>,
rsiLauncherInstallPaths: null == rsiLauncherInstallPaths
? _value.rsiLauncherInstallPaths
: rsiLauncherInstallPaths // ignore: cast_nullable_to_non_nullable
as List<String>,
items: null == items
? _value.items
: items // ignore: cast_nullable_to_non_nullable
as List<ToolsItemData>,
isItemLoading: null == isItemLoading
? _value.isItemLoading
: isItemLoading // ignore: cast_nullable_to_non_nullable
as bool,
) as $Val);
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is ToolsUIState &&
(identical(other.working, working) || other.working == working) &&
(identical(other.scInstalledPath, scInstalledPath) ||
other.scInstalledPath == scInstalledPath) &&
(identical(
other.rsiLauncherInstalledPath, rsiLauncherInstalledPath) ||
other.rsiLauncherInstalledPath == rsiLauncherInstalledPath) &&
const DeepCollectionEquality()
.equals(other.scInstallPaths, scInstallPaths) &&
const DeepCollectionEquality().equals(
other.rsiLauncherInstallPaths, rsiLauncherInstallPaths) &&
const DeepCollectionEquality().equals(other.items, items) &&
(identical(other.isItemLoading, isItemLoading) ||
other.isItemLoading == isItemLoading));
}
@override
int get hashCode => Object.hash(
runtimeType,
working,
scInstalledPath,
rsiLauncherInstalledPath,
const DeepCollectionEquality().hash(scInstallPaths),
const DeepCollectionEquality().hash(rsiLauncherInstallPaths),
const DeepCollectionEquality().hash(items),
isItemLoading);
@override
String toString() {
return 'ToolsUIState(working: $working, scInstalledPath: $scInstalledPath, rsiLauncherInstalledPath: $rsiLauncherInstalledPath, scInstallPaths: $scInstallPaths, rsiLauncherInstallPaths: $rsiLauncherInstallPaths, items: $items, isItemLoading: $isItemLoading)';
}
}
/// @nodoc
abstract class _$$ToolsUIStateImplCopyWith<$Res>
implements $ToolsUIStateCopyWith<$Res> {
factory _$$ToolsUIStateImplCopyWith(
_$ToolsUIStateImpl value, $Res Function(_$ToolsUIStateImpl) then) =
__$$ToolsUIStateImplCopyWithImpl<$Res>;
@override
abstract mixin class $ToolsUIStateCopyWith<$Res> {
factory $ToolsUIStateCopyWith(
ToolsUIState value, $Res Function(ToolsUIState) _then) =
_$ToolsUIStateCopyWithImpl;
@useResult
$Res call(
{bool working,
@ -123,12 +85,11 @@ abstract class _$$ToolsUIStateImplCopyWith<$Res>
}
/// @nodoc
class __$$ToolsUIStateImplCopyWithImpl<$Res>
extends _$ToolsUIStateCopyWithImpl<$Res, _$ToolsUIStateImpl>
implements _$$ToolsUIStateImplCopyWith<$Res> {
__$$ToolsUIStateImplCopyWithImpl(
_$ToolsUIStateImpl _value, $Res Function(_$ToolsUIStateImpl) _then)
: super(_value, _then);
class _$ToolsUIStateCopyWithImpl<$Res> implements $ToolsUIStateCopyWith<$Res> {
_$ToolsUIStateCopyWithImpl(this._self, this._then);
final ToolsUIState _self;
final $Res Function(ToolsUIState) _then;
/// Create a copy of ToolsUIState
/// with the given fields replaced by the non-null parameter values.
@ -143,33 +104,33 @@ class __$$ToolsUIStateImplCopyWithImpl<$Res>
Object? items = null,
Object? isItemLoading = null,
}) {
return _then(_$ToolsUIStateImpl(
return _then(_self.copyWith(
working: null == working
? _value.working
? _self.working
: working // ignore: cast_nullable_to_non_nullable
as bool,
scInstalledPath: null == scInstalledPath
? _value.scInstalledPath
? _self.scInstalledPath
: scInstalledPath // ignore: cast_nullable_to_non_nullable
as String,
rsiLauncherInstalledPath: null == rsiLauncherInstalledPath
? _value.rsiLauncherInstalledPath
? _self.rsiLauncherInstalledPath
: rsiLauncherInstalledPath // ignore: cast_nullable_to_non_nullable
as String,
scInstallPaths: null == scInstallPaths
? _value._scInstallPaths
? _self.scInstallPaths
: scInstallPaths // ignore: cast_nullable_to_non_nullable
as List<String>,
rsiLauncherInstallPaths: null == rsiLauncherInstallPaths
? _value._rsiLauncherInstallPaths
? _self.rsiLauncherInstallPaths
: rsiLauncherInstallPaths // ignore: cast_nullable_to_non_nullable
as List<String>,
items: null == items
? _value._items
? _self.items
: items // ignore: cast_nullable_to_non_nullable
as List<ToolsItemData>,
isItemLoading: null == isItemLoading
? _value.isItemLoading
? _self.isItemLoading
: isItemLoading // ignore: cast_nullable_to_non_nullable
as bool,
));
@ -178,8 +139,8 @@ class __$$ToolsUIStateImplCopyWithImpl<$Res>
/// @nodoc
class _$ToolsUIStateImpl implements _ToolsUIState {
_$ToolsUIStateImpl(
class _ToolsUIState implements ToolsUIState {
_ToolsUIState(
{this.working = false,
this.scInstalledPath = "",
this.rsiLauncherInstalledPath = "",
@ -232,16 +193,19 @@ class _$ToolsUIStateImpl implements _ToolsUIState {
@JsonKey()
final bool isItemLoading;
/// Create a copy of ToolsUIState
/// with the given fields replaced by the non-null parameter values.
@override
String toString() {
return 'ToolsUIState(working: $working, scInstalledPath: $scInstalledPath, rsiLauncherInstalledPath: $rsiLauncherInstalledPath, scInstallPaths: $scInstallPaths, rsiLauncherInstallPaths: $rsiLauncherInstallPaths, items: $items, isItemLoading: $isItemLoading)';
}
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$ToolsUIStateCopyWith<_ToolsUIState> get copyWith =>
__$ToolsUIStateCopyWithImpl<_ToolsUIState>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ToolsUIStateImpl &&
other is _ToolsUIState &&
(identical(other.working, working) || other.working == working) &&
(identical(other.scInstalledPath, scInstalledPath) ||
other.scInstalledPath == scInstalledPath) &&
@ -268,44 +232,82 @@ class _$ToolsUIStateImpl implements _ToolsUIState {
const DeepCollectionEquality().hash(_items),
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
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ToolsUIStateImplCopyWith<_$ToolsUIStateImpl> get copyWith =>
__$$ToolsUIStateImplCopyWithImpl<_$ToolsUIStateImpl>(this, _$identity);
$Res call({
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 {
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;
}
// dart format on

View File

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

View File

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

View File

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

9
rust/Cargo.lock generated
View File

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

View File

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

View File

@ -2,6 +2,7 @@ use std::fs::File;
use asar::{AsarReader, AsarWriter};
use tokio::fs;
use walkdir::WalkDir;
pub struct RsiLauncherAsarData {
pub asar_path: String,
@ -11,18 +12,50 @@ pub struct RsiLauncherAsarData {
impl RsiLauncherAsarData {
pub async fn write_main_js(&self, content: Vec<u8>) -> anyhow::Result<()> {
println!("[RsiLauncherAsarData] write_main_js");
let mut asar_writer = AsarWriter::new();
let asar_mem_file = fs::read(self.asar_path.clone()).await?;
let asar = AsarReader::new(&asar_mem_file, None)?;
let symlink_path = format!("{}.unpacked", self.asar_path);
asar.files().iter().for_each(|v| {
let (path, file) = v;
let path_string = path.clone().into_os_string().into_string().unwrap();
if path_string == self.main_js_path {
asar_writer.write_file(path, &content, true).unwrap();
} 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
fs::remove_file(&self.asar_path).await?;
// 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_content,
})
}
}