mirror of
https://ghfast.top/https://github.com/StarCitizenToolBox/app.git
synced 2025-06-28 07:54:44 +08:00
bump: Flutter 3.32.1 Rust 1.87.0
fix: rsi launcher patch 2.4.0
This commit is contained in:
@ -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\"\""]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
Reference in New Issue
Block a user