From 5d735632bffea5aa0b07f918898ae7b6e4ebc8c0 Mon Sep 17 00:00:00 2001 From: xkeyC <3334969096@qq.com> Date: Sat, 31 May 2025 17:27:21 +0800 Subject: [PATCH] bump: Flutter 3.32.1 Rust 1.87.0 fix: rsi launcher patch 2.4.0 --- flutter_rust_bridge.yaml | 3 +- lib/app.dart | 4 +- lib/app.freezed.dart | 704 +-- lib/common/helper/system_helper.dart | 73 +- lib/common/utils/multi_window_manager.dart | 2 +- .../utils/multi_window_manager.freezed.dart | 290 +- lib/common/utils/multi_window_manager.g.dart | 9 +- lib/data/nav_api_data.dart | 22 +- lib/data/nav_api_data.freezed.dart | 4298 ++++++++--------- lib/data/nav_api_data.g.dart | 233 +- lib/provider/aria2c.dart | 2 +- lib/provider/aria2c.freezed.dart | 300 +- lib/provider/unp4kc.dart | 2 +- lib/provider/unp4kc.freezed.dart | 300 +- .../home_game_login_dialog_ui_model.dart | 2 +- ...me_game_login_dialog_ui_model.freezed.dart | 343 +- .../downloader/home_downloader_ui_model.dart | 2 +- .../home_downloader_ui_model.freezed.dart | 227 +- .../game_doctor/game_doctor_ui_model.dart | 2 +- .../game_doctor_ui_model.freezed.dart | 249 +- lib/ui/home/home_ui_model.dart | 2 +- lib/ui/home/home_ui_model.freezed.dart | 437 +- .../input_method_dialog_ui_model.dart | 2 +- .../input_method_dialog_ui_model.freezed.dart | 252 +- lib/ui/home/input_method/server.dart | 2 +- lib/ui/home/input_method/server.freezed.dart | 257 +- .../advanced_localization_ui_model.dart | 2 +- ...dvanced_localization_ui_model.freezed.dart | 347 +- .../localization/localization_ui_model.dart | 2 +- .../localization_ui_model.freezed.dart | 324 +- .../performance/performance_ui_model.dart | 2 +- .../performance_ui_model.freezed.dart | 231 +- lib/ui/nav/nav_state.dart | 2 +- lib/ui/nav/nav_state.freezed.dart | 167 +- lib/ui/settings/settings_ui_model.dart | 2 +- .../settings/settings_ui_model.freezed.dart | 423 +- .../rsi_launcher_enhance_dialog_ui.dart | 208 +- ...si_launcher_enhance_dialog_ui.freezed.dart | 263 +- .../log_analyze_ui/log_analyze_provider.dart | 2 +- .../log_analyze_provider.freezed.dart | 208 +- lib/ui/tools/tools_ui_model.dart | 2 +- lib/ui/tools/tools_ui_model.freezed.dart | 288 +- packages/sct_dev_tools/pubspec.yaml | 2 +- pubspec.lock | 137 +- pubspec.yaml | 13 +- rust/Cargo.lock | 9 +- rust/Cargo.toml | 4 +- rust/src/api/asar_api.rs | 37 +- 48 files changed, 5239 insertions(+), 5455 deletions(-) diff --git a/flutter_rust_bridge.yaml b/flutter_rust_bridge.yaml index bf091fc..a5581b5 100644 --- a/flutter_rust_bridge.yaml +++ b/flutter_rust_bridge.yaml @@ -1,4 +1,5 @@ rust_input: rust/src/api/**/*.rs dart_output: lib/common/rust/ full_dep: true -web: false \ No newline at end of file +web: false +enable_lifetime: true \ No newline at end of file diff --git a/lib/app.dart b/lib/app.dart index d72dc22..ee83dc6 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -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, diff --git a/lib/app.freezed.dart b/lib/app.freezed.dart index a57de0f..1d47412 100644 --- a/lib/app.freezed.dart +++ b/lib/app.freezed.dart @@ -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 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? 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 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? 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?, - ) 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? 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?, - )); - } -} - -/// @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? appConfBox; - - @override - String toString() { - return 'AppGlobalState(deviceUUID: $deviceUUID, applicationSupportDir: $applicationSupportDir, applicationBinaryModuleDir: $applicationBinaryModuleDir, networkVersionData: $networkVersionData, themeConf: $themeConf, appLocale: $appLocale, appConfBox: $appConfBox)'; - } + _$AppGlobalStateCopyWithImpl( + 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? 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? 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 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 get copyWith => + _$ThemeConfCopyWithImpl(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 diff --git a/lib/common/helper/system_helper.dart b/lib/common/helper/system_helper.dart index e926466..e83ee59 100644 --- a/lib/common/helper/system_helper.dart +++ b/lib/common/helper/system_helper.dart @@ -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 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> 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 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 getSystemCimInstance(String win32InstanceName, - {pathName = "Name"}) async { - final r = await Process.run( - powershellPath, ["(Get-CimInstance $win32InstanceName).$pathName"]); + static Future getSystemCimInstance(String win32InstanceName, {pathName = "Name"}) async { + final r = await Process.run(powershellPath, ["(Get-CimInstance $win32InstanceName).$pathName"]); return r.stdout.toString().trim(); } static Future 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 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 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 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 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\"\""]); } } diff --git a/lib/common/utils/multi_window_manager.dart b/lib/common/utils/multi_window_manager.dart index 79be9ba..5698357 100644 --- a/lib/common/utils/multi_window_manager.dart +++ b/lib/common/utils/multi_window_manager.dart @@ -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, diff --git a/lib/common/utils/multi_window_manager.freezed.dart b/lib/common/utils/multi_window_manager.freezed.dart index 79e0cf1..bc0d33d 100644 --- a/lib/common/utils/multi_window_manager.freezed.dart +++ b/lib/common/utils/multi_window_manager.freezed.dart @@ -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 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 json) { - return _MultiWindowAppState.fromJson(json); -} - /// @nodoc mixin _$MultiWindowAppState { - String get backgroundColor => throw _privateConstructorUsedError; - String get menuColor => throw _privateConstructorUsedError; - String get micaColor => throw _privateConstructorUsedError; - List get gameInstallPaths => throw _privateConstructorUsedError; - String? get languageCode => throw _privateConstructorUsedError; - String? get countryCode => throw _privateConstructorUsedError; - - /// Serializes this MultiWindowAppState to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String get backgroundColor; + String get menuColor; + String get micaColor; + List 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 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 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 get copyWith => + _$MultiWindowAppStateCopyWithImpl( + this as MultiWindowAppState, _$identity); + + /// Serializes this MultiWindowAppState to a JSON map. + Map 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, - 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, 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 json) => - _$$MultiWindowAppStateImplFromJson(json); + factory _MultiWindowAppState.fromJson(Map 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 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 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 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 gameInstallPaths, + String? languageCode, + String? countryCode}); +} - factory _MultiWindowAppState.fromJson(Map 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 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, + 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 diff --git a/lib/common/utils/multi_window_manager.g.dart b/lib/common/utils/multi_window_manager.g.dart index 851f7d6..a703c27 100644 --- a/lib/common/utils/multi_window_manager.g.dart +++ b/lib/common/utils/multi_window_manager.g.dart @@ -6,9 +6,8 @@ part of 'multi_window_manager.dart'; // JsonSerializableGenerator // ************************************************************************** -_$MultiWindowAppStateImpl _$$MultiWindowAppStateImplFromJson( - Map json) => - _$MultiWindowAppStateImpl( +_MultiWindowAppState _$MultiWindowAppStateFromJson(Map 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 _$$MultiWindowAppStateImplToJson( - _$MultiWindowAppStateImpl instance) => +Map _$MultiWindowAppStateToJson( + _MultiWindowAppState instance) => { 'backgroundColor': instance.backgroundColor, 'menuColor': instance.menuColor, diff --git a/lib/data/nav_api_data.dart b/lib/data/nav_api_data.dart index 4229039..0e5f6cf 100644 --- a/lib/data/nav_api_data.dart +++ b/lib/data/nav_api_data.dart @@ -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([]) @JsonKey(name: 'docs') diff --git a/lib/data/nav_api_data.freezed.dart b/lib/data/nav_api_data.freezed.dart index 1fd55ae..06b5224 100644 --- a/lib/data/nav_api_data.freezed.dart +++ b/lib/data/nav_api_data.freezed.dart @@ -1,3 +1,4 @@ +// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint @@ -9,56 +10,95 @@ part of 'nav_api_data.dart'; // FreezedGenerator // ************************************************************************** +// dart format off T _$identity(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'); - -NavApiDocsItemData _$NavApiDocsItemDataFromJson(Map json) { - return _NavApiDocsItemData.fromJson(json); -} - /// @nodoc mixin _$NavApiDocsItemData { @JsonKey(name: 'id') - String get id => throw _privateConstructorUsedError; + String get id; @JsonKey(name: 'name') - String get name => throw _privateConstructorUsedError; + String get name; @JsonKey(name: 'slug') - String get slug => throw _privateConstructorUsedError; + String get slug; @JsonKey(name: 'abstract') - String get abstract_ => throw _privateConstructorUsedError; + String get abstract_; @JsonKey(name: 'description') - String get description => throw _privateConstructorUsedError; + String get description; @JsonKey(name: 'image') - NavApiDocsItemImageData get image => throw _privateConstructorUsedError; + NavApiDocsItemImageData get image; @JsonKey(name: 'link') - String get link => throw _privateConstructorUsedError; + String get link; @JsonKey(name: 'is_sponsored') - bool get isSponsored => throw _privateConstructorUsedError; + bool get isSponsored; @JsonKey(name: 'tags') - List get tags => - throw _privateConstructorUsedError; + List get tags; @JsonKey(name: 'updatedAt') - String get updatedAt => throw _privateConstructorUsedError; + String get updatedAt; @JsonKey(name: 'createdAt') - String get createdAt => throw _privateConstructorUsedError; - - /// Serializes this NavApiDocsItemData to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String get createdAt; /// Create a copy of NavApiDocsItemData /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $NavApiDocsItemDataCopyWith get copyWith => - throw _privateConstructorUsedError; + _$NavApiDocsItemDataCopyWithImpl( + this as NavApiDocsItemData, _$identity); + + /// Serializes this NavApiDocsItemData to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is NavApiDocsItemData && + (identical(other.id, id) || other.id == id) && + (identical(other.name, name) || other.name == name) && + (identical(other.slug, slug) || other.slug == slug) && + (identical(other.abstract_, abstract_) || + other.abstract_ == abstract_) && + (identical(other.description, description) || + other.description == description) && + (identical(other.image, image) || other.image == image) && + (identical(other.link, link) || other.link == link) && + (identical(other.isSponsored, isSponsored) || + other.isSponsored == isSponsored) && + const DeepCollectionEquality().equals(other.tags, tags) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + id, + name, + slug, + abstract_, + description, + image, + link, + isSponsored, + const DeepCollectionEquality().hash(tags), + updatedAt, + createdAt); + + @override + String toString() { + return 'NavApiDocsItemData(id: $id, name: $name, slug: $slug, abstract_: $abstract_, description: $description, image: $image, link: $link, isSponsored: $isSponsored, tags: $tags, updatedAt: $updatedAt, createdAt: $createdAt)'; + } } /// @nodoc -abstract class $NavApiDocsItemDataCopyWith<$Res> { +abstract mixin class $NavApiDocsItemDataCopyWith<$Res> { factory $NavApiDocsItemDataCopyWith( - NavApiDocsItemData value, $Res Function(NavApiDocsItemData) then) = - _$NavApiDocsItemDataCopyWithImpl<$Res, NavApiDocsItemData>; + NavApiDocsItemData value, $Res Function(NavApiDocsItemData) _then) = + _$NavApiDocsItemDataCopyWithImpl; @useResult $Res call( {@JsonKey(name: 'id') String id, @@ -77,14 +117,12 @@ abstract class $NavApiDocsItemDataCopyWith<$Res> { } /// @nodoc -class _$NavApiDocsItemDataCopyWithImpl<$Res, $Val extends NavApiDocsItemData> +class _$NavApiDocsItemDataCopyWithImpl<$Res> implements $NavApiDocsItemDataCopyWith<$Res> { - _$NavApiDocsItemDataCopyWithImpl(this._value, this._then); + _$NavApiDocsItemDataCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final NavApiDocsItemData _self; + final $Res Function(NavApiDocsItemData) _then; /// Create a copy of NavApiDocsItemData /// with the given fields replaced by the non-null parameter values. @@ -103,52 +141,52 @@ class _$NavApiDocsItemDataCopyWithImpl<$Res, $Val extends NavApiDocsItemData> Object? updatedAt = null, Object? createdAt = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( id: null == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as String, name: null == name - ? _value.name + ? _self.name : name // ignore: cast_nullable_to_non_nullable as String, slug: null == slug - ? _value.slug + ? _self.slug : slug // ignore: cast_nullable_to_non_nullable as String, abstract_: null == abstract_ - ? _value.abstract_ + ? _self.abstract_ : abstract_ // ignore: cast_nullable_to_non_nullable as String, description: null == description - ? _value.description + ? _self.description : description // ignore: cast_nullable_to_non_nullable as String, image: null == image - ? _value.image + ? _self.image : image // ignore: cast_nullable_to_non_nullable as NavApiDocsItemImageData, link: null == link - ? _value.link + ? _self.link : link // ignore: cast_nullable_to_non_nullable as String, isSponsored: null == isSponsored - ? _value.isSponsored + ? _self.isSponsored : isSponsored // ignore: cast_nullable_to_non_nullable as bool, tags: null == tags - ? _value.tags + ? _self.tags : tags // ignore: cast_nullable_to_non_nullable as List, updatedAt: null == updatedAt - ? _value.updatedAt + ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as String, createdAt: null == createdAt - ? _value.createdAt + ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as String, - ) as $Val); + )); } /// Create a copy of NavApiDocsItemData @@ -156,115 +194,16 @@ class _$NavApiDocsItemDataCopyWithImpl<$Res, $Val extends NavApiDocsItemData> @override @pragma('vm:prefer-inline') $NavApiDocsItemImageDataCopyWith<$Res> get image { - return $NavApiDocsItemImageDataCopyWith<$Res>(_value.image, (value) { - return _then(_value.copyWith(image: value) as $Val); + return $NavApiDocsItemImageDataCopyWith<$Res>(_self.image, (value) { + return _then(_self.copyWith(image: value)); }); } } -/// @nodoc -abstract class _$$NavApiDocsItemDataImplCopyWith<$Res> - implements $NavApiDocsItemDataCopyWith<$Res> { - factory _$$NavApiDocsItemDataImplCopyWith(_$NavApiDocsItemDataImpl value, - $Res Function(_$NavApiDocsItemDataImpl) then) = - __$$NavApiDocsItemDataImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {@JsonKey(name: 'id') String id, - @JsonKey(name: 'name') String name, - @JsonKey(name: 'slug') String slug, - @JsonKey(name: 'abstract') String abstract_, - @JsonKey(name: 'description') String description, - @JsonKey(name: 'image') NavApiDocsItemImageData image, - @JsonKey(name: 'link') String link, - @JsonKey(name: 'is_sponsored') bool isSponsored, - @JsonKey(name: 'tags') List tags, - @JsonKey(name: 'updatedAt') String updatedAt, - @JsonKey(name: 'createdAt') String createdAt}); - - @override - $NavApiDocsItemImageDataCopyWith<$Res> get image; -} - -/// @nodoc -class __$$NavApiDocsItemDataImplCopyWithImpl<$Res> - extends _$NavApiDocsItemDataCopyWithImpl<$Res, _$NavApiDocsItemDataImpl> - implements _$$NavApiDocsItemDataImplCopyWith<$Res> { - __$$NavApiDocsItemDataImplCopyWithImpl(_$NavApiDocsItemDataImpl _value, - $Res Function(_$NavApiDocsItemDataImpl) _then) - : super(_value, _then); - - /// Create a copy of NavApiDocsItemData - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? name = null, - Object? slug = null, - Object? abstract_ = null, - Object? description = null, - Object? image = null, - Object? link = null, - Object? isSponsored = null, - Object? tags = null, - Object? updatedAt = null, - Object? createdAt = null, - }) { - return _then(_$NavApiDocsItemDataImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - slug: null == slug - ? _value.slug - : slug // ignore: cast_nullable_to_non_nullable - as String, - abstract_: null == abstract_ - ? _value.abstract_ - : abstract_ // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - image: null == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as NavApiDocsItemImageData, - link: null == link - ? _value.link - : link // ignore: cast_nullable_to_non_nullable - as String, - isSponsored: null == isSponsored - ? _value.isSponsored - : isSponsored // ignore: cast_nullable_to_non_nullable - as bool, - tags: null == tags - ? _value._tags - : tags // ignore: cast_nullable_to_non_nullable - as List, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as String, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - /// @nodoc @JsonSerializable() -class _$NavApiDocsItemDataImpl extends _NavApiDocsItemData { - const _$NavApiDocsItemDataImpl( +class _NavApiDocsItemData extends NavApiDocsItemData { + const _NavApiDocsItemData( {@JsonKey(name: 'id') this.id = '', @JsonKey(name: 'name') this.name = '', @JsonKey(name: 'slug') this.slug = '', @@ -279,9 +218,8 @@ class _$NavApiDocsItemDataImpl extends _NavApiDocsItemData { @JsonKey(name: 'createdAt') this.createdAt = ''}) : _tags = tags, super._(); - - factory _$NavApiDocsItemDataImpl.fromJson(Map json) => - _$$NavApiDocsItemDataImplFromJson(json); + factory _NavApiDocsItemData.fromJson(Map json) => + _$NavApiDocsItemDataFromJson(json); @override @JsonKey(name: 'id') @@ -323,16 +261,26 @@ class _$NavApiDocsItemDataImpl extends _NavApiDocsItemData { @JsonKey(name: 'createdAt') final String createdAt; + /// Create a copy of NavApiDocsItemData + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'NavApiDocsItemData(id: $id, name: $name, slug: $slug, abstract_: $abstract_, description: $description, image: $image, link: $link, isSponsored: $isSponsored, tags: $tags, updatedAt: $updatedAt, createdAt: $createdAt)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$NavApiDocsItemDataCopyWith<_NavApiDocsItemData> get copyWith => + __$NavApiDocsItemDataCopyWithImpl<_NavApiDocsItemData>(this, _$identity); + + @override + Map toJson() { + return _$NavApiDocsItemDataToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$NavApiDocsItemDataImpl && + other is _NavApiDocsItemData && (identical(other.id, id) || other.id == id) && (identical(other.name, name) || other.name == name) && (identical(other.slug, slug) || other.slug == slug) && @@ -367,142 +315,233 @@ class _$NavApiDocsItemDataImpl extends _NavApiDocsItemData { updatedAt, createdAt); - /// Create a copy of NavApiDocsItemData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$NavApiDocsItemDataImplCopyWith<_$NavApiDocsItemDataImpl> get copyWith => - __$$NavApiDocsItemDataImplCopyWithImpl<_$NavApiDocsItemDataImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$NavApiDocsItemDataImplToJson( - this, - ); + String toString() { + return 'NavApiDocsItemData(id: $id, name: $name, slug: $slug, abstract_: $abstract_, description: $description, image: $image, link: $link, isSponsored: $isSponsored, tags: $tags, updatedAt: $updatedAt, createdAt: $createdAt)'; } } -abstract class _NavApiDocsItemData extends NavApiDocsItemData { - const factory _NavApiDocsItemData( - {@JsonKey(name: 'id') final String id, - @JsonKey(name: 'name') final String name, - @JsonKey(name: 'slug') final String slug, - @JsonKey(name: 'abstract') final String abstract_, - @JsonKey(name: 'description') final String description, - @JsonKey(name: 'image') final NavApiDocsItemImageData image, - @JsonKey(name: 'link') final String link, - @JsonKey(name: 'is_sponsored') final bool isSponsored, - @JsonKey(name: 'tags') final List tags, - @JsonKey(name: 'updatedAt') final String updatedAt, - @JsonKey(name: 'createdAt') final String createdAt}) = - _$NavApiDocsItemDataImpl; - const _NavApiDocsItemData._() : super._(); - - factory _NavApiDocsItemData.fromJson(Map json) = - _$NavApiDocsItemDataImpl.fromJson; +/// @nodoc +abstract mixin class _$NavApiDocsItemDataCopyWith<$Res> + implements $NavApiDocsItemDataCopyWith<$Res> { + factory _$NavApiDocsItemDataCopyWith( + _NavApiDocsItemData value, $Res Function(_NavApiDocsItemData) _then) = + __$NavApiDocsItemDataCopyWithImpl; + @override + @useResult + $Res call( + {@JsonKey(name: 'id') String id, + @JsonKey(name: 'name') String name, + @JsonKey(name: 'slug') String slug, + @JsonKey(name: 'abstract') String abstract_, + @JsonKey(name: 'description') String description, + @JsonKey(name: 'image') NavApiDocsItemImageData image, + @JsonKey(name: 'link') String link, + @JsonKey(name: 'is_sponsored') bool isSponsored, + @JsonKey(name: 'tags') List tags, + @JsonKey(name: 'updatedAt') String updatedAt, + @JsonKey(name: 'createdAt') String createdAt}); @override - @JsonKey(name: 'id') - String get id; - @override - @JsonKey(name: 'name') - String get name; - @override - @JsonKey(name: 'slug') - String get slug; - @override - @JsonKey(name: 'abstract') - String get abstract_; - @override - @JsonKey(name: 'description') - String get description; - @override - @JsonKey(name: 'image') - NavApiDocsItemImageData get image; - @override - @JsonKey(name: 'link') - String get link; - @override - @JsonKey(name: 'is_sponsored') - bool get isSponsored; - @override - @JsonKey(name: 'tags') - List get tags; - @override - @JsonKey(name: 'updatedAt') - String get updatedAt; - @override - @JsonKey(name: 'createdAt') - String get createdAt; + $NavApiDocsItemImageDataCopyWith<$Res> get image; +} + +/// @nodoc +class __$NavApiDocsItemDataCopyWithImpl<$Res> + implements _$NavApiDocsItemDataCopyWith<$Res> { + __$NavApiDocsItemDataCopyWithImpl(this._self, this._then); + + final _NavApiDocsItemData _self; + final $Res Function(_NavApiDocsItemData) _then; /// Create a copy of NavApiDocsItemData /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$NavApiDocsItemDataImplCopyWith<_$NavApiDocsItemDataImpl> get copyWith => - throw _privateConstructorUsedError; -} + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? name = null, + Object? slug = null, + Object? abstract_ = null, + Object? description = null, + Object? image = null, + Object? link = null, + Object? isSponsored = null, + Object? tags = null, + Object? updatedAt = null, + Object? createdAt = null, + }) { + return _then(_NavApiDocsItemData( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as String, + name: null == name + ? _self.name + : name // ignore: cast_nullable_to_non_nullable + as String, + slug: null == slug + ? _self.slug + : slug // ignore: cast_nullable_to_non_nullable + as String, + abstract_: null == abstract_ + ? _self.abstract_ + : abstract_ // ignore: cast_nullable_to_non_nullable + as String, + description: null == description + ? _self.description + : description // ignore: cast_nullable_to_non_nullable + as String, + image: null == image + ? _self.image + : image // ignore: cast_nullable_to_non_nullable + as NavApiDocsItemImageData, + link: null == link + ? _self.link + : link // ignore: cast_nullable_to_non_nullable + as String, + isSponsored: null == isSponsored + ? _self.isSponsored + : isSponsored // ignore: cast_nullable_to_non_nullable + as bool, + tags: null == tags + ? _self._tags + : tags // ignore: cast_nullable_to_non_nullable + as List, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as String, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as String, + )); + } -NavApiDocsItemImageData _$NavApiDocsItemImageDataFromJson( - Map json) { - return _NavApiDocsItemImageData.fromJson(json); + /// Create a copy of NavApiDocsItemData + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $NavApiDocsItemImageDataCopyWith<$Res> get image { + return $NavApiDocsItemImageDataCopyWith<$Res>(_self.image, (value) { + return _then(_self.copyWith(image: value)); + }); + } } /// @nodoc mixin _$NavApiDocsItemImageData { @JsonKey(name: 'id') - String get id => throw _privateConstructorUsedError; + String get id; @JsonKey(name: 'createdBy') - NavApiDocsItemImageCreatedByData get createdBy => - throw _privateConstructorUsedError; + NavApiDocsItemImageCreatedByData get createdBy; @JsonKey(name: 'title') - String get title => throw _privateConstructorUsedError; + String get title; @JsonKey(name: 'original') - bool get original => throw _privateConstructorUsedError; + bool get original; @JsonKey(name: 'credit') - String get credit => throw _privateConstructorUsedError; + String get credit; @JsonKey(name: 'source') - String get source => throw _privateConstructorUsedError; + String get source; @JsonKey(name: 'license') - String get license => throw _privateConstructorUsedError; + String get license; @JsonKey(name: 'caption') - dynamic get caption => throw _privateConstructorUsedError; + dynamic get caption; @JsonKey(name: 'updatedAt') - String get updatedAt => throw _privateConstructorUsedError; + String get updatedAt; @JsonKey(name: 'createdAt') - String get createdAt => throw _privateConstructorUsedError; + String get createdAt; @JsonKey(name: 'url') - String get url => throw _privateConstructorUsedError; + String get url; @JsonKey(name: 'filename') - String get filename => throw _privateConstructorUsedError; + String get filename; @JsonKey(name: 'mimeType') - String get mimeType => throw _privateConstructorUsedError; + String get mimeType; @JsonKey(name: 'filesize') - int get filesize => throw _privateConstructorUsedError; + int get filesize; @JsonKey(name: 'width') - int get width => throw _privateConstructorUsedError; + int get width; @JsonKey(name: 'height') - int get height => throw _privateConstructorUsedError; + int get height; @JsonKey(name: 'sizes') - NavApiDocsItemImageSizesData get sizes => throw _privateConstructorUsedError; - - /// Serializes this NavApiDocsItemImageData to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + NavApiDocsItemImageSizesData get sizes; /// Create a copy of NavApiDocsItemImageData /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $NavApiDocsItemImageDataCopyWith get copyWith => - throw _privateConstructorUsedError; + _$NavApiDocsItemImageDataCopyWithImpl( + this as NavApiDocsItemImageData, _$identity); + + /// Serializes this NavApiDocsItemImageData to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is NavApiDocsItemImageData && + (identical(other.id, id) || other.id == id) && + (identical(other.createdBy, createdBy) || + other.createdBy == createdBy) && + (identical(other.title, title) || other.title == title) && + (identical(other.original, original) || + other.original == original) && + (identical(other.credit, credit) || other.credit == credit) && + (identical(other.source, source) || other.source == source) && + (identical(other.license, license) || other.license == license) && + const DeepCollectionEquality().equals(other.caption, caption) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.url, url) || other.url == url) && + (identical(other.filename, filename) || + other.filename == filename) && + (identical(other.mimeType, mimeType) || + other.mimeType == mimeType) && + (identical(other.filesize, filesize) || + other.filesize == filesize) && + (identical(other.width, width) || other.width == width) && + (identical(other.height, height) || other.height == height) && + (identical(other.sizes, sizes) || other.sizes == sizes)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + id, + createdBy, + title, + original, + credit, + source, + license, + const DeepCollectionEquality().hash(caption), + updatedAt, + createdAt, + url, + filename, + mimeType, + filesize, + width, + height, + sizes); + + @override + String toString() { + return 'NavApiDocsItemImageData(id: $id, createdBy: $createdBy, title: $title, original: $original, credit: $credit, source: $source, license: $license, caption: $caption, updatedAt: $updatedAt, createdAt: $createdAt, url: $url, filename: $filename, mimeType: $mimeType, filesize: $filesize, width: $width, height: $height, sizes: $sizes)'; + } } /// @nodoc -abstract class $NavApiDocsItemImageDataCopyWith<$Res> { +abstract mixin class $NavApiDocsItemImageDataCopyWith<$Res> { factory $NavApiDocsItemImageDataCopyWith(NavApiDocsItemImageData value, - $Res Function(NavApiDocsItemImageData) then) = - _$NavApiDocsItemImageDataCopyWithImpl<$Res, NavApiDocsItemImageData>; + $Res Function(NavApiDocsItemImageData) _then) = + _$NavApiDocsItemImageDataCopyWithImpl; @useResult $Res call( {@JsonKey(name: 'id') String id, @@ -528,15 +567,12 @@ abstract class $NavApiDocsItemImageDataCopyWith<$Res> { } /// @nodoc -class _$NavApiDocsItemImageDataCopyWithImpl<$Res, - $Val extends NavApiDocsItemImageData> +class _$NavApiDocsItemImageDataCopyWithImpl<$Res> implements $NavApiDocsItemImageDataCopyWith<$Res> { - _$NavApiDocsItemImageDataCopyWithImpl(this._value, this._then); + _$NavApiDocsItemImageDataCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final NavApiDocsItemImageData _self; + final $Res Function(NavApiDocsItemImageData) _then; /// Create a copy of NavApiDocsItemImageData /// with the given fields replaced by the non-null parameter values. @@ -561,76 +597,76 @@ class _$NavApiDocsItemImageDataCopyWithImpl<$Res, Object? height = null, Object? sizes = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( id: null == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as String, createdBy: null == createdBy - ? _value.createdBy + ? _self.createdBy : createdBy // ignore: cast_nullable_to_non_nullable as NavApiDocsItemImageCreatedByData, title: null == title - ? _value.title + ? _self.title : title // ignore: cast_nullable_to_non_nullable as String, original: null == original - ? _value.original + ? _self.original : original // ignore: cast_nullable_to_non_nullable as bool, credit: null == credit - ? _value.credit + ? _self.credit : credit // ignore: cast_nullable_to_non_nullable as String, source: null == source - ? _value.source + ? _self.source : source // ignore: cast_nullable_to_non_nullable as String, license: null == license - ? _value.license + ? _self.license : license // ignore: cast_nullable_to_non_nullable as String, caption: freezed == caption - ? _value.caption + ? _self.caption : caption // ignore: cast_nullable_to_non_nullable as dynamic, updatedAt: null == updatedAt - ? _value.updatedAt + ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as String, createdAt: null == createdAt - ? _value.createdAt + ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as String, url: null == url - ? _value.url + ? _self.url : url // ignore: cast_nullable_to_non_nullable as String, filename: null == filename - ? _value.filename + ? _self.filename : filename // ignore: cast_nullable_to_non_nullable as String, mimeType: null == mimeType - ? _value.mimeType + ? _self.mimeType : mimeType // ignore: cast_nullable_to_non_nullable as String, filesize: null == filesize - ? _value.filesize + ? _self.filesize : filesize // ignore: cast_nullable_to_non_nullable as int, width: null == width - ? _value.width + ? _self.width : width // ignore: cast_nullable_to_non_nullable as int, height: null == height - ? _value.height + ? _self.height : height // ignore: cast_nullable_to_non_nullable as int, sizes: null == sizes - ? _value.sizes + ? _self.sizes : sizes // ignore: cast_nullable_to_non_nullable as NavApiDocsItemImageSizesData, - ) as $Val); + )); } /// Create a copy of NavApiDocsItemImageData @@ -638,9 +674,9 @@ class _$NavApiDocsItemImageDataCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $NavApiDocsItemImageCreatedByDataCopyWith<$Res> get createdBy { - return $NavApiDocsItemImageCreatedByDataCopyWith<$Res>(_value.createdBy, + return $NavApiDocsItemImageCreatedByDataCopyWith<$Res>(_self.createdBy, (value) { - return _then(_value.copyWith(createdBy: value) as $Val); + return _then(_self.copyWith(createdBy: value)); }); } @@ -649,156 +685,16 @@ class _$NavApiDocsItemImageDataCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $NavApiDocsItemImageSizesDataCopyWith<$Res> get sizes { - return $NavApiDocsItemImageSizesDataCopyWith<$Res>(_value.sizes, (value) { - return _then(_value.copyWith(sizes: value) as $Val); + return $NavApiDocsItemImageSizesDataCopyWith<$Res>(_self.sizes, (value) { + return _then(_self.copyWith(sizes: value)); }); } } -/// @nodoc -abstract class _$$NavApiDocsItemImageDataImplCopyWith<$Res> - implements $NavApiDocsItemImageDataCopyWith<$Res> { - factory _$$NavApiDocsItemImageDataImplCopyWith( - _$NavApiDocsItemImageDataImpl value, - $Res Function(_$NavApiDocsItemImageDataImpl) then) = - __$$NavApiDocsItemImageDataImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {@JsonKey(name: 'id') String id, - @JsonKey(name: 'createdBy') NavApiDocsItemImageCreatedByData createdBy, - @JsonKey(name: 'title') String title, - @JsonKey(name: 'original') bool original, - @JsonKey(name: 'credit') String credit, - @JsonKey(name: 'source') String source, - @JsonKey(name: 'license') String license, - @JsonKey(name: 'caption') dynamic caption, - @JsonKey(name: 'updatedAt') String updatedAt, - @JsonKey(name: 'createdAt') String createdAt, - @JsonKey(name: 'url') String url, - @JsonKey(name: 'filename') String filename, - @JsonKey(name: 'mimeType') String mimeType, - @JsonKey(name: 'filesize') int filesize, - @JsonKey(name: 'width') int width, - @JsonKey(name: 'height') int height, - @JsonKey(name: 'sizes') NavApiDocsItemImageSizesData sizes}); - - @override - $NavApiDocsItemImageCreatedByDataCopyWith<$Res> get createdBy; - @override - $NavApiDocsItemImageSizesDataCopyWith<$Res> get sizes; -} - -/// @nodoc -class __$$NavApiDocsItemImageDataImplCopyWithImpl<$Res> - extends _$NavApiDocsItemImageDataCopyWithImpl<$Res, - _$NavApiDocsItemImageDataImpl> - implements _$$NavApiDocsItemImageDataImplCopyWith<$Res> { - __$$NavApiDocsItemImageDataImplCopyWithImpl( - _$NavApiDocsItemImageDataImpl _value, - $Res Function(_$NavApiDocsItemImageDataImpl) _then) - : super(_value, _then); - - /// Create a copy of NavApiDocsItemImageData - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? createdBy = null, - Object? title = null, - Object? original = null, - Object? credit = null, - Object? source = null, - Object? license = null, - Object? caption = freezed, - Object? updatedAt = null, - Object? createdAt = null, - Object? url = null, - Object? filename = null, - Object? mimeType = null, - Object? filesize = null, - Object? width = null, - Object? height = null, - Object? sizes = null, - }) { - return _then(_$NavApiDocsItemImageDataImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - createdBy: null == createdBy - ? _value.createdBy - : createdBy // ignore: cast_nullable_to_non_nullable - as NavApiDocsItemImageCreatedByData, - title: null == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String, - original: null == original - ? _value.original - : original // ignore: cast_nullable_to_non_nullable - as bool, - credit: null == credit - ? _value.credit - : credit // ignore: cast_nullable_to_non_nullable - as String, - source: null == source - ? _value.source - : source // ignore: cast_nullable_to_non_nullable - as String, - license: null == license - ? _value.license - : license // ignore: cast_nullable_to_non_nullable - as String, - caption: freezed == caption - ? _value.caption - : caption // ignore: cast_nullable_to_non_nullable - as dynamic, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as String, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as String, - url: null == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String, - filename: null == filename - ? _value.filename - : filename // ignore: cast_nullable_to_non_nullable - as String, - mimeType: null == mimeType - ? _value.mimeType - : mimeType // ignore: cast_nullable_to_non_nullable - as String, - filesize: null == filesize - ? _value.filesize - : filesize // ignore: cast_nullable_to_non_nullable - as int, - width: null == width - ? _value.width - : width // ignore: cast_nullable_to_non_nullable - as int, - height: null == height - ? _value.height - : height // ignore: cast_nullable_to_non_nullable - as int, - sizes: null == sizes - ? _value.sizes - : sizes // ignore: cast_nullable_to_non_nullable - as NavApiDocsItemImageSizesData, - )); - } -} - /// @nodoc @JsonSerializable() -class _$NavApiDocsItemImageDataImpl extends _NavApiDocsItemImageData { - const _$NavApiDocsItemImageDataImpl( +class _NavApiDocsItemImageData extends NavApiDocsItemImageData { + const _NavApiDocsItemImageData( {@JsonKey(name: 'id') this.id = '', @JsonKey(name: 'createdBy') this.createdBy = const NavApiDocsItemImageCreatedByData(), @@ -819,9 +715,8 @@ class _$NavApiDocsItemImageDataImpl extends _NavApiDocsItemImageData { @JsonKey(name: 'sizes') this.sizes = const NavApiDocsItemImageSizesData()}) : super._(); - - factory _$NavApiDocsItemImageDataImpl.fromJson(Map json) => - _$$NavApiDocsItemImageDataImplFromJson(json); + factory _NavApiDocsItemImageData.fromJson(Map json) => + _$NavApiDocsItemImageDataFromJson(json); @override @JsonKey(name: 'id') @@ -875,16 +770,27 @@ class _$NavApiDocsItemImageDataImpl extends _NavApiDocsItemImageData { @JsonKey(name: 'sizes') final NavApiDocsItemImageSizesData sizes; + /// Create a copy of NavApiDocsItemImageData + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'NavApiDocsItemImageData(id: $id, createdBy: $createdBy, title: $title, original: $original, credit: $credit, source: $source, license: $license, caption: $caption, updatedAt: $updatedAt, createdAt: $createdAt, url: $url, filename: $filename, mimeType: $mimeType, filesize: $filesize, width: $width, height: $height, sizes: $sizes)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$NavApiDocsItemImageDataCopyWith<_NavApiDocsItemImageData> get copyWith => + __$NavApiDocsItemImageDataCopyWithImpl<_NavApiDocsItemImageData>( + this, _$identity); + + @override + Map toJson() { + return _$NavApiDocsItemImageDataToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$NavApiDocsItemImageDataImpl && + other is _NavApiDocsItemImageData && (identical(other.id, id) || other.id == id) && (identical(other.createdBy, createdBy) || other.createdBy == createdBy) && @@ -933,264 +839,263 @@ class _$NavApiDocsItemImageDataImpl extends _NavApiDocsItemImageData { height, sizes); - /// Create a copy of NavApiDocsItemImageData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$NavApiDocsItemImageDataImplCopyWith<_$NavApiDocsItemImageDataImpl> - get copyWith => __$$NavApiDocsItemImageDataImplCopyWithImpl< - _$NavApiDocsItemImageDataImpl>(this, _$identity); - - @override - Map toJson() { - return _$$NavApiDocsItemImageDataImplToJson( - this, - ); + String toString() { + return 'NavApiDocsItemImageData(id: $id, createdBy: $createdBy, title: $title, original: $original, credit: $credit, source: $source, license: $license, caption: $caption, updatedAt: $updatedAt, createdAt: $createdAt, url: $url, filename: $filename, mimeType: $mimeType, filesize: $filesize, width: $width, height: $height, sizes: $sizes)'; } } -abstract class _NavApiDocsItemImageData extends NavApiDocsItemImageData { - const factory _NavApiDocsItemImageData( - {@JsonKey(name: 'id') final String id, - @JsonKey(name: 'createdBy') - final NavApiDocsItemImageCreatedByData createdBy, - @JsonKey(name: 'title') final String title, - @JsonKey(name: 'original') final bool original, - @JsonKey(name: 'credit') final String credit, - @JsonKey(name: 'source') final String source, - @JsonKey(name: 'license') final String license, - @JsonKey(name: 'caption') final dynamic caption, - @JsonKey(name: 'updatedAt') final String updatedAt, - @JsonKey(name: 'createdAt') final String createdAt, - @JsonKey(name: 'url') final String url, - @JsonKey(name: 'filename') final String filename, - @JsonKey(name: 'mimeType') final String mimeType, - @JsonKey(name: 'filesize') final int filesize, - @JsonKey(name: 'width') final int width, - @JsonKey(name: 'height') final int height, - @JsonKey(name: 'sizes') final NavApiDocsItemImageSizesData sizes}) = - _$NavApiDocsItemImageDataImpl; - const _NavApiDocsItemImageData._() : super._(); - - factory _NavApiDocsItemImageData.fromJson(Map json) = - _$NavApiDocsItemImageDataImpl.fromJson; +/// @nodoc +abstract mixin class _$NavApiDocsItemImageDataCopyWith<$Res> + implements $NavApiDocsItemImageDataCopyWith<$Res> { + factory _$NavApiDocsItemImageDataCopyWith(_NavApiDocsItemImageData value, + $Res Function(_NavApiDocsItemImageData) _then) = + __$NavApiDocsItemImageDataCopyWithImpl; + @override + @useResult + $Res call( + {@JsonKey(name: 'id') String id, + @JsonKey(name: 'createdBy') NavApiDocsItemImageCreatedByData createdBy, + @JsonKey(name: 'title') String title, + @JsonKey(name: 'original') bool original, + @JsonKey(name: 'credit') String credit, + @JsonKey(name: 'source') String source, + @JsonKey(name: 'license') String license, + @JsonKey(name: 'caption') dynamic caption, + @JsonKey(name: 'updatedAt') String updatedAt, + @JsonKey(name: 'createdAt') String createdAt, + @JsonKey(name: 'url') String url, + @JsonKey(name: 'filename') String filename, + @JsonKey(name: 'mimeType') String mimeType, + @JsonKey(name: 'filesize') int filesize, + @JsonKey(name: 'width') int width, + @JsonKey(name: 'height') int height, + @JsonKey(name: 'sizes') NavApiDocsItemImageSizesData sizes}); @override - @JsonKey(name: 'id') - String get id; + $NavApiDocsItemImageCreatedByDataCopyWith<$Res> get createdBy; @override - @JsonKey(name: 'createdBy') - NavApiDocsItemImageCreatedByData get createdBy; - @override - @JsonKey(name: 'title') - String get title; - @override - @JsonKey(name: 'original') - bool get original; - @override - @JsonKey(name: 'credit') - String get credit; - @override - @JsonKey(name: 'source') - String get source; - @override - @JsonKey(name: 'license') - String get license; - @override - @JsonKey(name: 'caption') - dynamic get caption; - @override - @JsonKey(name: 'updatedAt') - String get updatedAt; - @override - @JsonKey(name: 'createdAt') - String get createdAt; - @override - @JsonKey(name: 'url') - String get url; - @override - @JsonKey(name: 'filename') - String get filename; - @override - @JsonKey(name: 'mimeType') - String get mimeType; - @override - @JsonKey(name: 'filesize') - int get filesize; - @override - @JsonKey(name: 'width') - int get width; - @override - @JsonKey(name: 'height') - int get height; - @override - @JsonKey(name: 'sizes') - NavApiDocsItemImageSizesData get sizes; + $NavApiDocsItemImageSizesDataCopyWith<$Res> get sizes; +} + +/// @nodoc +class __$NavApiDocsItemImageDataCopyWithImpl<$Res> + implements _$NavApiDocsItemImageDataCopyWith<$Res> { + __$NavApiDocsItemImageDataCopyWithImpl(this._self, this._then); + + final _NavApiDocsItemImageData _self; + final $Res Function(_NavApiDocsItemImageData) _then; /// Create a copy of NavApiDocsItemImageData /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$NavApiDocsItemImageDataImplCopyWith<_$NavApiDocsItemImageDataImpl> - get copyWith => throw _privateConstructorUsedError; -} + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? createdBy = null, + Object? title = null, + Object? original = null, + Object? credit = null, + Object? source = null, + Object? license = null, + Object? caption = freezed, + Object? updatedAt = null, + Object? createdAt = null, + Object? url = null, + Object? filename = null, + Object? mimeType = null, + Object? filesize = null, + Object? width = null, + Object? height = null, + Object? sizes = null, + }) { + return _then(_NavApiDocsItemImageData( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as String, + createdBy: null == createdBy + ? _self.createdBy + : createdBy // ignore: cast_nullable_to_non_nullable + as NavApiDocsItemImageCreatedByData, + title: null == title + ? _self.title + : title // ignore: cast_nullable_to_non_nullable + as String, + original: null == original + ? _self.original + : original // ignore: cast_nullable_to_non_nullable + as bool, + credit: null == credit + ? _self.credit + : credit // ignore: cast_nullable_to_non_nullable + as String, + source: null == source + ? _self.source + : source // ignore: cast_nullable_to_non_nullable + as String, + license: null == license + ? _self.license + : license // ignore: cast_nullable_to_non_nullable + as String, + caption: freezed == caption + ? _self.caption + : caption // ignore: cast_nullable_to_non_nullable + as dynamic, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as String, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as String, + url: null == url + ? _self.url + : url // ignore: cast_nullable_to_non_nullable + as String, + filename: null == filename + ? _self.filename + : filename // ignore: cast_nullable_to_non_nullable + as String, + mimeType: null == mimeType + ? _self.mimeType + : mimeType // ignore: cast_nullable_to_non_nullable + as String, + filesize: null == filesize + ? _self.filesize + : filesize // ignore: cast_nullable_to_non_nullable + as int, + width: null == width + ? _self.width + : width // ignore: cast_nullable_to_non_nullable + as int, + height: null == height + ? _self.height + : height // ignore: cast_nullable_to_non_nullable + as int, + sizes: null == sizes + ? _self.sizes + : sizes // ignore: cast_nullable_to_non_nullable + as NavApiDocsItemImageSizesData, + )); + } -NavApiDocsItemImageCreatedByData _$NavApiDocsItemImageCreatedByDataFromJson( - Map json) { - return _NavApiDocsItemImageCreatedByData.fromJson(json); + /// Create a copy of NavApiDocsItemImageData + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $NavApiDocsItemImageCreatedByDataCopyWith<$Res> get createdBy { + return $NavApiDocsItemImageCreatedByDataCopyWith<$Res>(_self.createdBy, + (value) { + return _then(_self.copyWith(createdBy: value)); + }); + } + + /// Create a copy of NavApiDocsItemImageData + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $NavApiDocsItemImageSizesDataCopyWith<$Res> get sizes { + return $NavApiDocsItemImageSizesDataCopyWith<$Res>(_self.sizes, (value) { + return _then(_self.copyWith(sizes: value)); + }); + } } /// @nodoc mixin _$NavApiDocsItemImageCreatedByData { @JsonKey(name: 'id') - String get id => throw _privateConstructorUsedError; + String get id; @JsonKey(name: 'sub') - String get sub => throw _privateConstructorUsedError; + String get sub; @JsonKey(name: 'external_provider') - String get externalProvider => throw _privateConstructorUsedError; + String get externalProvider; @JsonKey(name: 'username') - String get username => throw _privateConstructorUsedError; + String get username; @JsonKey(name: 'name') - String get name => throw _privateConstructorUsedError; + String get name; @JsonKey(name: 'roles') - List get roles => throw _privateConstructorUsedError; + List get roles; @JsonKey(name: 'avatar_url') - String get avatarUrl => throw _privateConstructorUsedError; + String get avatarUrl; @JsonKey(name: 'updatedAt') - String get updatedAt => throw _privateConstructorUsedError; + String get updatedAt; @JsonKey(name: 'createdAt') - String get createdAt => throw _privateConstructorUsedError; + String get createdAt; @JsonKey(name: 'email') - String get email => throw _privateConstructorUsedError; + String get email; @JsonKey(name: 'loginAttempts') - int get loginAttempts => throw _privateConstructorUsedError; + int get loginAttempts; @JsonKey(name: 'avatar') - String get avatar => throw _privateConstructorUsedError; - - /// Serializes this NavApiDocsItemImageCreatedByData to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String get avatar; /// Create a copy of NavApiDocsItemImageCreatedByData /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $NavApiDocsItemImageCreatedByDataCopyWith - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $NavApiDocsItemImageCreatedByDataCopyWith<$Res> { - factory $NavApiDocsItemImageCreatedByDataCopyWith( - NavApiDocsItemImageCreatedByData value, - $Res Function(NavApiDocsItemImageCreatedByData) then) = - _$NavApiDocsItemImageCreatedByDataCopyWithImpl<$Res, - NavApiDocsItemImageCreatedByData>; - @useResult - $Res call( - {@JsonKey(name: 'id') String id, - @JsonKey(name: 'sub') String sub, - @JsonKey(name: 'external_provider') String externalProvider, - @JsonKey(name: 'username') String username, - @JsonKey(name: 'name') String name, - @JsonKey(name: 'roles') List roles, - @JsonKey(name: 'avatar_url') String avatarUrl, - @JsonKey(name: 'updatedAt') String updatedAt, - @JsonKey(name: 'createdAt') String createdAt, - @JsonKey(name: 'email') String email, - @JsonKey(name: 'loginAttempts') int loginAttempts, - @JsonKey(name: 'avatar') String avatar}); -} - -/// @nodoc -class _$NavApiDocsItemImageCreatedByDataCopyWithImpl<$Res, - $Val extends NavApiDocsItemImageCreatedByData> - implements $NavApiDocsItemImageCreatedByDataCopyWith<$Res> { - _$NavApiDocsItemImageCreatedByDataCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of NavApiDocsItemImageCreatedByData - /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') + $NavApiDocsItemImageCreatedByDataCopyWith + get copyWith => _$NavApiDocsItemImageCreatedByDataCopyWithImpl< + NavApiDocsItemImageCreatedByData>( + this as NavApiDocsItemImageCreatedByData, _$identity); + + /// Serializes this NavApiDocsItemImageCreatedByData to a JSON map. + Map toJson(); + @override - $Res call({ - Object? id = null, - Object? sub = null, - Object? externalProvider = null, - Object? username = null, - Object? name = null, - Object? roles = null, - Object? avatarUrl = null, - Object? updatedAt = null, - Object? createdAt = null, - Object? email = null, - Object? loginAttempts = null, - Object? avatar = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - sub: null == sub - ? _value.sub - : sub // ignore: cast_nullable_to_non_nullable - as String, - externalProvider: null == externalProvider - ? _value.externalProvider - : externalProvider // ignore: cast_nullable_to_non_nullable - as String, - username: null == username - ? _value.username - : username // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - roles: null == roles - ? _value.roles - : roles // ignore: cast_nullable_to_non_nullable - as List, - avatarUrl: null == avatarUrl - ? _value.avatarUrl - : avatarUrl // ignore: cast_nullable_to_non_nullable - as String, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as String, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as String, - email: null == email - ? _value.email - : email // ignore: cast_nullable_to_non_nullable - as String, - loginAttempts: null == loginAttempts - ? _value.loginAttempts - : loginAttempts // ignore: cast_nullable_to_non_nullable - as int, - avatar: null == avatar - ? _value.avatar - : avatar // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is NavApiDocsItemImageCreatedByData && + (identical(other.id, id) || other.id == id) && + (identical(other.sub, sub) || other.sub == sub) && + (identical(other.externalProvider, externalProvider) || + other.externalProvider == externalProvider) && + (identical(other.username, username) || + other.username == username) && + (identical(other.name, name) || other.name == name) && + const DeepCollectionEquality().equals(other.roles, roles) && + (identical(other.avatarUrl, avatarUrl) || + other.avatarUrl == avatarUrl) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt) && + (identical(other.email, email) || other.email == email) && + (identical(other.loginAttempts, loginAttempts) || + other.loginAttempts == loginAttempts) && + (identical(other.avatar, avatar) || other.avatar == avatar)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + id, + sub, + externalProvider, + username, + name, + const DeepCollectionEquality().hash(roles), + avatarUrl, + updatedAt, + createdAt, + email, + loginAttempts, + avatar); + + @override + String toString() { + return 'NavApiDocsItemImageCreatedByData(id: $id, sub: $sub, externalProvider: $externalProvider, username: $username, name: $name, roles: $roles, avatarUrl: $avatarUrl, updatedAt: $updatedAt, createdAt: $createdAt, email: $email, loginAttempts: $loginAttempts, avatar: $avatar)'; } } /// @nodoc -abstract class _$$NavApiDocsItemImageCreatedByDataImplCopyWith<$Res> - implements $NavApiDocsItemImageCreatedByDataCopyWith<$Res> { - factory _$$NavApiDocsItemImageCreatedByDataImplCopyWith( - _$NavApiDocsItemImageCreatedByDataImpl value, - $Res Function(_$NavApiDocsItemImageCreatedByDataImpl) then) = - __$$NavApiDocsItemImageCreatedByDataImplCopyWithImpl<$Res>; - @override +abstract mixin class $NavApiDocsItemImageCreatedByDataCopyWith<$Res> { + factory $NavApiDocsItemImageCreatedByDataCopyWith( + NavApiDocsItemImageCreatedByData value, + $Res Function(NavApiDocsItemImageCreatedByData) _then) = + _$NavApiDocsItemImageCreatedByDataCopyWithImpl; @useResult $Res call( {@JsonKey(name: 'id') String id, @@ -1208,14 +1113,12 @@ abstract class _$$NavApiDocsItemImageCreatedByDataImplCopyWith<$Res> } /// @nodoc -class __$$NavApiDocsItemImageCreatedByDataImplCopyWithImpl<$Res> - extends _$NavApiDocsItemImageCreatedByDataCopyWithImpl<$Res, - _$NavApiDocsItemImageCreatedByDataImpl> - implements _$$NavApiDocsItemImageCreatedByDataImplCopyWith<$Res> { - __$$NavApiDocsItemImageCreatedByDataImplCopyWithImpl( - _$NavApiDocsItemImageCreatedByDataImpl _value, - $Res Function(_$NavApiDocsItemImageCreatedByDataImpl) _then) - : super(_value, _then); +class _$NavApiDocsItemImageCreatedByDataCopyWithImpl<$Res> + implements $NavApiDocsItemImageCreatedByDataCopyWith<$Res> { + _$NavApiDocsItemImageCreatedByDataCopyWithImpl(this._self, this._then); + + final NavApiDocsItemImageCreatedByData _self; + final $Res Function(NavApiDocsItemImageCreatedByData) _then; /// Create a copy of NavApiDocsItemImageCreatedByData /// with the given fields replaced by the non-null parameter values. @@ -1235,53 +1138,53 @@ class __$$NavApiDocsItemImageCreatedByDataImplCopyWithImpl<$Res> Object? loginAttempts = null, Object? avatar = null, }) { - return _then(_$NavApiDocsItemImageCreatedByDataImpl( + return _then(_self.copyWith( id: null == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as String, sub: null == sub - ? _value.sub + ? _self.sub : sub // ignore: cast_nullable_to_non_nullable as String, externalProvider: null == externalProvider - ? _value.externalProvider + ? _self.externalProvider : externalProvider // ignore: cast_nullable_to_non_nullable as String, username: null == username - ? _value.username + ? _self.username : username // ignore: cast_nullable_to_non_nullable as String, name: null == name - ? _value.name + ? _self.name : name // ignore: cast_nullable_to_non_nullable as String, roles: null == roles - ? _value._roles + ? _self.roles : roles // ignore: cast_nullable_to_non_nullable as List, avatarUrl: null == avatarUrl - ? _value.avatarUrl + ? _self.avatarUrl : avatarUrl // ignore: cast_nullable_to_non_nullable as String, updatedAt: null == updatedAt - ? _value.updatedAt + ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as String, createdAt: null == createdAt - ? _value.createdAt + ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as String, email: null == email - ? _value.email + ? _self.email : email // ignore: cast_nullable_to_non_nullable as String, loginAttempts: null == loginAttempts - ? _value.loginAttempts + ? _self.loginAttempts : loginAttempts // ignore: cast_nullable_to_non_nullable as int, avatar: null == avatar - ? _value.avatar + ? _self.avatar : avatar // ignore: cast_nullable_to_non_nullable as String, )); @@ -1290,9 +1193,9 @@ class __$$NavApiDocsItemImageCreatedByDataImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$NavApiDocsItemImageCreatedByDataImpl - extends _NavApiDocsItemImageCreatedByData { - const _$NavApiDocsItemImageCreatedByDataImpl( +class _NavApiDocsItemImageCreatedByData + extends NavApiDocsItemImageCreatedByData { + const _NavApiDocsItemImageCreatedByData( {@JsonKey(name: 'id') this.id = '', @JsonKey(name: 'sub') this.sub = '', @JsonKey(name: 'external_provider') this.externalProvider = '', @@ -1307,10 +1210,9 @@ class _$NavApiDocsItemImageCreatedByDataImpl @JsonKey(name: 'avatar') this.avatar = ''}) : _roles = roles, super._(); - - factory _$NavApiDocsItemImageCreatedByDataImpl.fromJson( + factory _NavApiDocsItemImageCreatedByData.fromJson( Map json) => - _$$NavApiDocsItemImageCreatedByDataImplFromJson(json); + _$NavApiDocsItemImageCreatedByDataFromJson(json); @override @JsonKey(name: 'id') @@ -1355,16 +1257,27 @@ class _$NavApiDocsItemImageCreatedByDataImpl @JsonKey(name: 'avatar') final String avatar; + /// Create a copy of NavApiDocsItemImageCreatedByData + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'NavApiDocsItemImageCreatedByData(id: $id, sub: $sub, externalProvider: $externalProvider, username: $username, name: $name, roles: $roles, avatarUrl: $avatarUrl, updatedAt: $updatedAt, createdAt: $createdAt, email: $email, loginAttempts: $loginAttempts, avatar: $avatar)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$NavApiDocsItemImageCreatedByDataCopyWith<_NavApiDocsItemImageCreatedByData> + get copyWith => __$NavApiDocsItemImageCreatedByDataCopyWithImpl< + _NavApiDocsItemImageCreatedByData>(this, _$identity); + + @override + Map toJson() { + return _$NavApiDocsItemImageCreatedByDataToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$NavApiDocsItemImageCreatedByDataImpl && + other is _NavApiDocsItemImageCreatedByData && (identical(other.id, id) || other.id == id) && (identical(other.sub, sub) || other.sub == sub) && (identical(other.externalProvider, externalProvider) || @@ -1402,200 +1315,176 @@ class _$NavApiDocsItemImageCreatedByDataImpl loginAttempts, avatar); - /// Create a copy of NavApiDocsItemImageCreatedByData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$NavApiDocsItemImageCreatedByDataImplCopyWith< - _$NavApiDocsItemImageCreatedByDataImpl> - get copyWith => __$$NavApiDocsItemImageCreatedByDataImplCopyWithImpl< - _$NavApiDocsItemImageCreatedByDataImpl>(this, _$identity); - - @override - Map toJson() { - return _$$NavApiDocsItemImageCreatedByDataImplToJson( - this, - ); + String toString() { + return 'NavApiDocsItemImageCreatedByData(id: $id, sub: $sub, externalProvider: $externalProvider, username: $username, name: $name, roles: $roles, avatarUrl: $avatarUrl, updatedAt: $updatedAt, createdAt: $createdAt, email: $email, loginAttempts: $loginAttempts, avatar: $avatar)'; } } -abstract class _NavApiDocsItemImageCreatedByData - extends NavApiDocsItemImageCreatedByData { - const factory _NavApiDocsItemImageCreatedByData( - {@JsonKey(name: 'id') final String id, - @JsonKey(name: 'sub') final String sub, - @JsonKey(name: 'external_provider') final String externalProvider, - @JsonKey(name: 'username') final String username, - @JsonKey(name: 'name') final String name, - @JsonKey(name: 'roles') final List roles, - @JsonKey(name: 'avatar_url') final String avatarUrl, - @JsonKey(name: 'updatedAt') final String updatedAt, - @JsonKey(name: 'createdAt') final String createdAt, - @JsonKey(name: 'email') final String email, - @JsonKey(name: 'loginAttempts') final int loginAttempts, - @JsonKey(name: 'avatar') final String avatar}) = - _$NavApiDocsItemImageCreatedByDataImpl; - const _NavApiDocsItemImageCreatedByData._() : super._(); +/// @nodoc +abstract mixin class _$NavApiDocsItemImageCreatedByDataCopyWith<$Res> + implements $NavApiDocsItemImageCreatedByDataCopyWith<$Res> { + factory _$NavApiDocsItemImageCreatedByDataCopyWith( + _NavApiDocsItemImageCreatedByData value, + $Res Function(_NavApiDocsItemImageCreatedByData) _then) = + __$NavApiDocsItemImageCreatedByDataCopyWithImpl; + @override + @useResult + $Res call( + {@JsonKey(name: 'id') String id, + @JsonKey(name: 'sub') String sub, + @JsonKey(name: 'external_provider') String externalProvider, + @JsonKey(name: 'username') String username, + @JsonKey(name: 'name') String name, + @JsonKey(name: 'roles') List roles, + @JsonKey(name: 'avatar_url') String avatarUrl, + @JsonKey(name: 'updatedAt') String updatedAt, + @JsonKey(name: 'createdAt') String createdAt, + @JsonKey(name: 'email') String email, + @JsonKey(name: 'loginAttempts') int loginAttempts, + @JsonKey(name: 'avatar') String avatar}); +} - factory _NavApiDocsItemImageCreatedByData.fromJson( - Map json) = - _$NavApiDocsItemImageCreatedByDataImpl.fromJson; +/// @nodoc +class __$NavApiDocsItemImageCreatedByDataCopyWithImpl<$Res> + implements _$NavApiDocsItemImageCreatedByDataCopyWith<$Res> { + __$NavApiDocsItemImageCreatedByDataCopyWithImpl(this._self, this._then); - @override - @JsonKey(name: 'id') - String get id; - @override - @JsonKey(name: 'sub') - String get sub; - @override - @JsonKey(name: 'external_provider') - String get externalProvider; - @override - @JsonKey(name: 'username') - String get username; - @override - @JsonKey(name: 'name') - String get name; - @override - @JsonKey(name: 'roles') - List get roles; - @override - @JsonKey(name: 'avatar_url') - String get avatarUrl; - @override - @JsonKey(name: 'updatedAt') - String get updatedAt; - @override - @JsonKey(name: 'createdAt') - String get createdAt; - @override - @JsonKey(name: 'email') - String get email; - @override - @JsonKey(name: 'loginAttempts') - int get loginAttempts; - @override - @JsonKey(name: 'avatar') - String get avatar; + final _NavApiDocsItemImageCreatedByData _self; + final $Res Function(_NavApiDocsItemImageCreatedByData) _then; /// Create a copy of NavApiDocsItemImageCreatedByData /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$NavApiDocsItemImageCreatedByDataImplCopyWith< - _$NavApiDocsItemImageCreatedByDataImpl> - get copyWith => throw _privateConstructorUsedError; -} - -NavApiDocsItemImageSizesThumbnailData - _$NavApiDocsItemImageSizesThumbnailDataFromJson(Map json) { - return _NavApiDocsItemImageSizesThumbnailData.fromJson(json); + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? sub = null, + Object? externalProvider = null, + Object? username = null, + Object? name = null, + Object? roles = null, + Object? avatarUrl = null, + Object? updatedAt = null, + Object? createdAt = null, + Object? email = null, + Object? loginAttempts = null, + Object? avatar = null, + }) { + return _then(_NavApiDocsItemImageCreatedByData( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as String, + sub: null == sub + ? _self.sub + : sub // ignore: cast_nullable_to_non_nullable + as String, + externalProvider: null == externalProvider + ? _self.externalProvider + : externalProvider // ignore: cast_nullable_to_non_nullable + as String, + username: null == username + ? _self.username + : username // ignore: cast_nullable_to_non_nullable + as String, + name: null == name + ? _self.name + : name // ignore: cast_nullable_to_non_nullable + as String, + roles: null == roles + ? _self._roles + : roles // ignore: cast_nullable_to_non_nullable + as List, + avatarUrl: null == avatarUrl + ? _self.avatarUrl + : avatarUrl // ignore: cast_nullable_to_non_nullable + as String, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as String, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as String, + email: null == email + ? _self.email + : email // ignore: cast_nullable_to_non_nullable + as String, + loginAttempts: null == loginAttempts + ? _self.loginAttempts + : loginAttempts // ignore: cast_nullable_to_non_nullable + as int, + avatar: null == avatar + ? _self.avatar + : avatar // ignore: cast_nullable_to_non_nullable + as String, + )); + } } /// @nodoc mixin _$NavApiDocsItemImageSizesThumbnailData { @JsonKey(name: 'url') - String get url => throw _privateConstructorUsedError; + String get url; @JsonKey(name: 'width') - int get width => throw _privateConstructorUsedError; + int get width; @JsonKey(name: 'height') - int get height => throw _privateConstructorUsedError; + int get height; @JsonKey(name: 'mimeType') - String get mimeType => throw _privateConstructorUsedError; + String get mimeType; @JsonKey(name: 'filesize') - int get filesize => throw _privateConstructorUsedError; + int get filesize; @JsonKey(name: 'filename') - String get filename => throw _privateConstructorUsedError; - - /// Serializes this NavApiDocsItemImageSizesThumbnailData to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String get filename; /// Create a copy of NavApiDocsItemImageSizesThumbnailData /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $NavApiDocsItemImageSizesThumbnailDataCopyWith< NavApiDocsItemImageSizesThumbnailData> - get copyWith => throw _privateConstructorUsedError; -} + get copyWith => _$NavApiDocsItemImageSizesThumbnailDataCopyWithImpl< + NavApiDocsItemImageSizesThumbnailData>( + this as NavApiDocsItemImageSizesThumbnailData, _$identity); -/// @nodoc -abstract class $NavApiDocsItemImageSizesThumbnailDataCopyWith<$Res> { - factory $NavApiDocsItemImageSizesThumbnailDataCopyWith( - NavApiDocsItemImageSizesThumbnailData value, - $Res Function(NavApiDocsItemImageSizesThumbnailData) then) = - _$NavApiDocsItemImageSizesThumbnailDataCopyWithImpl<$Res, - NavApiDocsItemImageSizesThumbnailData>; - @useResult - $Res call( - {@JsonKey(name: 'url') String url, - @JsonKey(name: 'width') int width, - @JsonKey(name: 'height') int height, - @JsonKey(name: 'mimeType') String mimeType, - @JsonKey(name: 'filesize') int filesize, - @JsonKey(name: 'filename') String filename}); -} + /// Serializes this NavApiDocsItemImageSizesThumbnailData to a JSON map. + Map toJson(); -/// @nodoc -class _$NavApiDocsItemImageSizesThumbnailDataCopyWithImpl<$Res, - $Val extends NavApiDocsItemImageSizesThumbnailData> - implements $NavApiDocsItemImageSizesThumbnailDataCopyWith<$Res> { - _$NavApiDocsItemImageSizesThumbnailDataCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of NavApiDocsItemImageSizesThumbnailData - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? url = null, - Object? width = null, - Object? height = null, - Object? mimeType = null, - Object? filesize = null, - Object? filename = null, - }) { - return _then(_value.copyWith( - url: null == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String, - width: null == width - ? _value.width - : width // ignore: cast_nullable_to_non_nullable - as int, - height: null == height - ? _value.height - : height // ignore: cast_nullable_to_non_nullable - as int, - mimeType: null == mimeType - ? _value.mimeType - : mimeType // ignore: cast_nullable_to_non_nullable - as String, - filesize: null == filesize - ? _value.filesize - : filesize // ignore: cast_nullable_to_non_nullable - as int, - filename: null == filename - ? _value.filename - : filename // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is NavApiDocsItemImageSizesThumbnailData && + (identical(other.url, url) || other.url == url) && + (identical(other.width, width) || other.width == width) && + (identical(other.height, height) || other.height == height) && + (identical(other.mimeType, mimeType) || + other.mimeType == mimeType) && + (identical(other.filesize, filesize) || + other.filesize == filesize) && + (identical(other.filename, filename) || + other.filename == filename)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, url, width, height, mimeType, filesize, filename); + + @override + String toString() { + return 'NavApiDocsItemImageSizesThumbnailData(url: $url, width: $width, height: $height, mimeType: $mimeType, filesize: $filesize, filename: $filename)'; } } /// @nodoc -abstract class _$$NavApiDocsItemImageSizesThumbnailDataImplCopyWith<$Res> - implements $NavApiDocsItemImageSizesThumbnailDataCopyWith<$Res> { - factory _$$NavApiDocsItemImageSizesThumbnailDataImplCopyWith( - _$NavApiDocsItemImageSizesThumbnailDataImpl value, - $Res Function(_$NavApiDocsItemImageSizesThumbnailDataImpl) then) = - __$$NavApiDocsItemImageSizesThumbnailDataImplCopyWithImpl<$Res>; - @override +abstract mixin class $NavApiDocsItemImageSizesThumbnailDataCopyWith<$Res> { + factory $NavApiDocsItemImageSizesThumbnailDataCopyWith( + NavApiDocsItemImageSizesThumbnailData value, + $Res Function(NavApiDocsItemImageSizesThumbnailData) _then) = + _$NavApiDocsItemImageSizesThumbnailDataCopyWithImpl; @useResult $Res call( {@JsonKey(name: 'url') String url, @@ -1607,14 +1496,12 @@ abstract class _$$NavApiDocsItemImageSizesThumbnailDataImplCopyWith<$Res> } /// @nodoc -class __$$NavApiDocsItemImageSizesThumbnailDataImplCopyWithImpl<$Res> - extends _$NavApiDocsItemImageSizesThumbnailDataCopyWithImpl<$Res, - _$NavApiDocsItemImageSizesThumbnailDataImpl> - implements _$$NavApiDocsItemImageSizesThumbnailDataImplCopyWith<$Res> { - __$$NavApiDocsItemImageSizesThumbnailDataImplCopyWithImpl( - _$NavApiDocsItemImageSizesThumbnailDataImpl _value, - $Res Function(_$NavApiDocsItemImageSizesThumbnailDataImpl) _then) - : super(_value, _then); +class _$NavApiDocsItemImageSizesThumbnailDataCopyWithImpl<$Res> + implements $NavApiDocsItemImageSizesThumbnailDataCopyWith<$Res> { + _$NavApiDocsItemImageSizesThumbnailDataCopyWithImpl(this._self, this._then); + + final NavApiDocsItemImageSizesThumbnailData _self; + final $Res Function(NavApiDocsItemImageSizesThumbnailData) _then; /// Create a copy of NavApiDocsItemImageSizesThumbnailData /// with the given fields replaced by the non-null parameter values. @@ -1628,29 +1515,29 @@ class __$$NavApiDocsItemImageSizesThumbnailDataImplCopyWithImpl<$Res> Object? filesize = null, Object? filename = null, }) { - return _then(_$NavApiDocsItemImageSizesThumbnailDataImpl( + return _then(_self.copyWith( url: null == url - ? _value.url + ? _self.url : url // ignore: cast_nullable_to_non_nullable as String, width: null == width - ? _value.width + ? _self.width : width // ignore: cast_nullable_to_non_nullable as int, height: null == height - ? _value.height + ? _self.height : height // ignore: cast_nullable_to_non_nullable as int, mimeType: null == mimeType - ? _value.mimeType + ? _self.mimeType : mimeType // ignore: cast_nullable_to_non_nullable as String, filesize: null == filesize - ? _value.filesize + ? _self.filesize : filesize // ignore: cast_nullable_to_non_nullable as int, filename: null == filename - ? _value.filename + ? _self.filename : filename // ignore: cast_nullable_to_non_nullable as String, )); @@ -1659,9 +1546,9 @@ class __$$NavApiDocsItemImageSizesThumbnailDataImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$NavApiDocsItemImageSizesThumbnailDataImpl - extends _NavApiDocsItemImageSizesThumbnailData { - const _$NavApiDocsItemImageSizesThumbnailDataImpl( +class _NavApiDocsItemImageSizesThumbnailData + extends NavApiDocsItemImageSizesThumbnailData { + const _NavApiDocsItemImageSizesThumbnailData( {@JsonKey(name: 'url') this.url = '', @JsonKey(name: 'width') this.width = 0, @JsonKey(name: 'height') this.height = 0, @@ -1669,10 +1556,9 @@ class _$NavApiDocsItemImageSizesThumbnailDataImpl @JsonKey(name: 'filesize') this.filesize = 0, @JsonKey(name: 'filename') this.filename = ''}) : super._(); - - factory _$NavApiDocsItemImageSizesThumbnailDataImpl.fromJson( + factory _NavApiDocsItemImageSizesThumbnailData.fromJson( Map json) => - _$$NavApiDocsItemImageSizesThumbnailDataImplFromJson(json); + _$NavApiDocsItemImageSizesThumbnailDataFromJson(json); @override @JsonKey(name: 'url') @@ -1693,16 +1579,28 @@ class _$NavApiDocsItemImageSizesThumbnailDataImpl @JsonKey(name: 'filename') final String filename; + /// Create a copy of NavApiDocsItemImageSizesThumbnailData + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'NavApiDocsItemImageSizesThumbnailData(url: $url, width: $width, height: $height, mimeType: $mimeType, filesize: $filesize, filename: $filename)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$NavApiDocsItemImageSizesThumbnailDataCopyWith< + _NavApiDocsItemImageSizesThumbnailData> + get copyWith => __$NavApiDocsItemImageSizesThumbnailDataCopyWithImpl< + _NavApiDocsItemImageSizesThumbnailData>(this, _$identity); + + @override + Map toJson() { + return _$NavApiDocsItemImageSizesThumbnailDataToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$NavApiDocsItemImageSizesThumbnailDataImpl && + other is _NavApiDocsItemImageSizesThumbnailData && (identical(other.url, url) || other.url == url) && (identical(other.width, width) || other.width == width) && (identical(other.height, height) || other.height == height) && @@ -1719,108 +1617,134 @@ class _$NavApiDocsItemImageSizesThumbnailDataImpl int get hashCode => Object.hash( runtimeType, url, width, height, mimeType, filesize, filename); - /// Create a copy of NavApiDocsItemImageSizesThumbnailData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$NavApiDocsItemImageSizesThumbnailDataImplCopyWith< - _$NavApiDocsItemImageSizesThumbnailDataImpl> - get copyWith => __$$NavApiDocsItemImageSizesThumbnailDataImplCopyWithImpl< - _$NavApiDocsItemImageSizesThumbnailDataImpl>(this, _$identity); - - @override - Map toJson() { - return _$$NavApiDocsItemImageSizesThumbnailDataImplToJson( - this, - ); + String toString() { + return 'NavApiDocsItemImageSizesThumbnailData(url: $url, width: $width, height: $height, mimeType: $mimeType, filesize: $filesize, filename: $filename)'; } } -abstract class _NavApiDocsItemImageSizesThumbnailData - extends NavApiDocsItemImageSizesThumbnailData { - const factory _NavApiDocsItemImageSizesThumbnailData( - {@JsonKey(name: 'url') final String url, - @JsonKey(name: 'width') final int width, - @JsonKey(name: 'height') final int height, - @JsonKey(name: 'mimeType') final String mimeType, - @JsonKey(name: 'filesize') final int filesize, - @JsonKey(name: 'filename') final String filename}) = - _$NavApiDocsItemImageSizesThumbnailDataImpl; - const _NavApiDocsItemImageSizesThumbnailData._() : super._(); +/// @nodoc +abstract mixin class _$NavApiDocsItemImageSizesThumbnailDataCopyWith<$Res> + implements $NavApiDocsItemImageSizesThumbnailDataCopyWith<$Res> { + factory _$NavApiDocsItemImageSizesThumbnailDataCopyWith( + _NavApiDocsItemImageSizesThumbnailData value, + $Res Function(_NavApiDocsItemImageSizesThumbnailData) _then) = + __$NavApiDocsItemImageSizesThumbnailDataCopyWithImpl; + @override + @useResult + $Res call( + {@JsonKey(name: 'url') String url, + @JsonKey(name: 'width') int width, + @JsonKey(name: 'height') int height, + @JsonKey(name: 'mimeType') String mimeType, + @JsonKey(name: 'filesize') int filesize, + @JsonKey(name: 'filename') String filename}); +} - factory _NavApiDocsItemImageSizesThumbnailData.fromJson( - Map json) = - _$NavApiDocsItemImageSizesThumbnailDataImpl.fromJson; +/// @nodoc +class __$NavApiDocsItemImageSizesThumbnailDataCopyWithImpl<$Res> + implements _$NavApiDocsItemImageSizesThumbnailDataCopyWith<$Res> { + __$NavApiDocsItemImageSizesThumbnailDataCopyWithImpl(this._self, this._then); - @override - @JsonKey(name: 'url') - String get url; - @override - @JsonKey(name: 'width') - int get width; - @override - @JsonKey(name: 'height') - int get height; - @override - @JsonKey(name: 'mimeType') - String get mimeType; - @override - @JsonKey(name: 'filesize') - int get filesize; - @override - @JsonKey(name: 'filename') - String get filename; + final _NavApiDocsItemImageSizesThumbnailData _self; + final $Res Function(_NavApiDocsItemImageSizesThumbnailData) _then; /// Create a copy of NavApiDocsItemImageSizesThumbnailData /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$NavApiDocsItemImageSizesThumbnailDataImplCopyWith< - _$NavApiDocsItemImageSizesThumbnailDataImpl> - get copyWith => throw _privateConstructorUsedError; -} - -NavApiDocsItemImageSizesData _$NavApiDocsItemImageSizesDataFromJson( - Map json) { - return _NavApiDocsItemImageSizesData.fromJson(json); + @pragma('vm:prefer-inline') + $Res call({ + Object? url = null, + Object? width = null, + Object? height = null, + Object? mimeType = null, + Object? filesize = null, + Object? filename = null, + }) { + return _then(_NavApiDocsItemImageSizesThumbnailData( + url: null == url + ? _self.url + : url // ignore: cast_nullable_to_non_nullable + as String, + width: null == width + ? _self.width + : width // ignore: cast_nullable_to_non_nullable + as int, + height: null == height + ? _self.height + : height // ignore: cast_nullable_to_non_nullable + as int, + mimeType: null == mimeType + ? _self.mimeType + : mimeType // ignore: cast_nullable_to_non_nullable + as String, + filesize: null == filesize + ? _self.filesize + : filesize // ignore: cast_nullable_to_non_nullable + as int, + filename: null == filename + ? _self.filename + : filename // ignore: cast_nullable_to_non_nullable + as String, + )); + } } /// @nodoc mixin _$NavApiDocsItemImageSizesData { @JsonKey(name: 'thumbnail') - NavApiDocsItemImageSizesThumbnailData get thumbnail => - throw _privateConstructorUsedError; + NavApiDocsItemImageSizesThumbnailData get thumbnail; @JsonKey(name: 'preload') - NavApiDocsItemImageSizesPreloadData get preload => - throw _privateConstructorUsedError; + NavApiDocsItemImageSizesPreloadData get preload; @JsonKey(name: 'card') - NavApiDocsItemImageSizesCardData get card => - throw _privateConstructorUsedError; + NavApiDocsItemImageSizesCardData get card; @JsonKey(name: 'tablet') - NavApiDocsItemImageSizesTabletData get tablet => - throw _privateConstructorUsedError; + NavApiDocsItemImageSizesTabletData get tablet; @JsonKey(name: 'avatar') - NavApiDocsItemImageSizesAvatarData get avatar => - throw _privateConstructorUsedError; - - /// Serializes this NavApiDocsItemImageSizesData to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + NavApiDocsItemImageSizesAvatarData get avatar; /// Create a copy of NavApiDocsItemImageSizesData /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $NavApiDocsItemImageSizesDataCopyWith - get copyWith => throw _privateConstructorUsedError; + get copyWith => _$NavApiDocsItemImageSizesDataCopyWithImpl< + NavApiDocsItemImageSizesData>( + this as NavApiDocsItemImageSizesData, _$identity); + + /// Serializes this NavApiDocsItemImageSizesData to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is NavApiDocsItemImageSizesData && + (identical(other.thumbnail, thumbnail) || + other.thumbnail == thumbnail) && + (identical(other.preload, preload) || other.preload == preload) && + (identical(other.card, card) || other.card == card) && + (identical(other.tablet, tablet) || other.tablet == tablet) && + (identical(other.avatar, avatar) || other.avatar == avatar)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => + Object.hash(runtimeType, thumbnail, preload, card, tablet, avatar); + + @override + String toString() { + return 'NavApiDocsItemImageSizesData(thumbnail: $thumbnail, preload: $preload, card: $card, tablet: $tablet, avatar: $avatar)'; + } } /// @nodoc -abstract class $NavApiDocsItemImageSizesDataCopyWith<$Res> { +abstract mixin class $NavApiDocsItemImageSizesDataCopyWith<$Res> { factory $NavApiDocsItemImageSizesDataCopyWith( NavApiDocsItemImageSizesData value, - $Res Function(NavApiDocsItemImageSizesData) then) = - _$NavApiDocsItemImageSizesDataCopyWithImpl<$Res, - NavApiDocsItemImageSizesData>; + $Res Function(NavApiDocsItemImageSizesData) _then) = + _$NavApiDocsItemImageSizesDataCopyWithImpl; @useResult $Res call( {@JsonKey(name: 'thumbnail') @@ -1838,15 +1762,12 @@ abstract class $NavApiDocsItemImageSizesDataCopyWith<$Res> { } /// @nodoc -class _$NavApiDocsItemImageSizesDataCopyWithImpl<$Res, - $Val extends NavApiDocsItemImageSizesData> +class _$NavApiDocsItemImageSizesDataCopyWithImpl<$Res> implements $NavApiDocsItemImageSizesDataCopyWith<$Res> { - _$NavApiDocsItemImageSizesDataCopyWithImpl(this._value, this._then); + _$NavApiDocsItemImageSizesDataCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final NavApiDocsItemImageSizesData _self; + final $Res Function(NavApiDocsItemImageSizesData) _then; /// Create a copy of NavApiDocsItemImageSizesData /// with the given fields replaced by the non-null parameter values. @@ -1859,28 +1780,28 @@ class _$NavApiDocsItemImageSizesDataCopyWithImpl<$Res, Object? tablet = null, Object? avatar = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( thumbnail: null == thumbnail - ? _value.thumbnail + ? _self.thumbnail : thumbnail // ignore: cast_nullable_to_non_nullable as NavApiDocsItemImageSizesThumbnailData, preload: null == preload - ? _value.preload + ? _self.preload : preload // ignore: cast_nullable_to_non_nullable as NavApiDocsItemImageSizesPreloadData, card: null == card - ? _value.card + ? _self.card : card // ignore: cast_nullable_to_non_nullable as NavApiDocsItemImageSizesCardData, tablet: null == tablet - ? _value.tablet + ? _self.tablet : tablet // ignore: cast_nullable_to_non_nullable as NavApiDocsItemImageSizesTabletData, avatar: null == avatar - ? _value.avatar + ? _self.avatar : avatar // ignore: cast_nullable_to_non_nullable as NavApiDocsItemImageSizesAvatarData, - ) as $Val); + )); } /// Create a copy of NavApiDocsItemImageSizesData @@ -1888,9 +1809,9 @@ class _$NavApiDocsItemImageSizesDataCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $NavApiDocsItemImageSizesThumbnailDataCopyWith<$Res> get thumbnail { - return $NavApiDocsItemImageSizesThumbnailDataCopyWith<$Res>( - _value.thumbnail, (value) { - return _then(_value.copyWith(thumbnail: value) as $Val); + return $NavApiDocsItemImageSizesThumbnailDataCopyWith<$Res>(_self.thumbnail, + (value) { + return _then(_self.copyWith(thumbnail: value)); }); } @@ -1899,9 +1820,9 @@ class _$NavApiDocsItemImageSizesDataCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $NavApiDocsItemImageSizesPreloadDataCopyWith<$Res> get preload { - return $NavApiDocsItemImageSizesPreloadDataCopyWith<$Res>(_value.preload, + return $NavApiDocsItemImageSizesPreloadDataCopyWith<$Res>(_self.preload, (value) { - return _then(_value.copyWith(preload: value) as $Val); + return _then(_self.copyWith(preload: value)); }); } @@ -1910,9 +1831,8 @@ class _$NavApiDocsItemImageSizesDataCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $NavApiDocsItemImageSizesCardDataCopyWith<$Res> get card { - return $NavApiDocsItemImageSizesCardDataCopyWith<$Res>(_value.card, - (value) { - return _then(_value.copyWith(card: value) as $Val); + return $NavApiDocsItemImageSizesCardDataCopyWith<$Res>(_self.card, (value) { + return _then(_self.copyWith(card: value)); }); } @@ -1921,9 +1841,9 @@ class _$NavApiDocsItemImageSizesDataCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $NavApiDocsItemImageSizesTabletDataCopyWith<$Res> get tablet { - return $NavApiDocsItemImageSizesTabletDataCopyWith<$Res>(_value.tablet, + return $NavApiDocsItemImageSizesTabletDataCopyWith<$Res>(_self.tablet, (value) { - return _then(_value.copyWith(tablet: value) as $Val); + return _then(_self.copyWith(tablet: value)); }); } @@ -1932,92 +1852,17 @@ class _$NavApiDocsItemImageSizesDataCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $NavApiDocsItemImageSizesAvatarDataCopyWith<$Res> get avatar { - return $NavApiDocsItemImageSizesAvatarDataCopyWith<$Res>(_value.avatar, + return $NavApiDocsItemImageSizesAvatarDataCopyWith<$Res>(_self.avatar, (value) { - return _then(_value.copyWith(avatar: value) as $Val); + return _then(_self.copyWith(avatar: value)); }); } } -/// @nodoc -abstract class _$$NavApiDocsItemImageSizesDataImplCopyWith<$Res> - implements $NavApiDocsItemImageSizesDataCopyWith<$Res> { - factory _$$NavApiDocsItemImageSizesDataImplCopyWith( - _$NavApiDocsItemImageSizesDataImpl value, - $Res Function(_$NavApiDocsItemImageSizesDataImpl) then) = - __$$NavApiDocsItemImageSizesDataImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {@JsonKey(name: 'thumbnail') - NavApiDocsItemImageSizesThumbnailData thumbnail, - @JsonKey(name: 'preload') NavApiDocsItemImageSizesPreloadData preload, - @JsonKey(name: 'card') NavApiDocsItemImageSizesCardData card, - @JsonKey(name: 'tablet') NavApiDocsItemImageSizesTabletData tablet, - @JsonKey(name: 'avatar') NavApiDocsItemImageSizesAvatarData avatar}); - - @override - $NavApiDocsItemImageSizesThumbnailDataCopyWith<$Res> get thumbnail; - @override - $NavApiDocsItemImageSizesPreloadDataCopyWith<$Res> get preload; - @override - $NavApiDocsItemImageSizesCardDataCopyWith<$Res> get card; - @override - $NavApiDocsItemImageSizesTabletDataCopyWith<$Res> get tablet; - @override - $NavApiDocsItemImageSizesAvatarDataCopyWith<$Res> get avatar; -} - -/// @nodoc -class __$$NavApiDocsItemImageSizesDataImplCopyWithImpl<$Res> - extends _$NavApiDocsItemImageSizesDataCopyWithImpl<$Res, - _$NavApiDocsItemImageSizesDataImpl> - implements _$$NavApiDocsItemImageSizesDataImplCopyWith<$Res> { - __$$NavApiDocsItemImageSizesDataImplCopyWithImpl( - _$NavApiDocsItemImageSizesDataImpl _value, - $Res Function(_$NavApiDocsItemImageSizesDataImpl) _then) - : super(_value, _then); - - /// Create a copy of NavApiDocsItemImageSizesData - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? thumbnail = null, - Object? preload = null, - Object? card = null, - Object? tablet = null, - Object? avatar = null, - }) { - return _then(_$NavApiDocsItemImageSizesDataImpl( - thumbnail: null == thumbnail - ? _value.thumbnail - : thumbnail // ignore: cast_nullable_to_non_nullable - as NavApiDocsItemImageSizesThumbnailData, - preload: null == preload - ? _value.preload - : preload // ignore: cast_nullable_to_non_nullable - as NavApiDocsItemImageSizesPreloadData, - card: null == card - ? _value.card - : card // ignore: cast_nullable_to_non_nullable - as NavApiDocsItemImageSizesCardData, - tablet: null == tablet - ? _value.tablet - : tablet // ignore: cast_nullable_to_non_nullable - as NavApiDocsItemImageSizesTabletData, - avatar: null == avatar - ? _value.avatar - : avatar // ignore: cast_nullable_to_non_nullable - as NavApiDocsItemImageSizesAvatarData, - )); - } -} - /// @nodoc @JsonSerializable() -class _$NavApiDocsItemImageSizesDataImpl extends _NavApiDocsItemImageSizesData { - const _$NavApiDocsItemImageSizesDataImpl( +class _NavApiDocsItemImageSizesData extends NavApiDocsItemImageSizesData { + const _NavApiDocsItemImageSizesData( {@JsonKey(name: 'thumbnail') this.thumbnail = const NavApiDocsItemImageSizesThumbnailData(), @JsonKey(name: 'preload') @@ -2029,10 +1874,8 @@ class _$NavApiDocsItemImageSizesDataImpl extends _NavApiDocsItemImageSizesData { @JsonKey(name: 'avatar') this.avatar = const NavApiDocsItemImageSizesAvatarData()}) : super._(); - - factory _$NavApiDocsItemImageSizesDataImpl.fromJson( - Map json) => - _$$NavApiDocsItemImageSizesDataImplFromJson(json); + factory _NavApiDocsItemImageSizesData.fromJson(Map json) => + _$NavApiDocsItemImageSizesDataFromJson(json); @override @JsonKey(name: 'thumbnail') @@ -2050,16 +1893,27 @@ class _$NavApiDocsItemImageSizesDataImpl extends _NavApiDocsItemImageSizesData { @JsonKey(name: 'avatar') final NavApiDocsItemImageSizesAvatarData avatar; + /// Create a copy of NavApiDocsItemImageSizesData + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'NavApiDocsItemImageSizesData(thumbnail: $thumbnail, preload: $preload, card: $card, tablet: $tablet, avatar: $avatar)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$NavApiDocsItemImageSizesDataCopyWith<_NavApiDocsItemImageSizesData> + get copyWith => __$NavApiDocsItemImageSizesDataCopyWithImpl< + _NavApiDocsItemImageSizesData>(this, _$identity); + + @override + Map toJson() { + return _$NavApiDocsItemImageSizesDataToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$NavApiDocsItemImageSizesDataImpl && + other is _NavApiDocsItemImageSizesData && (identical(other.thumbnail, thumbnail) || other.thumbnail == thumbnail) && (identical(other.preload, preload) || other.preload == preload) && @@ -2073,174 +1927,203 @@ class _$NavApiDocsItemImageSizesDataImpl extends _NavApiDocsItemImageSizesData { int get hashCode => Object.hash(runtimeType, thumbnail, preload, card, tablet, avatar); - /// Create a copy of NavApiDocsItemImageSizesData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$NavApiDocsItemImageSizesDataImplCopyWith< - _$NavApiDocsItemImageSizesDataImpl> - get copyWith => __$$NavApiDocsItemImageSizesDataImplCopyWithImpl< - _$NavApiDocsItemImageSizesDataImpl>(this, _$identity); - - @override - Map toJson() { - return _$$NavApiDocsItemImageSizesDataImplToJson( - this, - ); + String toString() { + return 'NavApiDocsItemImageSizesData(thumbnail: $thumbnail, preload: $preload, card: $card, tablet: $tablet, avatar: $avatar)'; } } -abstract class _NavApiDocsItemImageSizesData - extends NavApiDocsItemImageSizesData { - const factory _NavApiDocsItemImageSizesData( +/// @nodoc +abstract mixin class _$NavApiDocsItemImageSizesDataCopyWith<$Res> + implements $NavApiDocsItemImageSizesDataCopyWith<$Res> { + factory _$NavApiDocsItemImageSizesDataCopyWith( + _NavApiDocsItemImageSizesData value, + $Res Function(_NavApiDocsItemImageSizesData) _then) = + __$NavApiDocsItemImageSizesDataCopyWithImpl; + @override + @useResult + $Res call( {@JsonKey(name: 'thumbnail') - final NavApiDocsItemImageSizesThumbnailData thumbnail, - @JsonKey(name: 'preload') - final NavApiDocsItemImageSizesPreloadData preload, - @JsonKey(name: 'card') final NavApiDocsItemImageSizesCardData card, - @JsonKey(name: 'tablet') final NavApiDocsItemImageSizesTabletData tablet, - @JsonKey(name: 'avatar') - final NavApiDocsItemImageSizesAvatarData - avatar}) = _$NavApiDocsItemImageSizesDataImpl; - const _NavApiDocsItemImageSizesData._() : super._(); - - factory _NavApiDocsItemImageSizesData.fromJson(Map json) = - _$NavApiDocsItemImageSizesDataImpl.fromJson; + NavApiDocsItemImageSizesThumbnailData thumbnail, + @JsonKey(name: 'preload') NavApiDocsItemImageSizesPreloadData preload, + @JsonKey(name: 'card') NavApiDocsItemImageSizesCardData card, + @JsonKey(name: 'tablet') NavApiDocsItemImageSizesTabletData tablet, + @JsonKey(name: 'avatar') NavApiDocsItemImageSizesAvatarData avatar}); @override - @JsonKey(name: 'thumbnail') - NavApiDocsItemImageSizesThumbnailData get thumbnail; + $NavApiDocsItemImageSizesThumbnailDataCopyWith<$Res> get thumbnail; @override - @JsonKey(name: 'preload') - NavApiDocsItemImageSizesPreloadData get preload; + $NavApiDocsItemImageSizesPreloadDataCopyWith<$Res> get preload; @override - @JsonKey(name: 'card') - NavApiDocsItemImageSizesCardData get card; + $NavApiDocsItemImageSizesCardDataCopyWith<$Res> get card; @override - @JsonKey(name: 'tablet') - NavApiDocsItemImageSizesTabletData get tablet; + $NavApiDocsItemImageSizesTabletDataCopyWith<$Res> get tablet; @override - @JsonKey(name: 'avatar') - NavApiDocsItemImageSizesAvatarData get avatar; + $NavApiDocsItemImageSizesAvatarDataCopyWith<$Res> get avatar; +} + +/// @nodoc +class __$NavApiDocsItemImageSizesDataCopyWithImpl<$Res> + implements _$NavApiDocsItemImageSizesDataCopyWith<$Res> { + __$NavApiDocsItemImageSizesDataCopyWithImpl(this._self, this._then); + + final _NavApiDocsItemImageSizesData _self; + final $Res Function(_NavApiDocsItemImageSizesData) _then; /// Create a copy of NavApiDocsItemImageSizesData /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$NavApiDocsItemImageSizesDataImplCopyWith< - _$NavApiDocsItemImageSizesDataImpl> - get copyWith => throw _privateConstructorUsedError; -} + @pragma('vm:prefer-inline') + $Res call({ + Object? thumbnail = null, + Object? preload = null, + Object? card = null, + Object? tablet = null, + Object? avatar = null, + }) { + return _then(_NavApiDocsItemImageSizesData( + thumbnail: null == thumbnail + ? _self.thumbnail + : thumbnail // ignore: cast_nullable_to_non_nullable + as NavApiDocsItemImageSizesThumbnailData, + preload: null == preload + ? _self.preload + : preload // ignore: cast_nullable_to_non_nullable + as NavApiDocsItemImageSizesPreloadData, + card: null == card + ? _self.card + : card // ignore: cast_nullable_to_non_nullable + as NavApiDocsItemImageSizesCardData, + tablet: null == tablet + ? _self.tablet + : tablet // ignore: cast_nullable_to_non_nullable + as NavApiDocsItemImageSizesTabletData, + avatar: null == avatar + ? _self.avatar + : avatar // ignore: cast_nullable_to_non_nullable + as NavApiDocsItemImageSizesAvatarData, + )); + } -NavApiDocsItemImageSizesPreloadData - _$NavApiDocsItemImageSizesPreloadDataFromJson(Map json) { - return _NavApiDocsItemImageSizesPreloadData.fromJson(json); + /// Create a copy of NavApiDocsItemImageSizesData + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $NavApiDocsItemImageSizesThumbnailDataCopyWith<$Res> get thumbnail { + return $NavApiDocsItemImageSizesThumbnailDataCopyWith<$Res>(_self.thumbnail, + (value) { + return _then(_self.copyWith(thumbnail: value)); + }); + } + + /// Create a copy of NavApiDocsItemImageSizesData + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $NavApiDocsItemImageSizesPreloadDataCopyWith<$Res> get preload { + return $NavApiDocsItemImageSizesPreloadDataCopyWith<$Res>(_self.preload, + (value) { + return _then(_self.copyWith(preload: value)); + }); + } + + /// Create a copy of NavApiDocsItemImageSizesData + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $NavApiDocsItemImageSizesCardDataCopyWith<$Res> get card { + return $NavApiDocsItemImageSizesCardDataCopyWith<$Res>(_self.card, (value) { + return _then(_self.copyWith(card: value)); + }); + } + + /// Create a copy of NavApiDocsItemImageSizesData + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $NavApiDocsItemImageSizesTabletDataCopyWith<$Res> get tablet { + return $NavApiDocsItemImageSizesTabletDataCopyWith<$Res>(_self.tablet, + (value) { + return _then(_self.copyWith(tablet: value)); + }); + } + + /// Create a copy of NavApiDocsItemImageSizesData + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $NavApiDocsItemImageSizesAvatarDataCopyWith<$Res> get avatar { + return $NavApiDocsItemImageSizesAvatarDataCopyWith<$Res>(_self.avatar, + (value) { + return _then(_self.copyWith(avatar: value)); + }); + } } /// @nodoc mixin _$NavApiDocsItemImageSizesPreloadData { @JsonKey(name: 'url') - dynamic get url => throw _privateConstructorUsedError; + dynamic get url; @JsonKey(name: 'width') - dynamic get width => throw _privateConstructorUsedError; + dynamic get width; @JsonKey(name: 'height') - dynamic get height => throw _privateConstructorUsedError; + dynamic get height; @JsonKey(name: 'mimeType') - dynamic get mimeType => throw _privateConstructorUsedError; + dynamic get mimeType; @JsonKey(name: 'filesize') - dynamic get filesize => throw _privateConstructorUsedError; + dynamic get filesize; @JsonKey(name: 'filename') - dynamic get filename => throw _privateConstructorUsedError; - - /// Serializes this NavApiDocsItemImageSizesPreloadData to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + dynamic get filename; /// Create a copy of NavApiDocsItemImageSizesPreloadData /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $NavApiDocsItemImageSizesPreloadDataCopyWith< NavApiDocsItemImageSizesPreloadData> - get copyWith => throw _privateConstructorUsedError; -} + get copyWith => _$NavApiDocsItemImageSizesPreloadDataCopyWithImpl< + NavApiDocsItemImageSizesPreloadData>( + this as NavApiDocsItemImageSizesPreloadData, _$identity); -/// @nodoc -abstract class $NavApiDocsItemImageSizesPreloadDataCopyWith<$Res> { - factory $NavApiDocsItemImageSizesPreloadDataCopyWith( - NavApiDocsItemImageSizesPreloadData value, - $Res Function(NavApiDocsItemImageSizesPreloadData) then) = - _$NavApiDocsItemImageSizesPreloadDataCopyWithImpl<$Res, - NavApiDocsItemImageSizesPreloadData>; - @useResult - $Res call( - {@JsonKey(name: 'url') dynamic url, - @JsonKey(name: 'width') dynamic width, - @JsonKey(name: 'height') dynamic height, - @JsonKey(name: 'mimeType') dynamic mimeType, - @JsonKey(name: 'filesize') dynamic filesize, - @JsonKey(name: 'filename') dynamic filename}); -} + /// Serializes this NavApiDocsItemImageSizesPreloadData to a JSON map. + Map toJson(); -/// @nodoc -class _$NavApiDocsItemImageSizesPreloadDataCopyWithImpl<$Res, - $Val extends NavApiDocsItemImageSizesPreloadData> - implements $NavApiDocsItemImageSizesPreloadDataCopyWith<$Res> { - _$NavApiDocsItemImageSizesPreloadDataCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of NavApiDocsItemImageSizesPreloadData - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? url = freezed, - Object? width = freezed, - Object? height = freezed, - Object? mimeType = freezed, - Object? filesize = freezed, - Object? filename = freezed, - }) { - return _then(_value.copyWith( - url: freezed == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as dynamic, - width: freezed == width - ? _value.width - : width // ignore: cast_nullable_to_non_nullable - as dynamic, - height: freezed == height - ? _value.height - : height // ignore: cast_nullable_to_non_nullable - as dynamic, - mimeType: freezed == mimeType - ? _value.mimeType - : mimeType // ignore: cast_nullable_to_non_nullable - as dynamic, - filesize: freezed == filesize - ? _value.filesize - : filesize // ignore: cast_nullable_to_non_nullable - as dynamic, - filename: freezed == filename - ? _value.filename - : filename // ignore: cast_nullable_to_non_nullable - as dynamic, - ) as $Val); + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is NavApiDocsItemImageSizesPreloadData && + const DeepCollectionEquality().equals(other.url, url) && + const DeepCollectionEquality().equals(other.width, width) && + const DeepCollectionEquality().equals(other.height, height) && + const DeepCollectionEquality().equals(other.mimeType, mimeType) && + const DeepCollectionEquality().equals(other.filesize, filesize) && + const DeepCollectionEquality().equals(other.filename, filename)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(url), + const DeepCollectionEquality().hash(width), + const DeepCollectionEquality().hash(height), + const DeepCollectionEquality().hash(mimeType), + const DeepCollectionEquality().hash(filesize), + const DeepCollectionEquality().hash(filename)); + + @override + String toString() { + return 'NavApiDocsItemImageSizesPreloadData(url: $url, width: $width, height: $height, mimeType: $mimeType, filesize: $filesize, filename: $filename)'; } } /// @nodoc -abstract class _$$NavApiDocsItemImageSizesPreloadDataImplCopyWith<$Res> - implements $NavApiDocsItemImageSizesPreloadDataCopyWith<$Res> { - factory _$$NavApiDocsItemImageSizesPreloadDataImplCopyWith( - _$NavApiDocsItemImageSizesPreloadDataImpl value, - $Res Function(_$NavApiDocsItemImageSizesPreloadDataImpl) then) = - __$$NavApiDocsItemImageSizesPreloadDataImplCopyWithImpl<$Res>; - @override +abstract mixin class $NavApiDocsItemImageSizesPreloadDataCopyWith<$Res> { + factory $NavApiDocsItemImageSizesPreloadDataCopyWith( + NavApiDocsItemImageSizesPreloadData value, + $Res Function(NavApiDocsItemImageSizesPreloadData) _then) = + _$NavApiDocsItemImageSizesPreloadDataCopyWithImpl; @useResult $Res call( {@JsonKey(name: 'url') dynamic url, @@ -2252,14 +2135,12 @@ abstract class _$$NavApiDocsItemImageSizesPreloadDataImplCopyWith<$Res> } /// @nodoc -class __$$NavApiDocsItemImageSizesPreloadDataImplCopyWithImpl<$Res> - extends _$NavApiDocsItemImageSizesPreloadDataCopyWithImpl<$Res, - _$NavApiDocsItemImageSizesPreloadDataImpl> - implements _$$NavApiDocsItemImageSizesPreloadDataImplCopyWith<$Res> { - __$$NavApiDocsItemImageSizesPreloadDataImplCopyWithImpl( - _$NavApiDocsItemImageSizesPreloadDataImpl _value, - $Res Function(_$NavApiDocsItemImageSizesPreloadDataImpl) _then) - : super(_value, _then); +class _$NavApiDocsItemImageSizesPreloadDataCopyWithImpl<$Res> + implements $NavApiDocsItemImageSizesPreloadDataCopyWith<$Res> { + _$NavApiDocsItemImageSizesPreloadDataCopyWithImpl(this._self, this._then); + + final NavApiDocsItemImageSizesPreloadData _self; + final $Res Function(NavApiDocsItemImageSizesPreloadData) _then; /// Create a copy of NavApiDocsItemImageSizesPreloadData /// with the given fields replaced by the non-null parameter values. @@ -2273,29 +2154,29 @@ class __$$NavApiDocsItemImageSizesPreloadDataImplCopyWithImpl<$Res> Object? filesize = freezed, Object? filename = freezed, }) { - return _then(_$NavApiDocsItemImageSizesPreloadDataImpl( + return _then(_self.copyWith( url: freezed == url - ? _value.url + ? _self.url : url // ignore: cast_nullable_to_non_nullable as dynamic, width: freezed == width - ? _value.width + ? _self.width : width // ignore: cast_nullable_to_non_nullable as dynamic, height: freezed == height - ? _value.height + ? _self.height : height // ignore: cast_nullable_to_non_nullable as dynamic, mimeType: freezed == mimeType - ? _value.mimeType + ? _self.mimeType : mimeType // ignore: cast_nullable_to_non_nullable as dynamic, filesize: freezed == filesize - ? _value.filesize + ? _self.filesize : filesize // ignore: cast_nullable_to_non_nullable as dynamic, filename: freezed == filename - ? _value.filename + ? _self.filename : filename // ignore: cast_nullable_to_non_nullable as dynamic, )); @@ -2304,9 +2185,9 @@ class __$$NavApiDocsItemImageSizesPreloadDataImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$NavApiDocsItemImageSizesPreloadDataImpl - extends _NavApiDocsItemImageSizesPreloadData { - const _$NavApiDocsItemImageSizesPreloadDataImpl( +class _NavApiDocsItemImageSizesPreloadData + extends NavApiDocsItemImageSizesPreloadData { + const _NavApiDocsItemImageSizesPreloadData( {@JsonKey(name: 'url') this.url, @JsonKey(name: 'width') this.width, @JsonKey(name: 'height') this.height, @@ -2314,10 +2195,9 @@ class _$NavApiDocsItemImageSizesPreloadDataImpl @JsonKey(name: 'filesize') this.filesize, @JsonKey(name: 'filename') this.filename}) : super._(); - - factory _$NavApiDocsItemImageSizesPreloadDataImpl.fromJson( + factory _NavApiDocsItemImageSizesPreloadData.fromJson( Map json) => - _$$NavApiDocsItemImageSizesPreloadDataImplFromJson(json); + _$NavApiDocsItemImageSizesPreloadDataFromJson(json); @override @JsonKey(name: 'url') @@ -2338,16 +2218,28 @@ class _$NavApiDocsItemImageSizesPreloadDataImpl @JsonKey(name: 'filename') final dynamic filename; + /// Create a copy of NavApiDocsItemImageSizesPreloadData + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'NavApiDocsItemImageSizesPreloadData(url: $url, width: $width, height: $height, mimeType: $mimeType, filesize: $filesize, filename: $filename)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$NavApiDocsItemImageSizesPreloadDataCopyWith< + _NavApiDocsItemImageSizesPreloadData> + get copyWith => __$NavApiDocsItemImageSizesPreloadDataCopyWithImpl< + _NavApiDocsItemImageSizesPreloadData>(this, _$identity); + + @override + Map toJson() { + return _$NavApiDocsItemImageSizesPreloadDataToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$NavApiDocsItemImageSizesPreloadDataImpl && + other is _NavApiDocsItemImageSizesPreloadData && const DeepCollectionEquality().equals(other.url, url) && const DeepCollectionEquality().equals(other.width, width) && const DeepCollectionEquality().equals(other.height, height) && @@ -2367,282 +2259,254 @@ class _$NavApiDocsItemImageSizesPreloadDataImpl const DeepCollectionEquality().hash(filesize), const DeepCollectionEquality().hash(filename)); - /// Create a copy of NavApiDocsItemImageSizesPreloadData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$NavApiDocsItemImageSizesPreloadDataImplCopyWith< - _$NavApiDocsItemImageSizesPreloadDataImpl> - get copyWith => __$$NavApiDocsItemImageSizesPreloadDataImplCopyWithImpl< - _$NavApiDocsItemImageSizesPreloadDataImpl>(this, _$identity); - - @override - Map toJson() { - return _$$NavApiDocsItemImageSizesPreloadDataImplToJson( - this, - ); + String toString() { + return 'NavApiDocsItemImageSizesPreloadData(url: $url, width: $width, height: $height, mimeType: $mimeType, filesize: $filesize, filename: $filename)'; } } -abstract class _NavApiDocsItemImageSizesPreloadData - extends NavApiDocsItemImageSizesPreloadData { - const factory _NavApiDocsItemImageSizesPreloadData( - {@JsonKey(name: 'url') final dynamic url, - @JsonKey(name: 'width') final dynamic width, - @JsonKey(name: 'height') final dynamic height, - @JsonKey(name: 'mimeType') final dynamic mimeType, - @JsonKey(name: 'filesize') final dynamic filesize, - @JsonKey(name: 'filename') final dynamic filename}) = - _$NavApiDocsItemImageSizesPreloadDataImpl; - const _NavApiDocsItemImageSizesPreloadData._() : super._(); +/// @nodoc +abstract mixin class _$NavApiDocsItemImageSizesPreloadDataCopyWith<$Res> + implements $NavApiDocsItemImageSizesPreloadDataCopyWith<$Res> { + factory _$NavApiDocsItemImageSizesPreloadDataCopyWith( + _NavApiDocsItemImageSizesPreloadData value, + $Res Function(_NavApiDocsItemImageSizesPreloadData) _then) = + __$NavApiDocsItemImageSizesPreloadDataCopyWithImpl; + @override + @useResult + $Res call( + {@JsonKey(name: 'url') dynamic url, + @JsonKey(name: 'width') dynamic width, + @JsonKey(name: 'height') dynamic height, + @JsonKey(name: 'mimeType') dynamic mimeType, + @JsonKey(name: 'filesize') dynamic filesize, + @JsonKey(name: 'filename') dynamic filename}); +} - factory _NavApiDocsItemImageSizesPreloadData.fromJson( - Map json) = - _$NavApiDocsItemImageSizesPreloadDataImpl.fromJson; +/// @nodoc +class __$NavApiDocsItemImageSizesPreloadDataCopyWithImpl<$Res> + implements _$NavApiDocsItemImageSizesPreloadDataCopyWith<$Res> { + __$NavApiDocsItemImageSizesPreloadDataCopyWithImpl(this._self, this._then); - @override - @JsonKey(name: 'url') - dynamic get url; - @override - @JsonKey(name: 'width') - dynamic get width; - @override - @JsonKey(name: 'height') - dynamic get height; - @override - @JsonKey(name: 'mimeType') - dynamic get mimeType; - @override - @JsonKey(name: 'filesize') - dynamic get filesize; - @override - @JsonKey(name: 'filename') - dynamic get filename; + final _NavApiDocsItemImageSizesPreloadData _self; + final $Res Function(_NavApiDocsItemImageSizesPreloadData) _then; /// Create a copy of NavApiDocsItemImageSizesPreloadData /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$NavApiDocsItemImageSizesPreloadDataImplCopyWith< - _$NavApiDocsItemImageSizesPreloadDataImpl> - get copyWith => throw _privateConstructorUsedError; -} - -NavApiDocsItemImageSizesCardData _$NavApiDocsItemImageSizesCardDataFromJson( - Map json) { - return _NavApiDocsItemImageSizesCardData.fromJson(json); + @pragma('vm:prefer-inline') + $Res call({ + Object? url = freezed, + Object? width = freezed, + Object? height = freezed, + Object? mimeType = freezed, + Object? filesize = freezed, + Object? filename = freezed, + }) { + return _then(_NavApiDocsItemImageSizesPreloadData( + url: freezed == url + ? _self.url + : url // ignore: cast_nullable_to_non_nullable + as dynamic, + width: freezed == width + ? _self.width + : width // ignore: cast_nullable_to_non_nullable + as dynamic, + height: freezed == height + ? _self.height + : height // ignore: cast_nullable_to_non_nullable + as dynamic, + mimeType: freezed == mimeType + ? _self.mimeType + : mimeType // ignore: cast_nullable_to_non_nullable + as dynamic, + filesize: freezed == filesize + ? _self.filesize + : filesize // ignore: cast_nullable_to_non_nullable + as dynamic, + filename: freezed == filename + ? _self.filename + : filename // ignore: cast_nullable_to_non_nullable + as dynamic, + )); + } } /// @nodoc mixin _$NavApiDocsItemImageSizesCardData { @JsonKey(name: 'url') - String get url => throw _privateConstructorUsedError; + String get url; @JsonKey(name: 'width') - int get width => throw _privateConstructorUsedError; + int get width; @JsonKey(name: 'height') - int get height => throw _privateConstructorUsedError; + int get height; @JsonKey(name: 'mimeType') - String get mimeType => throw _privateConstructorUsedError; + String get mimeType; @JsonKey(name: 'filesize') - int get filesize => throw _privateConstructorUsedError; + int get filesize; @JsonKey(name: 'filename') - String get filename => throw _privateConstructorUsedError; - - /// Serializes this NavApiDocsItemImageSizesCardData to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String get filename; /// Create a copy of NavApiDocsItemImageSizesCardData /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $NavApiDocsItemImageSizesCardDataCopyWith - get copyWith => throw _privateConstructorUsedError; -} + get copyWith => _$NavApiDocsItemImageSizesCardDataCopyWithImpl< + NavApiDocsItemImageSizesCardData>( + this as NavApiDocsItemImageSizesCardData, _$identity); -/// @nodoc -abstract class $NavApiDocsItemImageSizesCardDataCopyWith<$Res> { - factory $NavApiDocsItemImageSizesCardDataCopyWith( - NavApiDocsItemImageSizesCardData value, - $Res Function(NavApiDocsItemImageSizesCardData) then) = - _$NavApiDocsItemImageSizesCardDataCopyWithImpl<$Res, - NavApiDocsItemImageSizesCardData>; - @useResult - $Res call( - {@JsonKey(name: 'url') String url, - @JsonKey(name: 'width') int width, - @JsonKey(name: 'height') int height, - @JsonKey(name: 'mimeType') String mimeType, - @JsonKey(name: 'filesize') int filesize, - @JsonKey(name: 'filename') String filename}); -} + /// Serializes this NavApiDocsItemImageSizesCardData to a JSON map. + Map toJson(); -/// @nodoc -class _$NavApiDocsItemImageSizesCardDataCopyWithImpl<$Res, - $Val extends NavApiDocsItemImageSizesCardData> - implements $NavApiDocsItemImageSizesCardDataCopyWith<$Res> { - _$NavApiDocsItemImageSizesCardDataCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of NavApiDocsItemImageSizesCardData - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? url = null, - Object? width = null, - Object? height = null, - Object? mimeType = null, - Object? filesize = null, - Object? filename = null, - }) { - return _then(_value.copyWith( - url: null == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String, - width: null == width - ? _value.width - : width // ignore: cast_nullable_to_non_nullable - as int, - height: null == height - ? _value.height - : height // ignore: cast_nullable_to_non_nullable - as int, - mimeType: null == mimeType - ? _value.mimeType - : mimeType // ignore: cast_nullable_to_non_nullable - as String, - filesize: null == filesize - ? _value.filesize - : filesize // ignore: cast_nullable_to_non_nullable - as int, - filename: null == filename - ? _value.filename - : filename // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is NavApiDocsItemImageSizesCardData && + (identical(other.url, url) || other.url == url) && + (identical(other.width, width) || other.width == width) && + (identical(other.height, height) || other.height == height) && + (identical(other.mimeType, mimeType) || + other.mimeType == mimeType) && + (identical(other.filesize, filesize) || + other.filesize == filesize) && + (identical(other.filename, filename) || + other.filename == filename)); } -} -/// @nodoc -abstract class _$$NavApiDocsItemImageSizesCardDataImplCopyWith<$Res> - implements $NavApiDocsItemImageSizesCardDataCopyWith<$Res> { - factory _$$NavApiDocsItemImageSizesCardDataImplCopyWith( - _$NavApiDocsItemImageSizesCardDataImpl value, - $Res Function(_$NavApiDocsItemImageSizesCardDataImpl) then) = - __$$NavApiDocsItemImageSizesCardDataImplCopyWithImpl<$Res>; + @JsonKey(includeFromJson: false, includeToJson: false) @override - @useResult - $Res call( - {@JsonKey(name: 'url') String url, - @JsonKey(name: 'width') int width, - @JsonKey(name: 'height') int height, - @JsonKey(name: 'mimeType') String mimeType, - @JsonKey(name: 'filesize') int filesize, - @JsonKey(name: 'filename') String filename}); -} - -/// @nodoc -class __$$NavApiDocsItemImageSizesCardDataImplCopyWithImpl<$Res> - extends _$NavApiDocsItemImageSizesCardDataCopyWithImpl<$Res, - _$NavApiDocsItemImageSizesCardDataImpl> - implements _$$NavApiDocsItemImageSizesCardDataImplCopyWith<$Res> { - __$$NavApiDocsItemImageSizesCardDataImplCopyWithImpl( - _$NavApiDocsItemImageSizesCardDataImpl _value, - $Res Function(_$NavApiDocsItemImageSizesCardDataImpl) _then) - : super(_value, _then); - - /// Create a copy of NavApiDocsItemImageSizesCardData - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? url = null, - Object? width = null, - Object? height = null, - Object? mimeType = null, - Object? filesize = null, - Object? filename = null, - }) { - return _then(_$NavApiDocsItemImageSizesCardDataImpl( - url: null == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String, - width: null == width - ? _value.width - : width // ignore: cast_nullable_to_non_nullable - as int, - height: null == height - ? _value.height - : height // ignore: cast_nullable_to_non_nullable - as int, - mimeType: null == mimeType - ? _value.mimeType - : mimeType // ignore: cast_nullable_to_non_nullable - as String, - filesize: null == filesize - ? _value.filesize - : filesize // ignore: cast_nullable_to_non_nullable - as int, - filename: null == filename - ? _value.filename - : filename // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$NavApiDocsItemImageSizesCardDataImpl - extends _NavApiDocsItemImageSizesCardData { - const _$NavApiDocsItemImageSizesCardDataImpl( - {@JsonKey(name: 'url') this.url = '', - @JsonKey(name: 'width') this.width = 0, - @JsonKey(name: 'height') this.height = 0, - @JsonKey(name: 'mimeType') this.mimeType = '', - @JsonKey(name: 'filesize') this.filesize = 0, - @JsonKey(name: 'filename') this.filename = ''}) - : super._(); - - factory _$NavApiDocsItemImageSizesCardDataImpl.fromJson( - Map json) => - _$$NavApiDocsItemImageSizesCardDataImplFromJson(json); - - @override - @JsonKey(name: 'url') - final String url; - @override - @JsonKey(name: 'width') - final int width; - @override - @JsonKey(name: 'height') - final int height; - @override - @JsonKey(name: 'mimeType') - final String mimeType; - @override - @JsonKey(name: 'filesize') - final int filesize; - @override - @JsonKey(name: 'filename') - final String filename; + int get hashCode => Object.hash( + runtimeType, url, width, height, mimeType, filesize, filename); @override String toString() { return 'NavApiDocsItemImageSizesCardData(url: $url, width: $width, height: $height, mimeType: $mimeType, filesize: $filesize, filename: $filename)'; } +} + +/// @nodoc +abstract mixin class $NavApiDocsItemImageSizesCardDataCopyWith<$Res> { + factory $NavApiDocsItemImageSizesCardDataCopyWith( + NavApiDocsItemImageSizesCardData value, + $Res Function(NavApiDocsItemImageSizesCardData) _then) = + _$NavApiDocsItemImageSizesCardDataCopyWithImpl; + @useResult + $Res call( + {@JsonKey(name: 'url') String url, + @JsonKey(name: 'width') int width, + @JsonKey(name: 'height') int height, + @JsonKey(name: 'mimeType') String mimeType, + @JsonKey(name: 'filesize') int filesize, + @JsonKey(name: 'filename') String filename}); +} + +/// @nodoc +class _$NavApiDocsItemImageSizesCardDataCopyWithImpl<$Res> + implements $NavApiDocsItemImageSizesCardDataCopyWith<$Res> { + _$NavApiDocsItemImageSizesCardDataCopyWithImpl(this._self, this._then); + + final NavApiDocsItemImageSizesCardData _self; + final $Res Function(NavApiDocsItemImageSizesCardData) _then; + + /// Create a copy of NavApiDocsItemImageSizesCardData + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? url = null, + Object? width = null, + Object? height = null, + Object? mimeType = null, + Object? filesize = null, + Object? filename = null, + }) { + return _then(_self.copyWith( + url: null == url + ? _self.url + : url // ignore: cast_nullable_to_non_nullable + as String, + width: null == width + ? _self.width + : width // ignore: cast_nullable_to_non_nullable + as int, + height: null == height + ? _self.height + : height // ignore: cast_nullable_to_non_nullable + as int, + mimeType: null == mimeType + ? _self.mimeType + : mimeType // ignore: cast_nullable_to_non_nullable + as String, + filesize: null == filesize + ? _self.filesize + : filesize // ignore: cast_nullable_to_non_nullable + as int, + filename: null == filename + ? _self.filename + : filename // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _NavApiDocsItemImageSizesCardData + extends NavApiDocsItemImageSizesCardData { + const _NavApiDocsItemImageSizesCardData( + {@JsonKey(name: 'url') this.url = '', + @JsonKey(name: 'width') this.width = 0, + @JsonKey(name: 'height') this.height = 0, + @JsonKey(name: 'mimeType') this.mimeType = '', + @JsonKey(name: 'filesize') this.filesize = 0, + @JsonKey(name: 'filename') this.filename = ''}) + : super._(); + factory _NavApiDocsItemImageSizesCardData.fromJson( + Map json) => + _$NavApiDocsItemImageSizesCardDataFromJson(json); + + @override + @JsonKey(name: 'url') + final String url; + @override + @JsonKey(name: 'width') + final int width; + @override + @JsonKey(name: 'height') + final int height; + @override + @JsonKey(name: 'mimeType') + final String mimeType; + @override + @JsonKey(name: 'filesize') + final int filesize; + @override + @JsonKey(name: 'filename') + final String filename; + + /// Create a copy of NavApiDocsItemImageSizesCardData + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$NavApiDocsItemImageSizesCardDataCopyWith<_NavApiDocsItemImageSizesCardData> + get copyWith => __$NavApiDocsItemImageSizesCardDataCopyWithImpl< + _NavApiDocsItemImageSizesCardData>(this, _$identity); + + @override + Map toJson() { + return _$NavApiDocsItemImageSizesCardDataToJson( + this, + ); + } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$NavApiDocsItemImageSizesCardDataImpl && + other is _NavApiDocsItemImageSizesCardData && (identical(other.url, url) || other.url == url) && (identical(other.width, width) || other.width == width) && (identical(other.height, height) || other.height == height) && @@ -2659,399 +2523,140 @@ class _$NavApiDocsItemImageSizesCardDataImpl int get hashCode => Object.hash( runtimeType, url, width, height, mimeType, filesize, filename); - /// Create a copy of NavApiDocsItemImageSizesCardData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$NavApiDocsItemImageSizesCardDataImplCopyWith< - _$NavApiDocsItemImageSizesCardDataImpl> - get copyWith => __$$NavApiDocsItemImageSizesCardDataImplCopyWithImpl< - _$NavApiDocsItemImageSizesCardDataImpl>(this, _$identity); - - @override - Map toJson() { - return _$$NavApiDocsItemImageSizesCardDataImplToJson( - this, - ); + String toString() { + return 'NavApiDocsItemImageSizesCardData(url: $url, width: $width, height: $height, mimeType: $mimeType, filesize: $filesize, filename: $filename)'; } } -abstract class _NavApiDocsItemImageSizesCardData - extends NavApiDocsItemImageSizesCardData { - const factory _NavApiDocsItemImageSizesCardData( - {@JsonKey(name: 'url') final String url, - @JsonKey(name: 'width') final int width, - @JsonKey(name: 'height') final int height, - @JsonKey(name: 'mimeType') final String mimeType, - @JsonKey(name: 'filesize') final int filesize, - @JsonKey(name: 'filename') final String filename}) = - _$NavApiDocsItemImageSizesCardDataImpl; - const _NavApiDocsItemImageSizesCardData._() : super._(); +/// @nodoc +abstract mixin class _$NavApiDocsItemImageSizesCardDataCopyWith<$Res> + implements $NavApiDocsItemImageSizesCardDataCopyWith<$Res> { + factory _$NavApiDocsItemImageSizesCardDataCopyWith( + _NavApiDocsItemImageSizesCardData value, + $Res Function(_NavApiDocsItemImageSizesCardData) _then) = + __$NavApiDocsItemImageSizesCardDataCopyWithImpl; + @override + @useResult + $Res call( + {@JsonKey(name: 'url') String url, + @JsonKey(name: 'width') int width, + @JsonKey(name: 'height') int height, + @JsonKey(name: 'mimeType') String mimeType, + @JsonKey(name: 'filesize') int filesize, + @JsonKey(name: 'filename') String filename}); +} - factory _NavApiDocsItemImageSizesCardData.fromJson( - Map json) = - _$NavApiDocsItemImageSizesCardDataImpl.fromJson; +/// @nodoc +class __$NavApiDocsItemImageSizesCardDataCopyWithImpl<$Res> + implements _$NavApiDocsItemImageSizesCardDataCopyWith<$Res> { + __$NavApiDocsItemImageSizesCardDataCopyWithImpl(this._self, this._then); - @override - @JsonKey(name: 'url') - String get url; - @override - @JsonKey(name: 'width') - int get width; - @override - @JsonKey(name: 'height') - int get height; - @override - @JsonKey(name: 'mimeType') - String get mimeType; - @override - @JsonKey(name: 'filesize') - int get filesize; - @override - @JsonKey(name: 'filename') - String get filename; + final _NavApiDocsItemImageSizesCardData _self; + final $Res Function(_NavApiDocsItemImageSizesCardData) _then; /// Create a copy of NavApiDocsItemImageSizesCardData /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$NavApiDocsItemImageSizesCardDataImplCopyWith< - _$NavApiDocsItemImageSizesCardDataImpl> - get copyWith => throw _privateConstructorUsedError; -} - -NavApiDocsItemImageSizesTabletData _$NavApiDocsItemImageSizesTabletDataFromJson( - Map json) { - return _NavApiDocsItemImageSizesTabletData.fromJson(json); + @pragma('vm:prefer-inline') + $Res call({ + Object? url = null, + Object? width = null, + Object? height = null, + Object? mimeType = null, + Object? filesize = null, + Object? filename = null, + }) { + return _then(_NavApiDocsItemImageSizesCardData( + url: null == url + ? _self.url + : url // ignore: cast_nullable_to_non_nullable + as String, + width: null == width + ? _self.width + : width // ignore: cast_nullable_to_non_nullable + as int, + height: null == height + ? _self.height + : height // ignore: cast_nullable_to_non_nullable + as int, + mimeType: null == mimeType + ? _self.mimeType + : mimeType // ignore: cast_nullable_to_non_nullable + as String, + filesize: null == filesize + ? _self.filesize + : filesize // ignore: cast_nullable_to_non_nullable + as int, + filename: null == filename + ? _self.filename + : filename // ignore: cast_nullable_to_non_nullable + as String, + )); + } } /// @nodoc mixin _$NavApiDocsItemImageSizesTabletData { @JsonKey(name: 'url') - String get url => throw _privateConstructorUsedError; + String get url; @JsonKey(name: 'width') - int get width => throw _privateConstructorUsedError; + int get width; @JsonKey(name: 'height') - int get height => throw _privateConstructorUsedError; + int get height; @JsonKey(name: 'mimeType') - String get mimeType => throw _privateConstructorUsedError; + String get mimeType; @JsonKey(name: 'filesize') - int get filesize => throw _privateConstructorUsedError; + int get filesize; @JsonKey(name: 'filename') - String get filename => throw _privateConstructorUsedError; - - /// Serializes this NavApiDocsItemImageSizesTabletData to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String get filename; /// Create a copy of NavApiDocsItemImageSizesTabletData /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') $NavApiDocsItemImageSizesTabletDataCopyWith< NavApiDocsItemImageSizesTabletData> - get copyWith => throw _privateConstructorUsedError; -} + get copyWith => _$NavApiDocsItemImageSizesTabletDataCopyWithImpl< + NavApiDocsItemImageSizesTabletData>( + this as NavApiDocsItemImageSizesTabletData, _$identity); -/// @nodoc -abstract class $NavApiDocsItemImageSizesTabletDataCopyWith<$Res> { - factory $NavApiDocsItemImageSizesTabletDataCopyWith( - NavApiDocsItemImageSizesTabletData value, - $Res Function(NavApiDocsItemImageSizesTabletData) then) = - _$NavApiDocsItemImageSizesTabletDataCopyWithImpl<$Res, - NavApiDocsItemImageSizesTabletData>; - @useResult - $Res call( - {@JsonKey(name: 'url') String url, - @JsonKey(name: 'width') int width, - @JsonKey(name: 'height') int height, - @JsonKey(name: 'mimeType') String mimeType, - @JsonKey(name: 'filesize') int filesize, - @JsonKey(name: 'filename') String filename}); -} + /// Serializes this NavApiDocsItemImageSizesTabletData to a JSON map. + Map toJson(); -/// @nodoc -class _$NavApiDocsItemImageSizesTabletDataCopyWithImpl<$Res, - $Val extends NavApiDocsItemImageSizesTabletData> - implements $NavApiDocsItemImageSizesTabletDataCopyWith<$Res> { - _$NavApiDocsItemImageSizesTabletDataCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of NavApiDocsItemImageSizesTabletData - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') @override - $Res call({ - Object? url = null, - Object? width = null, - Object? height = null, - Object? mimeType = null, - Object? filesize = null, - Object? filename = null, - }) { - return _then(_value.copyWith( - url: null == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String, - width: null == width - ? _value.width - : width // ignore: cast_nullable_to_non_nullable - as int, - height: null == height - ? _value.height - : height // ignore: cast_nullable_to_non_nullable - as int, - mimeType: null == mimeType - ? _value.mimeType - : mimeType // ignore: cast_nullable_to_non_nullable - as String, - filesize: null == filesize - ? _value.filesize - : filesize // ignore: cast_nullable_to_non_nullable - as int, - filename: null == filename - ? _value.filename - : filename // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is NavApiDocsItemImageSizesTabletData && + (identical(other.url, url) || other.url == url) && + (identical(other.width, width) || other.width == width) && + (identical(other.height, height) || other.height == height) && + (identical(other.mimeType, mimeType) || + other.mimeType == mimeType) && + (identical(other.filesize, filesize) || + other.filesize == filesize) && + (identical(other.filename, filename) || + other.filename == filename)); } -} -/// @nodoc -abstract class _$$NavApiDocsItemImageSizesTabletDataImplCopyWith<$Res> - implements $NavApiDocsItemImageSizesTabletDataCopyWith<$Res> { - factory _$$NavApiDocsItemImageSizesTabletDataImplCopyWith( - _$NavApiDocsItemImageSizesTabletDataImpl value, - $Res Function(_$NavApiDocsItemImageSizesTabletDataImpl) then) = - __$$NavApiDocsItemImageSizesTabletDataImplCopyWithImpl<$Res>; + @JsonKey(includeFromJson: false, includeToJson: false) @override - @useResult - $Res call( - {@JsonKey(name: 'url') String url, - @JsonKey(name: 'width') int width, - @JsonKey(name: 'height') int height, - @JsonKey(name: 'mimeType') String mimeType, - @JsonKey(name: 'filesize') int filesize, - @JsonKey(name: 'filename') String filename}); -} - -/// @nodoc -class __$$NavApiDocsItemImageSizesTabletDataImplCopyWithImpl<$Res> - extends _$NavApiDocsItemImageSizesTabletDataCopyWithImpl<$Res, - _$NavApiDocsItemImageSizesTabletDataImpl> - implements _$$NavApiDocsItemImageSizesTabletDataImplCopyWith<$Res> { - __$$NavApiDocsItemImageSizesTabletDataImplCopyWithImpl( - _$NavApiDocsItemImageSizesTabletDataImpl _value, - $Res Function(_$NavApiDocsItemImageSizesTabletDataImpl) _then) - : super(_value, _then); - - /// Create a copy of NavApiDocsItemImageSizesTabletData - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? url = null, - Object? width = null, - Object? height = null, - Object? mimeType = null, - Object? filesize = null, - Object? filename = null, - }) { - return _then(_$NavApiDocsItemImageSizesTabletDataImpl( - url: null == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String, - width: null == width - ? _value.width - : width // ignore: cast_nullable_to_non_nullable - as int, - height: null == height - ? _value.height - : height // ignore: cast_nullable_to_non_nullable - as int, - mimeType: null == mimeType - ? _value.mimeType - : mimeType // ignore: cast_nullable_to_non_nullable - as String, - filesize: null == filesize - ? _value.filesize - : filesize // ignore: cast_nullable_to_non_nullable - as int, - filename: null == filename - ? _value.filename - : filename // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$NavApiDocsItemImageSizesTabletDataImpl - extends _NavApiDocsItemImageSizesTabletData { - const _$NavApiDocsItemImageSizesTabletDataImpl( - {@JsonKey(name: 'url') this.url = '', - @JsonKey(name: 'width') this.width = 0, - @JsonKey(name: 'height') this.height = 0, - @JsonKey(name: 'mimeType') this.mimeType = '', - @JsonKey(name: 'filesize') this.filesize = 0, - @JsonKey(name: 'filename') this.filename = ''}) - : super._(); - - factory _$NavApiDocsItemImageSizesTabletDataImpl.fromJson( - Map json) => - _$$NavApiDocsItemImageSizesTabletDataImplFromJson(json); - - @override - @JsonKey(name: 'url') - final String url; - @override - @JsonKey(name: 'width') - final int width; - @override - @JsonKey(name: 'height') - final int height; - @override - @JsonKey(name: 'mimeType') - final String mimeType; - @override - @JsonKey(name: 'filesize') - final int filesize; - @override - @JsonKey(name: 'filename') - final String filename; + int get hashCode => Object.hash( + runtimeType, url, width, height, mimeType, filesize, filename); @override String toString() { return 'NavApiDocsItemImageSizesTabletData(url: $url, width: $width, height: $height, mimeType: $mimeType, filesize: $filesize, filename: $filename)'; } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$NavApiDocsItemImageSizesTabletDataImpl && - (identical(other.url, url) || other.url == url) && - (identical(other.width, width) || other.width == width) && - (identical(other.height, height) || other.height == height) && - (identical(other.mimeType, mimeType) || - other.mimeType == mimeType) && - (identical(other.filesize, filesize) || - other.filesize == filesize) && - (identical(other.filename, filename) || - other.filename == filename)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, url, width, height, mimeType, filesize, filename); - - /// Create a copy of NavApiDocsItemImageSizesTabletData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @override - @pragma('vm:prefer-inline') - _$$NavApiDocsItemImageSizesTabletDataImplCopyWith< - _$NavApiDocsItemImageSizesTabletDataImpl> - get copyWith => __$$NavApiDocsItemImageSizesTabletDataImplCopyWithImpl< - _$NavApiDocsItemImageSizesTabletDataImpl>(this, _$identity); - - @override - Map toJson() { - return _$$NavApiDocsItemImageSizesTabletDataImplToJson( - this, - ); - } -} - -abstract class _NavApiDocsItemImageSizesTabletData - extends NavApiDocsItemImageSizesTabletData { - const factory _NavApiDocsItemImageSizesTabletData( - {@JsonKey(name: 'url') final String url, - @JsonKey(name: 'width') final int width, - @JsonKey(name: 'height') final int height, - @JsonKey(name: 'mimeType') final String mimeType, - @JsonKey(name: 'filesize') final int filesize, - @JsonKey(name: 'filename') final String filename}) = - _$NavApiDocsItemImageSizesTabletDataImpl; - const _NavApiDocsItemImageSizesTabletData._() : super._(); - - factory _NavApiDocsItemImageSizesTabletData.fromJson( - Map json) = - _$NavApiDocsItemImageSizesTabletDataImpl.fromJson; - - @override - @JsonKey(name: 'url') - String get url; - @override - @JsonKey(name: 'width') - int get width; - @override - @JsonKey(name: 'height') - int get height; - @override - @JsonKey(name: 'mimeType') - String get mimeType; - @override - @JsonKey(name: 'filesize') - int get filesize; - @override - @JsonKey(name: 'filename') - String get filename; - - /// Create a copy of NavApiDocsItemImageSizesTabletData - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$NavApiDocsItemImageSizesTabletDataImplCopyWith< - _$NavApiDocsItemImageSizesTabletDataImpl> - get copyWith => throw _privateConstructorUsedError; -} - -NavApiDocsItemImageSizesAvatarData _$NavApiDocsItemImageSizesAvatarDataFromJson( - Map json) { - return _NavApiDocsItemImageSizesAvatarData.fromJson(json); } /// @nodoc -mixin _$NavApiDocsItemImageSizesAvatarData { - @JsonKey(name: 'url') - String get url => throw _privateConstructorUsedError; - @JsonKey(name: 'width') - int get width => throw _privateConstructorUsedError; - @JsonKey(name: 'height') - int get height => throw _privateConstructorUsedError; - @JsonKey(name: 'mimeType') - String get mimeType => throw _privateConstructorUsedError; - @JsonKey(name: 'filesize') - int get filesize => throw _privateConstructorUsedError; - @JsonKey(name: 'filename') - String get filename => throw _privateConstructorUsedError; - - /// Serializes this NavApiDocsItemImageSizesAvatarData to a JSON map. - Map toJson() => throw _privateConstructorUsedError; - - /// Create a copy of NavApiDocsItemImageSizesAvatarData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - $NavApiDocsItemImageSizesAvatarDataCopyWith< - NavApiDocsItemImageSizesAvatarData> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $NavApiDocsItemImageSizesAvatarDataCopyWith<$Res> { - factory $NavApiDocsItemImageSizesAvatarDataCopyWith( - NavApiDocsItemImageSizesAvatarData value, - $Res Function(NavApiDocsItemImageSizesAvatarData) then) = - _$NavApiDocsItemImageSizesAvatarDataCopyWithImpl<$Res, - NavApiDocsItemImageSizesAvatarData>; +abstract mixin class $NavApiDocsItemImageSizesTabletDataCopyWith<$Res> { + factory $NavApiDocsItemImageSizesTabletDataCopyWith( + NavApiDocsItemImageSizesTabletData value, + $Res Function(NavApiDocsItemImageSizesTabletData) _then) = + _$NavApiDocsItemImageSizesTabletDataCopyWithImpl; @useResult $Res call( {@JsonKey(name: 'url') String url, @@ -3063,17 +2668,14 @@ abstract class $NavApiDocsItemImageSizesAvatarDataCopyWith<$Res> { } /// @nodoc -class _$NavApiDocsItemImageSizesAvatarDataCopyWithImpl<$Res, - $Val extends NavApiDocsItemImageSizesAvatarData> - implements $NavApiDocsItemImageSizesAvatarDataCopyWith<$Res> { - _$NavApiDocsItemImageSizesAvatarDataCopyWithImpl(this._value, this._then); +class _$NavApiDocsItemImageSizesTabletDataCopyWithImpl<$Res> + implements $NavApiDocsItemImageSizesTabletDataCopyWith<$Res> { + _$NavApiDocsItemImageSizesTabletDataCopyWithImpl(this._self, this._then); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + final NavApiDocsItemImageSizesTabletData _self; + final $Res Function(NavApiDocsItemImageSizesTabletData) _then; - /// Create a copy of NavApiDocsItemImageSizesAvatarData + /// Create a copy of NavApiDocsItemImageSizesTabletData /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override @@ -3085,98 +2687,29 @@ class _$NavApiDocsItemImageSizesAvatarDataCopyWithImpl<$Res, Object? filesize = null, Object? filename = null, }) { - return _then(_value.copyWith( + return _then(_self.copyWith( url: null == url - ? _value.url + ? _self.url : url // ignore: cast_nullable_to_non_nullable as String, width: null == width - ? _value.width + ? _self.width : width // ignore: cast_nullable_to_non_nullable as int, height: null == height - ? _value.height + ? _self.height : height // ignore: cast_nullable_to_non_nullable as int, mimeType: null == mimeType - ? _value.mimeType + ? _self.mimeType : mimeType // ignore: cast_nullable_to_non_nullable as String, filesize: null == filesize - ? _value.filesize + ? _self.filesize : filesize // ignore: cast_nullable_to_non_nullable as int, filename: null == filename - ? _value.filename - : filename // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$NavApiDocsItemImageSizesAvatarDataImplCopyWith<$Res> - implements $NavApiDocsItemImageSizesAvatarDataCopyWith<$Res> { - factory _$$NavApiDocsItemImageSizesAvatarDataImplCopyWith( - _$NavApiDocsItemImageSizesAvatarDataImpl value, - $Res Function(_$NavApiDocsItemImageSizesAvatarDataImpl) then) = - __$$NavApiDocsItemImageSizesAvatarDataImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {@JsonKey(name: 'url') String url, - @JsonKey(name: 'width') int width, - @JsonKey(name: 'height') int height, - @JsonKey(name: 'mimeType') String mimeType, - @JsonKey(name: 'filesize') int filesize, - @JsonKey(name: 'filename') String filename}); -} - -/// @nodoc -class __$$NavApiDocsItemImageSizesAvatarDataImplCopyWithImpl<$Res> - extends _$NavApiDocsItemImageSizesAvatarDataCopyWithImpl<$Res, - _$NavApiDocsItemImageSizesAvatarDataImpl> - implements _$$NavApiDocsItemImageSizesAvatarDataImplCopyWith<$Res> { - __$$NavApiDocsItemImageSizesAvatarDataImplCopyWithImpl( - _$NavApiDocsItemImageSizesAvatarDataImpl _value, - $Res Function(_$NavApiDocsItemImageSizesAvatarDataImpl) _then) - : super(_value, _then); - - /// Create a copy of NavApiDocsItemImageSizesAvatarData - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? url = null, - Object? width = null, - Object? height = null, - Object? mimeType = null, - Object? filesize = null, - Object? filename = null, - }) { - return _then(_$NavApiDocsItemImageSizesAvatarDataImpl( - url: null == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String, - width: null == width - ? _value.width - : width // ignore: cast_nullable_to_non_nullable - as int, - height: null == height - ? _value.height - : height // ignore: cast_nullable_to_non_nullable - as int, - mimeType: null == mimeType - ? _value.mimeType - : mimeType // ignore: cast_nullable_to_non_nullable - as String, - filesize: null == filesize - ? _value.filesize - : filesize // ignore: cast_nullable_to_non_nullable - as int, - filename: null == filename - ? _value.filename + ? _self.filename : filename // ignore: cast_nullable_to_non_nullable as String, )); @@ -3185,9 +2718,9 @@ class __$$NavApiDocsItemImageSizesAvatarDataImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$NavApiDocsItemImageSizesAvatarDataImpl - extends _NavApiDocsItemImageSizesAvatarData { - const _$NavApiDocsItemImageSizesAvatarDataImpl( +class _NavApiDocsItemImageSizesTabletData + extends NavApiDocsItemImageSizesTabletData { + const _NavApiDocsItemImageSizesTabletData( {@JsonKey(name: 'url') this.url = '', @JsonKey(name: 'width') this.width = 0, @JsonKey(name: 'height') this.height = 0, @@ -3195,10 +2728,9 @@ class _$NavApiDocsItemImageSizesAvatarDataImpl @JsonKey(name: 'filesize') this.filesize = 0, @JsonKey(name: 'filename') this.filename = ''}) : super._(); - - factory _$NavApiDocsItemImageSizesAvatarDataImpl.fromJson( + factory _NavApiDocsItemImageSizesTabletData.fromJson( Map json) => - _$$NavApiDocsItemImageSizesAvatarDataImplFromJson(json); + _$NavApiDocsItemImageSizesTabletDataFromJson(json); @override @JsonKey(name: 'url') @@ -3219,16 +2751,28 @@ class _$NavApiDocsItemImageSizesAvatarDataImpl @JsonKey(name: 'filename') final String filename; + /// Create a copy of NavApiDocsItemImageSizesTabletData + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'NavApiDocsItemImageSizesAvatarData(url: $url, width: $width, height: $height, mimeType: $mimeType, filesize: $filesize, filename: $filename)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$NavApiDocsItemImageSizesTabletDataCopyWith< + _NavApiDocsItemImageSizesTabletData> + get copyWith => __$NavApiDocsItemImageSizesTabletDataCopyWithImpl< + _NavApiDocsItemImageSizesTabletData>(this, _$identity); + + @override + Map toJson() { + return _$NavApiDocsItemImageSizesTabletDataToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$NavApiDocsItemImageSizesAvatarDataImpl && + other is _NavApiDocsItemImageSizesTabletData && (identical(other.url, url) || other.url == url) && (identical(other.width, width) || other.width == width) && (identical(other.height, height) || other.height == height) && @@ -3245,166 +2789,400 @@ class _$NavApiDocsItemImageSizesAvatarDataImpl int get hashCode => Object.hash( runtimeType, url, width, height, mimeType, filesize, filename); - /// Create a copy of NavApiDocsItemImageSizesAvatarData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$NavApiDocsItemImageSizesAvatarDataImplCopyWith< - _$NavApiDocsItemImageSizesAvatarDataImpl> - get copyWith => __$$NavApiDocsItemImageSizesAvatarDataImplCopyWithImpl< - _$NavApiDocsItemImageSizesAvatarDataImpl>(this, _$identity); - - @override - Map toJson() { - return _$$NavApiDocsItemImageSizesAvatarDataImplToJson( - this, - ); + String toString() { + return 'NavApiDocsItemImageSizesTabletData(url: $url, width: $width, height: $height, mimeType: $mimeType, filesize: $filesize, filename: $filename)'; } } -abstract class _NavApiDocsItemImageSizesAvatarData - extends NavApiDocsItemImageSizesAvatarData { - const factory _NavApiDocsItemImageSizesAvatarData( - {@JsonKey(name: 'url') final String url, - @JsonKey(name: 'width') final int width, - @JsonKey(name: 'height') final int height, - @JsonKey(name: 'mimeType') final String mimeType, - @JsonKey(name: 'filesize') final int filesize, - @JsonKey(name: 'filename') final String filename}) = - _$NavApiDocsItemImageSizesAvatarDataImpl; - const _NavApiDocsItemImageSizesAvatarData._() : super._(); - - factory _NavApiDocsItemImageSizesAvatarData.fromJson( - Map json) = - _$NavApiDocsItemImageSizesAvatarDataImpl.fromJson; - +/// @nodoc +abstract mixin class _$NavApiDocsItemImageSizesTabletDataCopyWith<$Res> + implements $NavApiDocsItemImageSizesTabletDataCopyWith<$Res> { + factory _$NavApiDocsItemImageSizesTabletDataCopyWith( + _NavApiDocsItemImageSizesTabletData value, + $Res Function(_NavApiDocsItemImageSizesTabletData) _then) = + __$NavApiDocsItemImageSizesTabletDataCopyWithImpl; @override + @useResult + $Res call( + {@JsonKey(name: 'url') String url, + @JsonKey(name: 'width') int width, + @JsonKey(name: 'height') int height, + @JsonKey(name: 'mimeType') String mimeType, + @JsonKey(name: 'filesize') int filesize, + @JsonKey(name: 'filename') String filename}); +} + +/// @nodoc +class __$NavApiDocsItemImageSizesTabletDataCopyWithImpl<$Res> + implements _$NavApiDocsItemImageSizesTabletDataCopyWith<$Res> { + __$NavApiDocsItemImageSizesTabletDataCopyWithImpl(this._self, this._then); + + final _NavApiDocsItemImageSizesTabletData _self; + final $Res Function(_NavApiDocsItemImageSizesTabletData) _then; + + /// Create a copy of NavApiDocsItemImageSizesTabletData + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $Res call({ + Object? url = null, + Object? width = null, + Object? height = null, + Object? mimeType = null, + Object? filesize = null, + Object? filename = null, + }) { + return _then(_NavApiDocsItemImageSizesTabletData( + url: null == url + ? _self.url + : url // ignore: cast_nullable_to_non_nullable + as String, + width: null == width + ? _self.width + : width // ignore: cast_nullable_to_non_nullable + as int, + height: null == height + ? _self.height + : height // ignore: cast_nullable_to_non_nullable + as int, + mimeType: null == mimeType + ? _self.mimeType + : mimeType // ignore: cast_nullable_to_non_nullable + as String, + filesize: null == filesize + ? _self.filesize + : filesize // ignore: cast_nullable_to_non_nullable + as int, + filename: null == filename + ? _self.filename + : filename // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc +mixin _$NavApiDocsItemImageSizesAvatarData { @JsonKey(name: 'url') String get url; - @override @JsonKey(name: 'width') int get width; - @override @JsonKey(name: 'height') int get height; - @override @JsonKey(name: 'mimeType') String get mimeType; - @override @JsonKey(name: 'filesize') int get filesize; - @override @JsonKey(name: 'filename') String get filename; /// Create a copy of NavApiDocsItemImageSizesAvatarData /// with the given fields replaced by the non-null parameter values. - @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$NavApiDocsItemImageSizesAvatarDataImplCopyWith< - _$NavApiDocsItemImageSizesAvatarDataImpl> - get copyWith => throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $NavApiDocsItemImageSizesAvatarDataCopyWith< + NavApiDocsItemImageSizesAvatarData> + get copyWith => _$NavApiDocsItemImageSizesAvatarDataCopyWithImpl< + NavApiDocsItemImageSizesAvatarData>( + this as NavApiDocsItemImageSizesAvatarData, _$identity); + + /// Serializes this NavApiDocsItemImageSizesAvatarData to a JSON map. + Map toJson(); + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is NavApiDocsItemImageSizesAvatarData && + (identical(other.url, url) || other.url == url) && + (identical(other.width, width) || other.width == width) && + (identical(other.height, height) || other.height == height) && + (identical(other.mimeType, mimeType) || + other.mimeType == mimeType) && + (identical(other.filesize, filesize) || + other.filesize == filesize) && + (identical(other.filename, filename) || + other.filename == filename)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, url, width, height, mimeType, filesize, filename); + + @override + String toString() { + return 'NavApiDocsItemImageSizesAvatarData(url: $url, width: $width, height: $height, mimeType: $mimeType, filesize: $filesize, filename: $filename)'; + } } -NavApiDocsItemTagsItemData _$NavApiDocsItemTagsItemDataFromJson( - Map json) { - return _NavApiDocsItemTagsItemData.fromJson(json); +/// @nodoc +abstract mixin class $NavApiDocsItemImageSizesAvatarDataCopyWith<$Res> { + factory $NavApiDocsItemImageSizesAvatarDataCopyWith( + NavApiDocsItemImageSizesAvatarData value, + $Res Function(NavApiDocsItemImageSizesAvatarData) _then) = + _$NavApiDocsItemImageSizesAvatarDataCopyWithImpl; + @useResult + $Res call( + {@JsonKey(name: 'url') String url, + @JsonKey(name: 'width') int width, + @JsonKey(name: 'height') int height, + @JsonKey(name: 'mimeType') String mimeType, + @JsonKey(name: 'filesize') int filesize, + @JsonKey(name: 'filename') String filename}); +} + +/// @nodoc +class _$NavApiDocsItemImageSizesAvatarDataCopyWithImpl<$Res> + implements $NavApiDocsItemImageSizesAvatarDataCopyWith<$Res> { + _$NavApiDocsItemImageSizesAvatarDataCopyWithImpl(this._self, this._then); + + final NavApiDocsItemImageSizesAvatarData _self; + final $Res Function(NavApiDocsItemImageSizesAvatarData) _then; + + /// Create a copy of NavApiDocsItemImageSizesAvatarData + /// with the given fields replaced by the non-null parameter values. + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? url = null, + Object? width = null, + Object? height = null, + Object? mimeType = null, + Object? filesize = null, + Object? filename = null, + }) { + return _then(_self.copyWith( + url: null == url + ? _self.url + : url // ignore: cast_nullable_to_non_nullable + as String, + width: null == width + ? _self.width + : width // ignore: cast_nullable_to_non_nullable + as int, + height: null == height + ? _self.height + : height // ignore: cast_nullable_to_non_nullable + as int, + mimeType: null == mimeType + ? _self.mimeType + : mimeType // ignore: cast_nullable_to_non_nullable + as String, + filesize: null == filesize + ? _self.filesize + : filesize // ignore: cast_nullable_to_non_nullable + as int, + filename: null == filename + ? _self.filename + : filename // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc +@JsonSerializable() +class _NavApiDocsItemImageSizesAvatarData + extends NavApiDocsItemImageSizesAvatarData { + const _NavApiDocsItemImageSizesAvatarData( + {@JsonKey(name: 'url') this.url = '', + @JsonKey(name: 'width') this.width = 0, + @JsonKey(name: 'height') this.height = 0, + @JsonKey(name: 'mimeType') this.mimeType = '', + @JsonKey(name: 'filesize') this.filesize = 0, + @JsonKey(name: 'filename') this.filename = ''}) + : super._(); + factory _NavApiDocsItemImageSizesAvatarData.fromJson( + Map json) => + _$NavApiDocsItemImageSizesAvatarDataFromJson(json); + + @override + @JsonKey(name: 'url') + final String url; + @override + @JsonKey(name: 'width') + final int width; + @override + @JsonKey(name: 'height') + final int height; + @override + @JsonKey(name: 'mimeType') + final String mimeType; + @override + @JsonKey(name: 'filesize') + final int filesize; + @override + @JsonKey(name: 'filename') + final String filename; + + /// Create a copy of NavApiDocsItemImageSizesAvatarData + /// with the given fields replaced by the non-null parameter values. + @override + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$NavApiDocsItemImageSizesAvatarDataCopyWith< + _NavApiDocsItemImageSizesAvatarData> + get copyWith => __$NavApiDocsItemImageSizesAvatarDataCopyWithImpl< + _NavApiDocsItemImageSizesAvatarData>(this, _$identity); + + @override + Map toJson() { + return _$NavApiDocsItemImageSizesAvatarDataToJson( + this, + ); + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _NavApiDocsItemImageSizesAvatarData && + (identical(other.url, url) || other.url == url) && + (identical(other.width, width) || other.width == width) && + (identical(other.height, height) || other.height == height) && + (identical(other.mimeType, mimeType) || + other.mimeType == mimeType) && + (identical(other.filesize, filesize) || + other.filesize == filesize) && + (identical(other.filename, filename) || + other.filename == filename)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, url, width, height, mimeType, filesize, filename); + + @override + String toString() { + return 'NavApiDocsItemImageSizesAvatarData(url: $url, width: $width, height: $height, mimeType: $mimeType, filesize: $filesize, filename: $filename)'; + } +} + +/// @nodoc +abstract mixin class _$NavApiDocsItemImageSizesAvatarDataCopyWith<$Res> + implements $NavApiDocsItemImageSizesAvatarDataCopyWith<$Res> { + factory _$NavApiDocsItemImageSizesAvatarDataCopyWith( + _NavApiDocsItemImageSizesAvatarData value, + $Res Function(_NavApiDocsItemImageSizesAvatarData) _then) = + __$NavApiDocsItemImageSizesAvatarDataCopyWithImpl; + @override + @useResult + $Res call( + {@JsonKey(name: 'url') String url, + @JsonKey(name: 'width') int width, + @JsonKey(name: 'height') int height, + @JsonKey(name: 'mimeType') String mimeType, + @JsonKey(name: 'filesize') int filesize, + @JsonKey(name: 'filename') String filename}); +} + +/// @nodoc +class __$NavApiDocsItemImageSizesAvatarDataCopyWithImpl<$Res> + implements _$NavApiDocsItemImageSizesAvatarDataCopyWith<$Res> { + __$NavApiDocsItemImageSizesAvatarDataCopyWithImpl(this._self, this._then); + + final _NavApiDocsItemImageSizesAvatarData _self; + final $Res Function(_NavApiDocsItemImageSizesAvatarData) _then; + + /// Create a copy of NavApiDocsItemImageSizesAvatarData + /// with the given fields replaced by the non-null parameter values. + @override + @pragma('vm:prefer-inline') + $Res call({ + Object? url = null, + Object? width = null, + Object? height = null, + Object? mimeType = null, + Object? filesize = null, + Object? filename = null, + }) { + return _then(_NavApiDocsItemImageSizesAvatarData( + url: null == url + ? _self.url + : url // ignore: cast_nullable_to_non_nullable + as String, + width: null == width + ? _self.width + : width // ignore: cast_nullable_to_non_nullable + as int, + height: null == height + ? _self.height + : height // ignore: cast_nullable_to_non_nullable + as int, + mimeType: null == mimeType + ? _self.mimeType + : mimeType // ignore: cast_nullable_to_non_nullable + as String, + filesize: null == filesize + ? _self.filesize + : filesize // ignore: cast_nullable_to_non_nullable + as int, + filename: null == filename + ? _self.filename + : filename // ignore: cast_nullable_to_non_nullable + as String, + )); + } } /// @nodoc mixin _$NavApiDocsItemTagsItemData { @JsonKey(name: 'id') - String get id => throw _privateConstructorUsedError; + String get id; @JsonKey(name: 'name') - String get name => throw _privateConstructorUsedError; + String get name; @JsonKey(name: 'slug') - String get slug => throw _privateConstructorUsedError; + String get slug; @JsonKey(name: 'updatedAt') - String get updatedAt => throw _privateConstructorUsedError; + String get updatedAt; @JsonKey(name: 'createdAt') - String get createdAt => throw _privateConstructorUsedError; - - /// Serializes this NavApiDocsItemTagsItemData to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + String get createdAt; /// Create a copy of NavApiDocsItemTagsItemData /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $NavApiDocsItemTagsItemDataCopyWith - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $NavApiDocsItemTagsItemDataCopyWith<$Res> { - factory $NavApiDocsItemTagsItemDataCopyWith(NavApiDocsItemTagsItemData value, - $Res Function(NavApiDocsItemTagsItemData) then) = - _$NavApiDocsItemTagsItemDataCopyWithImpl<$Res, - NavApiDocsItemTagsItemData>; - @useResult - $Res call( - {@JsonKey(name: 'id') String id, - @JsonKey(name: 'name') String name, - @JsonKey(name: 'slug') String slug, - @JsonKey(name: 'updatedAt') String updatedAt, - @JsonKey(name: 'createdAt') String createdAt}); -} - -/// @nodoc -class _$NavApiDocsItemTagsItemDataCopyWithImpl<$Res, - $Val extends NavApiDocsItemTagsItemData> - implements $NavApiDocsItemTagsItemDataCopyWith<$Res> { - _$NavApiDocsItemTagsItemDataCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of NavApiDocsItemTagsItemData - /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') + $NavApiDocsItemTagsItemDataCopyWith + get copyWith => + _$NavApiDocsItemTagsItemDataCopyWithImpl( + this as NavApiDocsItemTagsItemData, _$identity); + + /// Serializes this NavApiDocsItemTagsItemData to a JSON map. + Map toJson(); + @override - $Res call({ - Object? id = null, - Object? name = null, - Object? slug = null, - Object? updatedAt = null, - Object? createdAt = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - slug: null == slug - ? _value.slug - : slug // ignore: cast_nullable_to_non_nullable - as String, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as String, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is NavApiDocsItemTagsItemData && + (identical(other.id, id) || other.id == id) && + (identical(other.name, name) || other.name == name) && + (identical(other.slug, slug) || other.slug == slug) && + (identical(other.updatedAt, updatedAt) || + other.updatedAt == updatedAt) && + (identical(other.createdAt, createdAt) || + other.createdAt == createdAt)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => + Object.hash(runtimeType, id, name, slug, updatedAt, createdAt); + + @override + String toString() { + return 'NavApiDocsItemTagsItemData(id: $id, name: $name, slug: $slug, updatedAt: $updatedAt, createdAt: $createdAt)'; } } /// @nodoc -abstract class _$$NavApiDocsItemTagsItemDataImplCopyWith<$Res> - implements $NavApiDocsItemTagsItemDataCopyWith<$Res> { - factory _$$NavApiDocsItemTagsItemDataImplCopyWith( - _$NavApiDocsItemTagsItemDataImpl value, - $Res Function(_$NavApiDocsItemTagsItemDataImpl) then) = - __$$NavApiDocsItemTagsItemDataImplCopyWithImpl<$Res>; - @override +abstract mixin class $NavApiDocsItemTagsItemDataCopyWith<$Res> { + factory $NavApiDocsItemTagsItemDataCopyWith(NavApiDocsItemTagsItemData value, + $Res Function(NavApiDocsItemTagsItemData) _then) = + _$NavApiDocsItemTagsItemDataCopyWithImpl; @useResult $Res call( {@JsonKey(name: 'id') String id, @@ -3415,14 +3193,12 @@ abstract class _$$NavApiDocsItemTagsItemDataImplCopyWith<$Res> } /// @nodoc -class __$$NavApiDocsItemTagsItemDataImplCopyWithImpl<$Res> - extends _$NavApiDocsItemTagsItemDataCopyWithImpl<$Res, - _$NavApiDocsItemTagsItemDataImpl> - implements _$$NavApiDocsItemTagsItemDataImplCopyWith<$Res> { - __$$NavApiDocsItemTagsItemDataImplCopyWithImpl( - _$NavApiDocsItemTagsItemDataImpl _value, - $Res Function(_$NavApiDocsItemTagsItemDataImpl) _then) - : super(_value, _then); +class _$NavApiDocsItemTagsItemDataCopyWithImpl<$Res> + implements $NavApiDocsItemTagsItemDataCopyWith<$Res> { + _$NavApiDocsItemTagsItemDataCopyWithImpl(this._self, this._then); + + final NavApiDocsItemTagsItemData _self; + final $Res Function(NavApiDocsItemTagsItemData) _then; /// Create a copy of NavApiDocsItemTagsItemData /// with the given fields replaced by the non-null parameter values. @@ -3435,25 +3211,25 @@ class __$$NavApiDocsItemTagsItemDataImplCopyWithImpl<$Res> Object? updatedAt = null, Object? createdAt = null, }) { - return _then(_$NavApiDocsItemTagsItemDataImpl( + return _then(_self.copyWith( id: null == id - ? _value.id + ? _self.id : id // ignore: cast_nullable_to_non_nullable as String, name: null == name - ? _value.name + ? _self.name : name // ignore: cast_nullable_to_non_nullable as String, slug: null == slug - ? _value.slug + ? _self.slug : slug // ignore: cast_nullable_to_non_nullable as String, updatedAt: null == updatedAt - ? _value.updatedAt + ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable as String, createdAt: null == createdAt - ? _value.createdAt + ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable as String, )); @@ -3462,18 +3238,16 @@ class __$$NavApiDocsItemTagsItemDataImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$NavApiDocsItemTagsItemDataImpl extends _NavApiDocsItemTagsItemData { - const _$NavApiDocsItemTagsItemDataImpl( +class _NavApiDocsItemTagsItemData extends NavApiDocsItemTagsItemData { + const _NavApiDocsItemTagsItemData( {@JsonKey(name: 'id') this.id = '', @JsonKey(name: 'name') this.name = '', @JsonKey(name: 'slug') this.slug = '', @JsonKey(name: 'updatedAt') this.updatedAt = '', @JsonKey(name: 'createdAt') this.createdAt = ''}) : super._(); - - factory _$NavApiDocsItemTagsItemDataImpl.fromJson( - Map json) => - _$$NavApiDocsItemTagsItemDataImplFromJson(json); + factory _NavApiDocsItemTagsItemData.fromJson(Map json) => + _$NavApiDocsItemTagsItemDataFromJson(json); @override @JsonKey(name: 'id') @@ -3491,16 +3265,27 @@ class _$NavApiDocsItemTagsItemDataImpl extends _NavApiDocsItemTagsItemData { @JsonKey(name: 'createdAt') final String createdAt; + /// Create a copy of NavApiDocsItemTagsItemData + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'NavApiDocsItemTagsItemData(id: $id, name: $name, slug: $slug, updatedAt: $updatedAt, createdAt: $createdAt)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$NavApiDocsItemTagsItemDataCopyWith<_NavApiDocsItemTagsItemData> + get copyWith => __$NavApiDocsItemTagsItemDataCopyWithImpl< + _NavApiDocsItemTagsItemData>(this, _$identity); + + @override + Map toJson() { + return _$NavApiDocsItemTagsItemDataToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$NavApiDocsItemTagsItemDataImpl && + other is _NavApiDocsItemTagsItemData && (identical(other.id, id) || other.id == id) && (identical(other.name, name) || other.name == name) && (identical(other.slug, slug) || other.slug == slug) && @@ -3515,194 +3300,154 @@ class _$NavApiDocsItemTagsItemDataImpl extends _NavApiDocsItemTagsItemData { int get hashCode => Object.hash(runtimeType, id, name, slug, updatedAt, createdAt); - /// Create a copy of NavApiDocsItemTagsItemData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$NavApiDocsItemTagsItemDataImplCopyWith<_$NavApiDocsItemTagsItemDataImpl> - get copyWith => __$$NavApiDocsItemTagsItemDataImplCopyWithImpl< - _$NavApiDocsItemTagsItemDataImpl>(this, _$identity); - - @override - Map toJson() { - return _$$NavApiDocsItemTagsItemDataImplToJson( - this, - ); + String toString() { + return 'NavApiDocsItemTagsItemData(id: $id, name: $name, slug: $slug, updatedAt: $updatedAt, createdAt: $createdAt)'; } } -abstract class _NavApiDocsItemTagsItemData extends NavApiDocsItemTagsItemData { - const factory _NavApiDocsItemTagsItemData( - {@JsonKey(name: 'id') final String id, - @JsonKey(name: 'name') final String name, - @JsonKey(name: 'slug') final String slug, - @JsonKey(name: 'updatedAt') final String updatedAt, - @JsonKey(name: 'createdAt') final String createdAt}) = - _$NavApiDocsItemTagsItemDataImpl; - const _NavApiDocsItemTagsItemData._() : super._(); +/// @nodoc +abstract mixin class _$NavApiDocsItemTagsItemDataCopyWith<$Res> + implements $NavApiDocsItemTagsItemDataCopyWith<$Res> { + factory _$NavApiDocsItemTagsItemDataCopyWith( + _NavApiDocsItemTagsItemData value, + $Res Function(_NavApiDocsItemTagsItemData) _then) = + __$NavApiDocsItemTagsItemDataCopyWithImpl; + @override + @useResult + $Res call( + {@JsonKey(name: 'id') String id, + @JsonKey(name: 'name') String name, + @JsonKey(name: 'slug') String slug, + @JsonKey(name: 'updatedAt') String updatedAt, + @JsonKey(name: 'createdAt') String createdAt}); +} - factory _NavApiDocsItemTagsItemData.fromJson(Map json) = - _$NavApiDocsItemTagsItemDataImpl.fromJson; +/// @nodoc +class __$NavApiDocsItemTagsItemDataCopyWithImpl<$Res> + implements _$NavApiDocsItemTagsItemDataCopyWith<$Res> { + __$NavApiDocsItemTagsItemDataCopyWithImpl(this._self, this._then); - @override - @JsonKey(name: 'id') - String get id; - @override - @JsonKey(name: 'name') - String get name; - @override - @JsonKey(name: 'slug') - String get slug; - @override - @JsonKey(name: 'updatedAt') - String get updatedAt; - @override - @JsonKey(name: 'createdAt') - String get createdAt; + final _NavApiDocsItemTagsItemData _self; + final $Res Function(_NavApiDocsItemTagsItemData) _then; /// Create a copy of NavApiDocsItemTagsItemData /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$NavApiDocsItemTagsItemDataImplCopyWith<_$NavApiDocsItemTagsItemDataImpl> - get copyWith => throw _privateConstructorUsedError; -} - -NavApiData _$NavApiDataFromJson(Map json) { - return _NavApiData.fromJson(json); + @pragma('vm:prefer-inline') + $Res call({ + Object? id = null, + Object? name = null, + Object? slug = null, + Object? updatedAt = null, + Object? createdAt = null, + }) { + return _then(_NavApiDocsItemTagsItemData( + id: null == id + ? _self.id + : id // ignore: cast_nullable_to_non_nullable + as String, + name: null == name + ? _self.name + : name // ignore: cast_nullable_to_non_nullable + as String, + slug: null == slug + ? _self.slug + : slug // ignore: cast_nullable_to_non_nullable + as String, + updatedAt: null == updatedAt + ? _self.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as String, + createdAt: null == createdAt + ? _self.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as String, + )); + } } /// @nodoc mixin _$NavApiData { @JsonKey(name: 'docs') - List get docs => throw _privateConstructorUsedError; + List get docs; @JsonKey(name: 'hasNextPage') - bool get hasNextPage => throw _privateConstructorUsedError; + bool get hasNextPage; @JsonKey(name: 'hasPrevPage') - bool get hasPrevPage => throw _privateConstructorUsedError; + bool get hasPrevPage; @JsonKey(name: 'limit') - int get limit => throw _privateConstructorUsedError; + int get limit; @JsonKey(name: 'nextPage') - dynamic get nextPage => throw _privateConstructorUsedError; + dynamic get nextPage; @JsonKey(name: 'page') - int get page => throw _privateConstructorUsedError; + int get page; @JsonKey(name: 'pagingCounter') - int get pagingCounter => throw _privateConstructorUsedError; + int get pagingCounter; @JsonKey(name: 'prevPage') - dynamic get prevPage => throw _privateConstructorUsedError; + dynamic get prevPage; @JsonKey(name: 'totalDocs') - int get totalDocs => throw _privateConstructorUsedError; + int get totalDocs; @JsonKey(name: 'totalPages') - int get totalPages => throw _privateConstructorUsedError; - - /// Serializes this NavApiData to a JSON map. - Map toJson() => throw _privateConstructorUsedError; + int get totalPages; /// Create a copy of NavApiData /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $NavApiDataCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $NavApiDataCopyWith<$Res> { - factory $NavApiDataCopyWith( - NavApiData value, $Res Function(NavApiData) then) = - _$NavApiDataCopyWithImpl<$Res, NavApiData>; - @useResult - $Res call( - {@JsonKey(name: 'docs') List docs, - @JsonKey(name: 'hasNextPage') bool hasNextPage, - @JsonKey(name: 'hasPrevPage') bool hasPrevPage, - @JsonKey(name: 'limit') int limit, - @JsonKey(name: 'nextPage') dynamic nextPage, - @JsonKey(name: 'page') int page, - @JsonKey(name: 'pagingCounter') int pagingCounter, - @JsonKey(name: 'prevPage') dynamic prevPage, - @JsonKey(name: 'totalDocs') int totalDocs, - @JsonKey(name: 'totalPages') int totalPages}); -} - -/// @nodoc -class _$NavApiDataCopyWithImpl<$Res, $Val extends NavApiData> - implements $NavApiDataCopyWith<$Res> { - _$NavApiDataCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - /// Create a copy of NavApiData - /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') + $NavApiDataCopyWith get copyWith => + _$NavApiDataCopyWithImpl(this as NavApiData, _$identity); + + /// Serializes this NavApiData to a JSON map. + Map toJson(); + @override - $Res call({ - Object? docs = null, - Object? hasNextPage = null, - Object? hasPrevPage = null, - Object? limit = null, - Object? nextPage = freezed, - Object? page = null, - Object? pagingCounter = null, - Object? prevPage = freezed, - Object? totalDocs = null, - Object? totalPages = null, - }) { - return _then(_value.copyWith( - docs: null == docs - ? _value.docs - : docs // ignore: cast_nullable_to_non_nullable - as List, - hasNextPage: null == hasNextPage - ? _value.hasNextPage - : hasNextPage // ignore: cast_nullable_to_non_nullable - as bool, - hasPrevPage: null == hasPrevPage - ? _value.hasPrevPage - : hasPrevPage // ignore: cast_nullable_to_non_nullable - as bool, - limit: null == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int, - nextPage: freezed == nextPage - ? _value.nextPage - : nextPage // ignore: cast_nullable_to_non_nullable - as dynamic, - page: null == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int, - pagingCounter: null == pagingCounter - ? _value.pagingCounter - : pagingCounter // ignore: cast_nullable_to_non_nullable - as int, - prevPage: freezed == prevPage - ? _value.prevPage - : prevPage // ignore: cast_nullable_to_non_nullable - as dynamic, - totalDocs: null == totalDocs - ? _value.totalDocs - : totalDocs // ignore: cast_nullable_to_non_nullable - as int, - totalPages: null == totalPages - ? _value.totalPages - : totalPages // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is NavApiData && + const DeepCollectionEquality().equals(other.docs, docs) && + (identical(other.hasNextPage, hasNextPage) || + other.hasNextPage == hasNextPage) && + (identical(other.hasPrevPage, hasPrevPage) || + other.hasPrevPage == hasPrevPage) && + (identical(other.limit, limit) || other.limit == limit) && + const DeepCollectionEquality().equals(other.nextPage, nextPage) && + (identical(other.page, page) || other.page == page) && + (identical(other.pagingCounter, pagingCounter) || + other.pagingCounter == pagingCounter) && + const DeepCollectionEquality().equals(other.prevPage, prevPage) && + (identical(other.totalDocs, totalDocs) || + other.totalDocs == totalDocs) && + (identical(other.totalPages, totalPages) || + other.totalPages == totalPages)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(docs), + hasNextPage, + hasPrevPage, + limit, + const DeepCollectionEquality().hash(nextPage), + page, + pagingCounter, + const DeepCollectionEquality().hash(prevPage), + totalDocs, + totalPages); + + @override + String toString() { + return 'NavApiData(docs: $docs, hasNextPage: $hasNextPage, hasPrevPage: $hasPrevPage, limit: $limit, nextPage: $nextPage, page: $page, pagingCounter: $pagingCounter, prevPage: $prevPage, totalDocs: $totalDocs, totalPages: $totalPages)'; } } /// @nodoc -abstract class _$$NavApiDataImplCopyWith<$Res> - implements $NavApiDataCopyWith<$Res> { - factory _$$NavApiDataImplCopyWith( - _$NavApiDataImpl value, $Res Function(_$NavApiDataImpl) then) = - __$$NavApiDataImplCopyWithImpl<$Res>; - @override +abstract mixin class $NavApiDataCopyWith<$Res> { + factory $NavApiDataCopyWith( + NavApiData value, $Res Function(NavApiData) _then) = + _$NavApiDataCopyWithImpl; @useResult $Res call( {@JsonKey(name: 'docs') List docs, @@ -3718,12 +3463,11 @@ abstract class _$$NavApiDataImplCopyWith<$Res> } /// @nodoc -class __$$NavApiDataImplCopyWithImpl<$Res> - extends _$NavApiDataCopyWithImpl<$Res, _$NavApiDataImpl> - implements _$$NavApiDataImplCopyWith<$Res> { - __$$NavApiDataImplCopyWithImpl( - _$NavApiDataImpl _value, $Res Function(_$NavApiDataImpl) _then) - : super(_value, _then); +class _$NavApiDataCopyWithImpl<$Res> implements $NavApiDataCopyWith<$Res> { + _$NavApiDataCopyWithImpl(this._self, this._then); + + final NavApiData _self; + final $Res Function(NavApiData) _then; /// Create a copy of NavApiData /// with the given fields replaced by the non-null parameter values. @@ -3741,45 +3485,45 @@ class __$$NavApiDataImplCopyWithImpl<$Res> Object? totalDocs = null, Object? totalPages = null, }) { - return _then(_$NavApiDataImpl( + return _then(_self.copyWith( docs: null == docs - ? _value._docs + ? _self.docs : docs // ignore: cast_nullable_to_non_nullable as List, hasNextPage: null == hasNextPage - ? _value.hasNextPage + ? _self.hasNextPage : hasNextPage // ignore: cast_nullable_to_non_nullable as bool, hasPrevPage: null == hasPrevPage - ? _value.hasPrevPage + ? _self.hasPrevPage : hasPrevPage // ignore: cast_nullable_to_non_nullable as bool, limit: null == limit - ? _value.limit + ? _self.limit : limit // ignore: cast_nullable_to_non_nullable as int, nextPage: freezed == nextPage - ? _value.nextPage + ? _self.nextPage : nextPage // ignore: cast_nullable_to_non_nullable as dynamic, page: null == page - ? _value.page + ? _self.page : page // ignore: cast_nullable_to_non_nullable as int, pagingCounter: null == pagingCounter - ? _value.pagingCounter + ? _self.pagingCounter : pagingCounter // ignore: cast_nullable_to_non_nullable as int, prevPage: freezed == prevPage - ? _value.prevPage + ? _self.prevPage : prevPage // ignore: cast_nullable_to_non_nullable as dynamic, totalDocs: null == totalDocs - ? _value.totalDocs + ? _self.totalDocs : totalDocs // ignore: cast_nullable_to_non_nullable as int, totalPages: null == totalPages - ? _value.totalPages + ? _self.totalPages : totalPages // ignore: cast_nullable_to_non_nullable as int, )); @@ -3788,8 +3532,8 @@ class __$$NavApiDataImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$NavApiDataImpl extends _NavApiData { - const _$NavApiDataImpl( +class _NavApiData extends NavApiData { + const _NavApiData( {@JsonKey(name: 'docs') final List docs = const [], @JsonKey(name: 'hasNextPage') this.hasNextPage = false, @@ -3803,9 +3547,8 @@ class _$NavApiDataImpl extends _NavApiData { @JsonKey(name: 'totalPages') this.totalPages = 0}) : _docs = docs, super._(); - - factory _$NavApiDataImpl.fromJson(Map json) => - _$$NavApiDataImplFromJson(json); + factory _NavApiData.fromJson(Map json) => + _$NavApiDataFromJson(json); final List _docs; @override @@ -3844,16 +3587,26 @@ class _$NavApiDataImpl extends _NavApiData { @JsonKey(name: 'totalPages') final int totalPages; + /// Create a copy of NavApiData + /// with the given fields replaced by the non-null parameter values. @override - String toString() { - return 'NavApiData(docs: $docs, hasNextPage: $hasNextPage, hasPrevPage: $hasPrevPage, limit: $limit, nextPage: $nextPage, page: $page, pagingCounter: $pagingCounter, prevPage: $prevPage, totalDocs: $totalDocs, totalPages: $totalPages)'; + @JsonKey(includeFromJson: false, includeToJson: false) + @pragma('vm:prefer-inline') + _$NavApiDataCopyWith<_NavApiData> get copyWith => + __$NavApiDataCopyWithImpl<_NavApiData>(this, _$identity); + + @override + Map toJson() { + return _$NavApiDataToJson( + this, + ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$NavApiDataImpl && + other is _NavApiData && const DeepCollectionEquality().equals(other._docs, _docs) && (identical(other.hasNextPage, hasNextPage) || other.hasNextPage == hasNextPage) && @@ -3886,74 +3639,99 @@ class _$NavApiDataImpl extends _NavApiData { totalDocs, totalPages); - /// Create a copy of NavApiData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) @override - @pragma('vm:prefer-inline') - _$$NavApiDataImplCopyWith<_$NavApiDataImpl> get copyWith => - __$$NavApiDataImplCopyWithImpl<_$NavApiDataImpl>(this, _$identity); - - @override - Map toJson() { - return _$$NavApiDataImplToJson( - this, - ); + String toString() { + return 'NavApiData(docs: $docs, hasNextPage: $hasNextPage, hasPrevPage: $hasPrevPage, limit: $limit, nextPage: $nextPage, page: $page, pagingCounter: $pagingCounter, prevPage: $prevPage, totalDocs: $totalDocs, totalPages: $totalPages)'; } } -abstract class _NavApiData extends NavApiData { - const factory _NavApiData( - {@JsonKey(name: 'docs') final List docs, - @JsonKey(name: 'hasNextPage') final bool hasNextPage, - @JsonKey(name: 'hasPrevPage') final bool hasPrevPage, - @JsonKey(name: 'limit') final int limit, - @JsonKey(name: 'nextPage') final dynamic nextPage, - @JsonKey(name: 'page') final int page, - @JsonKey(name: 'pagingCounter') final int pagingCounter, - @JsonKey(name: 'prevPage') final dynamic prevPage, - @JsonKey(name: 'totalDocs') final int totalDocs, - @JsonKey(name: 'totalPages') final int totalPages}) = _$NavApiDataImpl; - const _NavApiData._() : super._(); +/// @nodoc +abstract mixin class _$NavApiDataCopyWith<$Res> + implements $NavApiDataCopyWith<$Res> { + factory _$NavApiDataCopyWith( + _NavApiData value, $Res Function(_NavApiData) _then) = + __$NavApiDataCopyWithImpl; + @override + @useResult + $Res call( + {@JsonKey(name: 'docs') List docs, + @JsonKey(name: 'hasNextPage') bool hasNextPage, + @JsonKey(name: 'hasPrevPage') bool hasPrevPage, + @JsonKey(name: 'limit') int limit, + @JsonKey(name: 'nextPage') dynamic nextPage, + @JsonKey(name: 'page') int page, + @JsonKey(name: 'pagingCounter') int pagingCounter, + @JsonKey(name: 'prevPage') dynamic prevPage, + @JsonKey(name: 'totalDocs') int totalDocs, + @JsonKey(name: 'totalPages') int totalPages}); +} - factory _NavApiData.fromJson(Map json) = - _$NavApiDataImpl.fromJson; +/// @nodoc +class __$NavApiDataCopyWithImpl<$Res> implements _$NavApiDataCopyWith<$Res> { + __$NavApiDataCopyWithImpl(this._self, this._then); - @override - @JsonKey(name: 'docs') - List get docs; - @override - @JsonKey(name: 'hasNextPage') - bool get hasNextPage; - @override - @JsonKey(name: 'hasPrevPage') - bool get hasPrevPage; - @override - @JsonKey(name: 'limit') - int get limit; - @override - @JsonKey(name: 'nextPage') - dynamic get nextPage; - @override - @JsonKey(name: 'page') - int get page; - @override - @JsonKey(name: 'pagingCounter') - int get pagingCounter; - @override - @JsonKey(name: 'prevPage') - dynamic get prevPage; - @override - @JsonKey(name: 'totalDocs') - int get totalDocs; - @override - @JsonKey(name: 'totalPages') - int get totalPages; + final _NavApiData _self; + final $Res Function(_NavApiData) _then; /// Create a copy of NavApiData /// with the given fields replaced by the non-null parameter values. @override - @JsonKey(includeFromJson: false, includeToJson: false) - _$$NavApiDataImplCopyWith<_$NavApiDataImpl> get copyWith => - throw _privateConstructorUsedError; + @pragma('vm:prefer-inline') + $Res call({ + Object? docs = null, + Object? hasNextPage = null, + Object? hasPrevPage = null, + Object? limit = null, + Object? nextPage = freezed, + Object? page = null, + Object? pagingCounter = null, + Object? prevPage = freezed, + Object? totalDocs = null, + Object? totalPages = null, + }) { + return _then(_NavApiData( + docs: null == docs + ? _self._docs + : docs // ignore: cast_nullable_to_non_nullable + as List, + hasNextPage: null == hasNextPage + ? _self.hasNextPage + : hasNextPage // ignore: cast_nullable_to_non_nullable + as bool, + hasPrevPage: null == hasPrevPage + ? _self.hasPrevPage + : hasPrevPage // ignore: cast_nullable_to_non_nullable + as bool, + limit: null == limit + ? _self.limit + : limit // ignore: cast_nullable_to_non_nullable + as int, + nextPage: freezed == nextPage + ? _self.nextPage + : nextPage // ignore: cast_nullable_to_non_nullable + as dynamic, + page: null == page + ? _self.page + : page // ignore: cast_nullable_to_non_nullable + as int, + pagingCounter: null == pagingCounter + ? _self.pagingCounter + : pagingCounter // ignore: cast_nullable_to_non_nullable + as int, + prevPage: freezed == prevPage + ? _self.prevPage + : prevPage // ignore: cast_nullable_to_non_nullable + as dynamic, + totalDocs: null == totalDocs + ? _self.totalDocs + : totalDocs // ignore: cast_nullable_to_non_nullable + as int, + totalPages: null == totalPages + ? _self.totalPages + : totalPages // ignore: cast_nullable_to_non_nullable + as int, + )); + } } + +// dart format on diff --git a/lib/data/nav_api_data.g.dart b/lib/data/nav_api_data.g.dart index 1119e7b..d3bba6f 100644 --- a/lib/data/nav_api_data.g.dart +++ b/lib/data/nav_api_data.g.dart @@ -6,9 +6,8 @@ part of 'nav_api_data.dart'; // JsonSerializableGenerator // ************************************************************************** -_$NavApiDocsItemDataImpl _$$NavApiDocsItemDataImplFromJson( - Map json) => - _$NavApiDocsItemDataImpl( +_NavApiDocsItemData _$NavApiDocsItemDataFromJson(Map 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 _$$NavApiDocsItemDataImplToJson( - _$NavApiDocsItemDataImpl instance) => +Map _$NavApiDocsItemDataToJson(_NavApiDocsItemData instance) => { 'id': instance.id, 'name': instance.name, @@ -45,9 +43,9 @@ Map _$$NavApiDocsItemDataImplToJson( 'createdAt': instance.createdAt, }; -_$NavApiDocsItemImageDataImpl _$$NavApiDocsItemImageDataImplFromJson( +_NavApiDocsItemImageData _$NavApiDocsItemImageDataFromJson( Map json) => - _$NavApiDocsItemImageDataImpl( + _NavApiDocsItemImageData( id: json['id'] as String? ?? '', createdBy: json['createdBy'] == null ? const NavApiDocsItemImageCreatedByData() @@ -73,8 +71,8 @@ _$NavApiDocsItemImageDataImpl _$$NavApiDocsItemImageDataImplFromJson( json['sizes'] as Map), ); -Map _$$NavApiDocsItemImageDataImplToJson( - _$NavApiDocsItemImageDataImpl instance) => +Map _$NavApiDocsItemImageDataToJson( + _NavApiDocsItemImageData instance) => { 'id': instance.id, 'createdBy': instance.createdBy, @@ -95,29 +93,27 @@ Map _$$NavApiDocsItemImageDataImplToJson( 'sizes': instance.sizes, }; -_$NavApiDocsItemImageCreatedByDataImpl - _$$NavApiDocsItemImageCreatedByDataImplFromJson( - Map 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?) - ?.map((e) => e as String) - .toList() ?? +_NavApiDocsItemImageCreatedByData _$NavApiDocsItemImageCreatedByDataFromJson( + Map 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?)?.map((e) => e as String).toList() ?? const [], - 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 _$$NavApiDocsItemImageCreatedByDataImplToJson( - _$NavApiDocsItemImageCreatedByDataImpl instance) => +Map _$NavApiDocsItemImageCreatedByDataToJson( + _NavApiDocsItemImageCreatedByData instance) => { 'id': instance.id, 'sub': instance.sub, @@ -133,10 +129,10 @@ Map _$$NavApiDocsItemImageCreatedByDataImplToJson( 'avatar': instance.avatar, }; -_$NavApiDocsItemImageSizesThumbnailDataImpl - _$$NavApiDocsItemImageSizesThumbnailDataImplFromJson( +_NavApiDocsItemImageSizesThumbnailData + _$NavApiDocsItemImageSizesThumbnailDataFromJson( Map 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 _$$NavApiDocsItemImageSizesThumbnailDataImplToJson( - _$NavApiDocsItemImageSizesThumbnailDataImpl instance) => +Map _$NavApiDocsItemImageSizesThumbnailDataToJson( + _NavApiDocsItemImageSizesThumbnailData instance) => { 'url': instance.url, 'width': instance.width, @@ -156,9 +152,9 @@ Map _$$NavApiDocsItemImageSizesThumbnailDataImplToJson( 'filename': instance.filename, }; -_$NavApiDocsItemImageSizesDataImpl _$$NavApiDocsItemImageSizesDataImplFromJson( +_NavApiDocsItemImageSizesData _$NavApiDocsItemImageSizesDataFromJson( Map json) => - _$NavApiDocsItemImageSizesDataImpl( + _NavApiDocsItemImageSizesData( thumbnail: json['thumbnail'] == null ? const NavApiDocsItemImageSizesThumbnailData() : NavApiDocsItemImageSizesThumbnailData.fromJson( @@ -181,8 +177,8 @@ _$NavApiDocsItemImageSizesDataImpl _$$NavApiDocsItemImageSizesDataImplFromJson( json['avatar'] as Map), ); -Map _$$NavApiDocsItemImageSizesDataImplToJson( - _$NavApiDocsItemImageSizesDataImpl instance) => +Map _$NavApiDocsItemImageSizesDataToJson( + _NavApiDocsItemImageSizesData instance) => { 'thumbnail': instance.thumbnail, 'preload': instance.preload, @@ -191,10 +187,9 @@ Map _$$NavApiDocsItemImageSizesDataImplToJson( 'avatar': instance.avatar, }; -_$NavApiDocsItemImageSizesPreloadDataImpl - _$$NavApiDocsItemImageSizesPreloadDataImplFromJson( - Map json) => - _$NavApiDocsItemImageSizesPreloadDataImpl( +_NavApiDocsItemImageSizesPreloadData + _$NavApiDocsItemImageSizesPreloadDataFromJson(Map json) => + _NavApiDocsItemImageSizesPreloadData( url: json['url'], width: json['width'], height: json['height'], @@ -203,8 +198,8 @@ _$NavApiDocsItemImageSizesPreloadDataImpl filename: json['filename'], ); -Map _$$NavApiDocsItemImageSizesPreloadDataImplToJson( - _$NavApiDocsItemImageSizesPreloadDataImpl instance) => +Map _$NavApiDocsItemImageSizesPreloadDataToJson( + _NavApiDocsItemImageSizesPreloadData instance) => { 'url': instance.url, 'width': instance.width, @@ -214,78 +209,75 @@ Map _$$NavApiDocsItemImageSizesPreloadDataImplToJson( 'filename': instance.filename, }; -_$NavApiDocsItemImageSizesCardDataImpl - _$$NavApiDocsItemImageSizesCardDataImplFromJson( - Map 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 _$$NavApiDocsItemImageSizesCardDataImplToJson( - _$NavApiDocsItemImageSizesCardDataImpl instance) => - { - 'url': instance.url, - 'width': instance.width, - 'height': instance.height, - 'mimeType': instance.mimeType, - 'filesize': instance.filesize, - 'filename': instance.filename, - }; - -_$NavApiDocsItemImageSizesTabletDataImpl - _$$NavApiDocsItemImageSizesTabletDataImplFromJson( - Map 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 _$$NavApiDocsItemImageSizesTabletDataImplToJson( - _$NavApiDocsItemImageSizesTabletDataImpl instance) => - { - 'url': instance.url, - 'width': instance.width, - 'height': instance.height, - 'mimeType': instance.mimeType, - 'filesize': instance.filesize, - 'filename': instance.filename, - }; - -_$NavApiDocsItemImageSizesAvatarDataImpl - _$$NavApiDocsItemImageSizesAvatarDataImplFromJson( - Map 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 _$$NavApiDocsItemImageSizesAvatarDataImplToJson( - _$NavApiDocsItemImageSizesAvatarDataImpl instance) => - { - 'url': instance.url, - 'width': instance.width, - 'height': instance.height, - 'mimeType': instance.mimeType, - 'filesize': instance.filesize, - 'filename': instance.filename, - }; - -_$NavApiDocsItemTagsItemDataImpl _$$NavApiDocsItemTagsItemDataImplFromJson( +_NavApiDocsItemImageSizesCardData _$NavApiDocsItemImageSizesCardDataFromJson( Map 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 _$NavApiDocsItemImageSizesCardDataToJson( + _NavApiDocsItemImageSizesCardData instance) => + { + 'url': instance.url, + 'width': instance.width, + 'height': instance.height, + 'mimeType': instance.mimeType, + 'filesize': instance.filesize, + 'filename': instance.filename, + }; + +_NavApiDocsItemImageSizesTabletData + _$NavApiDocsItemImageSizesTabletDataFromJson(Map 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 _$NavApiDocsItemImageSizesTabletDataToJson( + _NavApiDocsItemImageSizesTabletData instance) => + { + 'url': instance.url, + 'width': instance.width, + 'height': instance.height, + 'mimeType': instance.mimeType, + 'filesize': instance.filesize, + 'filename': instance.filename, + }; + +_NavApiDocsItemImageSizesAvatarData + _$NavApiDocsItemImageSizesAvatarDataFromJson(Map 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 _$NavApiDocsItemImageSizesAvatarDataToJson( + _NavApiDocsItemImageSizesAvatarData instance) => + { + 'url': instance.url, + 'width': instance.width, + 'height': instance.height, + 'mimeType': instance.mimeType, + 'filesize': instance.filesize, + 'filename': instance.filename, + }; + +_NavApiDocsItemTagsItemData _$NavApiDocsItemTagsItemDataFromJson( + Map 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 _$$NavApiDocsItemTagsItemDataImplToJson( - _$NavApiDocsItemTagsItemDataImpl instance) => +Map _$NavApiDocsItemTagsItemDataToJson( + _NavApiDocsItemTagsItemData instance) => { 'id': instance.id, 'name': instance.name, @@ -303,8 +295,7 @@ Map _$$NavApiDocsItemTagsItemDataImplToJson( 'createdAt': instance.createdAt, }; -_$NavApiDataImpl _$$NavApiDataImplFromJson(Map json) => - _$NavApiDataImpl( +_NavApiData _$NavApiDataFromJson(Map json) => _NavApiData( docs: (json['docs'] as List?) ?.map( (e) => NavApiDocsItemData.fromJson(e as Map)) @@ -321,7 +312,7 @@ _$NavApiDataImpl _$$NavApiDataImplFromJson(Map json) => totalPages: (json['totalPages'] as num?)?.toInt() ?? 0, ); -Map _$$NavApiDataImplToJson(_$NavApiDataImpl instance) => +Map _$NavApiDataToJson(_NavApiData instance) => { 'docs': instance.docs, 'hasNextPage': instance.hasNextPage, diff --git a/lib/provider/aria2c.dart b/lib/provider/aria2c.dart index e901bb7..3e4f75a 100644 --- a/lib/provider/aria2c.dart +++ b/lib/provider/aria2c.dart @@ -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, diff --git a/lib/provider/aria2c.freezed.dart b/lib/provider/aria2c.freezed.dart index 98689ba..46b16cb 100644 --- a/lib/provider/aria2c.freezed.dart +++ b/lib/provider/aria2c.freezed.dart @@ -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 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 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( + 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 diff --git a/lib/provider/unp4kc.dart b/lib/provider/unp4kc.dart index c3a77fd..df0e2c3 100644 --- a/lib/provider/unp4kc.dart +++ b/lib/provider/unp4kc.dart @@ -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? files, diff --git a/lib/provider/unp4kc.freezed.dart b/lib/provider/unp4kc.freezed.dart index 5940016..48876cf 100644 --- a/lib/provider/unp4kc.freezed.dart +++ b/lib/provider/unp4kc.freezed.dart @@ -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 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? get files => - throw _privateConstructorUsedError; - MemoryFileSystem? get fs => throw _privateConstructorUsedError; - String get curPath => throw _privateConstructorUsedError; - String? get endMessage => throw _privateConstructorUsedError; - MapEntry? get tempOpenFile => - throw _privateConstructorUsedError; - String get errorMessage => throw _privateConstructorUsedError; +mixin _$Unp4kcState implements DiagnosticableTreeMixin { + bool get startUp; + Map? get files; + MemoryFileSystem? get fs; + String get curPath; + String? get endMessage; + MapEntry? 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 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? files, - MemoryFileSystem? fs, - String curPath, - String? endMessage, - MapEntry? 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 get copyWith => + _$Unp4kcStateCopyWithImpl(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?, - 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?, - 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?, 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?, 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? 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? files, + MemoryFileSystem? fs, + String curPath, + String? endMessage, + MapEntry? 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?, + 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?, + 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? files, - final MemoryFileSystem? fs, - required final String curPath, - final String? endMessage, - final MapEntry? tempOpenFile, - final String errorMessage}) = _$Unp4kcStateImpl; - - @override - bool get startUp; - @override - Map? get files; - @override - MemoryFileSystem? get fs; - @override - String get curPath; - @override - String? get endMessage; - @override - MapEntry? 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 diff --git a/lib/ui/home/dialogs/home_game_login_dialog_ui_model.dart b/lib/ui/home/dialogs/home_game_login_dialog_ui_model.dart index e718d7c..f15fe86 100644 --- a/lib/ui/home/dialogs/home_game_login_dialog_ui_model.dart +++ b/lib/ui/home/dialogs/home_game_login_dialog_ui_model.dart @@ -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, diff --git a/lib/ui/home/dialogs/home_game_login_dialog_ui_model.freezed.dart b/lib/ui/home/dialogs/home_game_login_dialog_ui_model.freezed.dart index f2c23cb..1beafb7 100644 --- a/lib/ui/home/dialogs/home_game_login_dialog_ui_model.freezed.dart +++ b/lib/ui/home/dialogs/home_game_login_dialog_ui_model.freezed.dart @@ -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 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? 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 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? 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 get copyWith => + _$HomeGameLoginStateCopyWithImpl( + 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?, - 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? 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?, + 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? 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? _releaseInfo; + final Map? _releaseInfo; @override - Map? 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? 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? 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 diff --git a/lib/ui/home/downloader/home_downloader_ui_model.dart b/lib/ui/home/downloader/home_downloader_ui_model.dart index 64a1a21..0292a29 100644 --- a/lib/ui/home/downloader/home_downloader_ui_model.dart +++ b/lib/ui/home/downloader/home_downloader_ui_model.dart @@ -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 tasks, @Default([]) List waitingTasks, diff --git a/lib/ui/home/downloader/home_downloader_ui_model.freezed.dart b/lib/ui/home/downloader/home_downloader_ui_model.freezed.dart index 88957e1..5a2f1a3 100644 --- a/lib/ui/home/downloader/home_downloader_ui_model.freezed.dart +++ b/lib/ui/home/downloader/home_downloader_ui_model.freezed.dart @@ -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 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 get tasks => throw _privateConstructorUsedError; - List get waitingTasks => throw _privateConstructorUsedError; - List get stoppedTasks => throw _privateConstructorUsedError; - Aria2GlobalStat? get globalStat => throw _privateConstructorUsedError; + List get tasks; + List get waitingTasks; + List 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 get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $HomeDownloaderUIStateCopyWith<$Res> { - factory $HomeDownloaderUIStateCopyWith(HomeDownloaderUIState value, - $Res Function(HomeDownloaderUIState) then) = - _$HomeDownloaderUIStateCopyWithImpl<$Res, HomeDownloaderUIState>; - @useResult - $Res call( - {List tasks, - List waitingTasks, - List 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 get copyWith => + _$HomeDownloaderUIStateCopyWithImpl( + 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, - waitingTasks: null == waitingTasks - ? _value.waitingTasks - : waitingTasks // ignore: cast_nullable_to_non_nullable - as List, - stoppedTasks: null == stoppedTasks - ? _value.stoppedTasks - : stoppedTasks // ignore: cast_nullable_to_non_nullable - as List, - 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 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, waitingTasks: null == waitingTasks - ? _value._waitingTasks + ? _self.waitingTasks : waitingTasks // ignore: cast_nullable_to_non_nullable as List, stoppedTasks: null == stoppedTasks - ? _value._stoppedTasks + ? _self.stoppedTasks : stoppedTasks // ignore: cast_nullable_to_non_nullable as List, 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 tasks = const [], final List waitingTasks = const [], final List 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 tasks, + List waitingTasks, + List 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, + waitingTasks: null == waitingTasks + ? _self._waitingTasks + : waitingTasks // ignore: cast_nullable_to_non_nullable + as List, + stoppedTasks: null == stoppedTasks + ? _self._stoppedTasks + : stoppedTasks // ignore: cast_nullable_to_non_nullable + as List, + globalStat: freezed == globalStat + ? _self.globalStat + : globalStat // ignore: cast_nullable_to_non_nullable + as Aria2GlobalStat?, + )); + } } -abstract class _HomeDownloaderUIState implements HomeDownloaderUIState { - factory _HomeDownloaderUIState( - {final List tasks, - final List waitingTasks, - final List stoppedTasks, - final Aria2GlobalStat? globalStat}) = _$HomeDownloaderUIStateImpl; - - @override - List get tasks; - @override - List get waitingTasks; - @override - List 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 diff --git a/lib/ui/home/game_doctor/game_doctor_ui_model.dart b/lib/ui/home/game_doctor/game_doctor_ui_model.dart index 3b16fa5..ae22ab3 100644 --- a/lib/ui/home/game_doctor/game_doctor_ui_model.dart +++ b/lib/ui/home/game_doctor/game_doctor_ui_model.dart @@ -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, diff --git a/lib/ui/home/game_doctor/game_doctor_ui_model.freezed.dart b/lib/ui/home/game_doctor/game_doctor_ui_model.freezed.dart index 1090d6b..3633ec5 100644 --- a/lib/ui/home/game_doctor/game_doctor_ui_model.freezed.dart +++ b/lib/ui/home/game_doctor/game_doctor_ui_model.freezed.dart @@ -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 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>? get checkResult => - throw _privateConstructorUsedError; + bool get isChecking; + bool get isFixing; + String get lastScreenInfo; + String get isFixingString; + List>? get checkResult; /// Create a copy of HomeGameDoctorState /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $HomeGameDoctorStateCopyWith 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>? 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 get copyWith => + _$HomeGameDoctorStateCopyWithImpl( + 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>?, - ) 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>?, )); @@ -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>? 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>?, + )); + } } -abstract class _HomeGameDoctorState implements HomeGameDoctorState { - factory _HomeGameDoctorState( - {final bool isChecking, - final bool isFixing, - final String lastScreenInfo, - final String isFixingString, - final List>? checkResult}) = - _$HomeGameDoctorStateImpl; - - @override - bool get isChecking; - @override - bool get isFixing; - @override - String get lastScreenInfo; - @override - String get isFixingString; - @override - List>? 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 diff --git a/lib/ui/home/home_ui_model.dart b/lib/ui/home/home_ui_model.dart index 3fb235f..0e87d8b 100644 --- a/lib/ui/home/home_ui_model.dart +++ b/lib/ui/home/home_ui_model.dart @@ -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, diff --git a/lib/ui/home/home_ui_model.freezed.dart b/lib/ui/home/home_ui_model.freezed.dart index d8a5fad..099f9f5 100644 --- a/lib/ui/home/home_ui_model.freezed.dart +++ b/lib/ui/home/home_ui_model.freezed.dart @@ -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 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 get scInstallPaths => throw _privateConstructorUsedError; - AppWebLocalizationVersionsData? get webLocalizationVersionsData => - throw _privateConstructorUsedError; - String get lastScreenInfo => throw _privateConstructorUsedError; - List? get rssVideoItems => throw _privateConstructorUsedError; - List? get rssTextItems => throw _privateConstructorUsedError; - MapEntry? get localizationUpdateInfo => - throw _privateConstructorUsedError; - List? get scServerStatus => throw _privateConstructorUsedError; - List? get countdownFestivalListData => - throw _privateConstructorUsedError; - Map get isGameRunning => throw _privateConstructorUsedError; + AppPlacardData? get appPlacardData; + bool get isFixing; + String get isFixingString; + String? get scInstalledPath; + List get scInstallPaths; + AppWebLocalizationVersionsData? get webLocalizationVersionsData; + String get lastScreenInfo; + List? get rssVideoItems; + List? get rssTextItems; + MapEntry? get localizationUpdateInfo; + List? get scServerStatus; + List? get countdownFestivalListData; + Map get isGameRunning; /// Create a copy of HomeUIModelState /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $HomeUIModelStateCopyWith 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 scInstallPaths, - AppWebLocalizationVersionsData? webLocalizationVersionsData, - String lastScreenInfo, - List? rssVideoItems, - List? rssTextItems, - MapEntry? localizationUpdateInfo, - List? scServerStatus, - List? countdownFestivalListData, - Map 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 get copyWith => + _$HomeUIModelStateCopyWithImpl( + 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, - 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?, - rssTextItems: freezed == rssTextItems - ? _value.rssTextItems - : rssTextItems // ignore: cast_nullable_to_non_nullable - as List?, - localizationUpdateInfo: freezed == localizationUpdateInfo - ? _value.localizationUpdateInfo - : localizationUpdateInfo // ignore: cast_nullable_to_non_nullable - as MapEntry?, - scServerStatus: freezed == scServerStatus - ? _value.scServerStatus - : scServerStatus // ignore: cast_nullable_to_non_nullable - as List?, - countdownFestivalListData: freezed == countdownFestivalListData - ? _value.countdownFestivalListData - : countdownFestivalListData // ignore: cast_nullable_to_non_nullable - as List?, - isGameRunning: null == isGameRunning - ? _value.isGameRunning - : isGameRunning // ignore: cast_nullable_to_non_nullable - as Map, - ) 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? rssVideoItems, List? rssTextItems, MapEntry? localizationUpdateInfo, - List? scServerStatus, + List? scServerStatus, List? countdownFestivalListData, Map 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, 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?, rssTextItems: freezed == rssTextItems - ? _value._rssTextItems + ? _self.rssTextItems : rssTextItems // ignore: cast_nullable_to_non_nullable as List?, localizationUpdateInfo: freezed == localizationUpdateInfo - ? _value.localizationUpdateInfo + ? _self.localizationUpdateInfo : localizationUpdateInfo // ignore: cast_nullable_to_non_nullable as MapEntry?, scServerStatus: freezed == scServerStatus - ? _value._scServerStatus + ? _self.scServerStatus : scServerStatus // ignore: cast_nullable_to_non_nullable - as List?, + as List?, countdownFestivalListData: freezed == countdownFestivalListData - ? _value._countdownFestivalListData + ? _self.countdownFestivalListData : countdownFestivalListData // ignore: cast_nullable_to_non_nullable as List?, isGameRunning: null == isGameRunning - ? _value._isGameRunning + ? _self.isGameRunning : isGameRunning // ignore: cast_nullable_to_non_nullable as Map, )); @@ -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? rssVideoItems, final List? rssTextItems, this.localizationUpdateInfo, - final List? scServerStatus, + final List? scServerStatus, final List? countdownFestivalListData, final Map isGameRunning = const {}}) : _scInstallPaths = scInstallPaths, @@ -326,9 +271,9 @@ class _$HomeUIModelStateImpl implements _HomeUIModelState { @override final MapEntry? localizationUpdateInfo; - final List? _scServerStatus; + final List? _scServerStatus; @override - List? 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 scInstallPaths, + AppWebLocalizationVersionsData? webLocalizationVersionsData, + String lastScreenInfo, + List? rssVideoItems, + List? rssTextItems, + MapEntry? localizationUpdateInfo, + List? scServerStatus, + List? countdownFestivalListData, + Map 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, + 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?, + rssTextItems: freezed == rssTextItems + ? _self._rssTextItems + : rssTextItems // ignore: cast_nullable_to_non_nullable + as List?, + localizationUpdateInfo: freezed == localizationUpdateInfo + ? _self.localizationUpdateInfo + : localizationUpdateInfo // ignore: cast_nullable_to_non_nullable + as MapEntry?, + 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?, + isGameRunning: null == isGameRunning + ? _self._isGameRunning + : isGameRunning // ignore: cast_nullable_to_non_nullable + as Map, + )); + } } -abstract class _HomeUIModelState implements HomeUIModelState { - factory _HomeUIModelState( - {final AppPlacardData? appPlacardData, - final bool isFixing, - final String isFixingString, - final String? scInstalledPath, - final List scInstallPaths, - final AppWebLocalizationVersionsData? webLocalizationVersionsData, - final String lastScreenInfo, - final List? rssVideoItems, - final List? rssTextItems, - final MapEntry? localizationUpdateInfo, - final List? scServerStatus, - final List? countdownFestivalListData, - final Map isGameRunning}) = _$HomeUIModelStateImpl; - - @override - AppPlacardData? get appPlacardData; - @override - bool get isFixing; - @override - String get isFixingString; - @override - String? get scInstalledPath; - @override - List get scInstallPaths; - @override - AppWebLocalizationVersionsData? get webLocalizationVersionsData; - @override - String get lastScreenInfo; - @override - List? get rssVideoItems; - @override - List? get rssTextItems; - @override - MapEntry? get localizationUpdateInfo; - @override - List? get scServerStatus; - @override - List? get countdownFestivalListData; - @override - Map 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 diff --git a/lib/ui/home/input_method/input_method_dialog_ui_model.dart b/lib/ui/home/input_method/input_method_dialog_ui_model.dart index 5b8486a..c55afe6 100644 --- a/lib/ui/home/input_method/input_method_dialog_ui_model.dart +++ b/lib/ui/home/input_method/input_method_dialog_ui_model.dart @@ -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? keyMaps, Map? worldMaps, { diff --git a/lib/ui/home/input_method/input_method_dialog_ui_model.freezed.dart b/lib/ui/home/input_method/input_method_dialog_ui_model.freezed.dart index 8c0a6a0..3606802 100644 --- a/lib/ui/home/input_method/input_method_dialog_ui_model.freezed.dart +++ b/lib/ui/home/input_method/input_method_dialog_ui_model.freezed.dart @@ -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 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? get keyMaps => throw _privateConstructorUsedError; - Map? get worldMaps => throw _privateConstructorUsedError; - bool get enableAutoCopy => throw _privateConstructorUsedError; - bool get isEnableAutoTranslate => throw _privateConstructorUsedError; - bool get isAutoTranslateWorking => throw _privateConstructorUsedError; + Map? get keyMaps; + Map? 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 get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $InputMethodDialogUIStateCopyWith<$Res> { - factory $InputMethodDialogUIStateCopyWith(InputMethodDialogUIState value, - $Res Function(InputMethodDialogUIState) then) = - _$InputMethodDialogUIStateCopyWithImpl<$Res, InputMethodDialogUIState>; - @useResult - $Res call( - {Map? keyMaps, - Map? 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 get copyWith => + _$InputMethodDialogUIStateCopyWithImpl( + 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?, - worldMaps: freezed == worldMaps - ? _value.worldMaps - : worldMaps // ignore: cast_nullable_to_non_nullable - as Map?, - 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? 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?, - freezed == worldMaps - ? _value._worldMaps + worldMaps: freezed == worldMaps + ? _self.worldMaps : worldMaps // ignore: cast_nullable_to_non_nullable as Map?, 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? keyMaps, final Map? 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? keyMaps, + Map? 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?, + freezed == worldMaps + ? _self._worldMaps + : worldMaps // ignore: cast_nullable_to_non_nullable + as Map?, + 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? keyMaps, final Map? worldMaps, - {final bool enableAutoCopy, - final bool isEnableAutoTranslate, - final bool isAutoTranslateWorking}) = _$InputMethodDialogUIStateImpl; - - @override - Map? get keyMaps; - @override - Map? 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 diff --git a/lib/ui/home/input_method/server.dart b/lib/ui/home/input_method/server.dart index aa71d7f..070c971 100644 --- a/lib/ui/home/input_method/server.dart +++ b/lib/ui/home/input_method/server.dart @@ -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, diff --git a/lib/ui/home/input_method/server.freezed.dart b/lib/ui/home/input_method/server.freezed.dart index 139894c..7d15345 100644 --- a/lib/ui/home/input_method/server.freezed.dart +++ b/lib/ui/home/input_method/server.freezed.dart @@ -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 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 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( + 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 diff --git a/lib/ui/home/localization/advanced_localization_ui_model.dart b/lib/ui/home/localization/advanced_localization_ui_model.dart index 31656ea..b626f03 100644 --- a/lib/ui/home/localization/advanced_localization_ui_model.dart +++ b/lib/ui/home/localization/advanced_localization_ui_model.dart @@ -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? classMap, diff --git a/lib/ui/home/localization/advanced_localization_ui_model.freezed.dart b/lib/ui/home/localization/advanced_localization_ui_model.freezed.dart index d43427f..cc9c39b 100644 --- a/lib/ui/home/localization/advanced_localization_ui_model.freezed.dart +++ b/lib/ui/home/localization/advanced_localization_ui_model.freezed.dart @@ -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 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? 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? 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 - 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? 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 + 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?, - 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?, 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? 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? 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?, + 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? 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? 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 diff --git a/lib/ui/home/localization/localization_ui_model.dart b/lib/ui/home/localization/localization_ui_model.dart index d5b38c6..9ade269 100644 --- a/lib/ui/home/localization/localization_ui_model.dart +++ b/lib/ui/home/localization/localization_ui_model.dart @@ -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, diff --git a/lib/ui/home/localization/localization_ui_model.freezed.dart b/lib/ui/home/localization/localization_ui_model.freezed.dart index 6e8fbd1..e012f71 100644 --- a/lib/ui/home/localization/localization_ui_model.freezed.dart +++ b/lib/ui/home/localization/localization_ui_model.freezed.dart @@ -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 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? get apiLocalizationData => - throw _privateConstructorUsedError; - String get workingVersion => throw _privateConstructorUsedError; - MapEntry? get patchStatus => throw _privateConstructorUsedError; - bool? get isInstalledAdvanced => throw _privateConstructorUsedError; - List? get customizeList => throw _privateConstructorUsedError; + String? get selectedLanguage; + String? get installedCommunityInputMethodSupportVersion; + InputMethodApiLanguageData? get communityInputMethodLanguageData; + Map? get apiLocalizationData; + String get workingVersion; + MapEntry? get patchStatus; + bool? get isInstalledAdvanced; + List? get customizeList; /// Create a copy of LocalizationUIState /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $LocalizationUIStateCopyWith 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? apiLocalizationData, - String workingVersion, - MapEntry? patchStatus, - bool? isInstalledAdvanced, - List? 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 get copyWith => + _$LocalizationUIStateCopyWithImpl( + 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?, - 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?, - 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?, - ) 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?, 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?, 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?, )); @@ -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? apiLocalizationData, + String workingVersion, + MapEntry? patchStatus, + bool? isInstalledAdvanced, + List? 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?, + 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?, + 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?, + )); + } } -abstract class _LocalizationUIState implements LocalizationUIState { - factory _LocalizationUIState( - {final String? selectedLanguage, - final String? installedCommunityInputMethodSupportVersion, - final InputMethodApiLanguageData? communityInputMethodLanguageData, - final Map? apiLocalizationData, - final String workingVersion, - final MapEntry? patchStatus, - final bool? isInstalledAdvanced, - final List? customizeList}) = _$LocalizationUIStateImpl; - - @override - String? get selectedLanguage; - @override - String? get installedCommunityInputMethodSupportVersion; - @override - InputMethodApiLanguageData? get communityInputMethodLanguageData; - @override - Map? get apiLocalizationData; - @override - String get workingVersion; - @override - MapEntry? get patchStatus; - @override - bool? get isInstalledAdvanced; - @override - List? 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 diff --git a/lib/ui/home/performance/performance_ui_model.dart b/lib/ui/home/performance/performance_ui_model.dart index 903013a..4b95706 100644 --- a/lib/ui/home/performance/performance_ui_model.dart +++ b/lib/ui/home/performance/performance_ui_model.dart @@ -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, diff --git a/lib/ui/home/performance/performance_ui_model.freezed.dart b/lib/ui/home/performance/performance_ui_model.freezed.dart index a528e33..679d5e7 100644 --- a/lib/ui/home/performance/performance_ui_model.freezed.dart +++ b/lib/ui/home/performance/performance_ui_model.freezed.dart @@ -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 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>? get performanceMap => - throw _privateConstructorUsedError; - String get workingString => throw _privateConstructorUsedError; + bool get showGraphicsPerformanceTip; + bool get enabled; + Map>? 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 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>? 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 get copyWith => + _$HomePerformanceUIStateCopyWithImpl( + 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>?, - 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>?, 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>? 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>? 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>?, + 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>? performanceMap, - final String workingString}) = _$HomePerformanceUIStateImpl; - - @override - bool get showGraphicsPerformanceTip; - @override - bool get enabled; - @override - Map>? 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 diff --git a/lib/ui/nav/nav_state.dart b/lib/ui/nav/nav_state.dart index ecdbc22..b7196f1 100644 --- a/lib/ui/nav/nav_state.dart +++ b/lib/ui/nav/nav_state.dart @@ -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? items, @Default("") String errorInfo, diff --git a/lib/ui/nav/nav_state.freezed.dart b/lib/ui/nav/nav_state.freezed.dart index 65545dc..01480eb 100644 --- a/lib/ui/nav/nav_state.freezed.dart +++ b/lib/ui/nav/nav_state.freezed.dart @@ -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 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? get items => throw _privateConstructorUsedError; - String get errorInfo => throw _privateConstructorUsedError; + List? 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 get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $NavStateCopyWith<$Res> { - factory $NavStateCopyWith(NavState value, $Res Function(NavState) then) = - _$NavStateCopyWithImpl<$Res, NavState>; - @useResult - $Res call({List? 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 get copyWith => + _$NavStateCopyWithImpl(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?, - 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? 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?, 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? items, this.errorInfo = ""}) +class _NavState implements NavState { + const _NavState({final List? items, this.errorInfo = ""}) : _items = items; final List? _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? 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?, + errorInfo: null == errorInfo + ? _self.errorInfo + : errorInfo // ignore: cast_nullable_to_non_nullable + as String, + )); + } } -abstract class _NavState implements NavState { - const factory _NavState( - {final List? items, - final String errorInfo}) = _$NavStateImpl; - - @override - List? 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 diff --git a/lib/ui/settings/settings_ui_model.dart b/lib/ui/settings/settings_ui_model.dart index de2199b..572e2ed 100644 --- a/lib/ui/settings/settings_ui_model.dart +++ b/lib/ui/settings/settings_ui_model.dart @@ -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, diff --git a/lib/ui/settings/settings_ui_model.freezed.dart b/lib/ui/settings/settings_ui_model.freezed.dart index f053451..fc84675 100644 --- a/lib/ui/settings/settings_ui_model.freezed.dart +++ b/lib/ui/settings/settings_ui_model.freezed.dart @@ -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 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 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( + 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 diff --git a/lib/ui/tools/dialogs/rsi_launcher_enhance_dialog_ui.dart b/lib/ui/tools/dialogs/rsi_launcher_enhance_dialog_ui.dart index 15bb771..b3f198d 100644 --- a/lib/ui/tools/dialogs/rsi_launcher_enhance_dialog_ui.dart +++ b/lib/ui/tools/dialogs/rsi_launcher_enhance_dialog_ui.dart @@ -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 _loadEnhanceData(BuildContext context, WidgetRef ref, - ValueNotifier assarState) async { + Future _loadEnhanceData( + BuildContext context, WidgetRef ref, ValueNotifier 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 _genNewScript( - ValueNotifier assarState) async { + Future _genNewScript(ValueNotifier 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(); } -} \ No newline at end of file + + Future _loadDebugData(String debugContent, ValueNotifier 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); + } +} diff --git a/lib/ui/tools/dialogs/rsi_launcher_enhance_dialog_ui.freezed.dart b/lib/ui/tools/dialogs/rsi_launcher_enhance_dialog_ui.freezed.dart index b3016ad..a3d5cd8 100644 --- a/lib/ui/tools/dialogs/rsi_launcher_enhance_dialog_ui.freezed.dart +++ b/lib/ui/tools/dialogs/rsi_launcher_enhance_dialog_ui.freezed.dart @@ -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 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 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 get copyWith => + _$RSILauncherStateDataCopyWithImpl( + 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 diff --git a/lib/ui/tools/log_analyze_ui/log_analyze_provider.dart b/lib/ui/tools/log_analyze_ui/log_analyze_provider.dart index 9a8a1d2..96d637e 100644 --- a/lib/ui/tools/log_analyze_ui/log_analyze_provider.dart +++ b/lib/ui/tools/log_analyze_ui/log_analyze_provider.dart @@ -27,7 +27,7 @@ final Map logAnalyzeSearchTypeMap = { }; @freezed -class LogAnalyzeLineData with _$LogAnalyzeLineData { +abstract class LogAnalyzeLineData with _$LogAnalyzeLineData { const factory LogAnalyzeLineData({ required String type, required String title, diff --git a/lib/ui/tools/log_analyze_ui/log_analyze_provider.freezed.dart b/lib/ui/tools/log_analyze_ui/log_analyze_provider.freezed.dart index 56065fa..89554fd 100644 --- a/lib/ui/tools/log_analyze_ui/log_analyze_provider.freezed.dart +++ b/lib/ui/tools/log_analyze_ui/log_analyze_provider.freezed.dart @@ -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 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 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 get copyWith => + _$LogAnalyzeLineDataCopyWithImpl( + 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 diff --git a/lib/ui/tools/tools_ui_model.dart b/lib/ui/tools/tools_ui_model.dart index 660631c..9575be2 100644 --- a/lib/ui/tools/tools_ui_model.dart +++ b/lib/ui/tools/tools_ui_model.dart @@ -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, diff --git a/lib/ui/tools/tools_ui_model.freezed.dart b/lib/ui/tools/tools_ui_model.freezed.dart index 7b0d934..757251c 100644 --- a/lib/ui/tools/tools_ui_model.freezed.dart +++ b/lib/ui/tools/tools_ui_model.freezed.dart @@ -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 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 get scInstallPaths => throw _privateConstructorUsedError; - List get rsiLauncherInstallPaths => - throw _privateConstructorUsedError; - List get items => throw _privateConstructorUsedError; - bool get isItemLoading => throw _privateConstructorUsedError; + bool get working; + String get scInstalledPath; + String get rsiLauncherInstalledPath; + List get scInstallPaths; + List get rsiLauncherInstallPaths; + List 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 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 scInstallPaths, - List rsiLauncherInstallPaths, - List 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 get copyWith => + _$ToolsUIStateCopyWithImpl( + 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, - rsiLauncherInstallPaths: null == rsiLauncherInstallPaths - ? _value.rsiLauncherInstallPaths - : rsiLauncherInstallPaths // ignore: cast_nullable_to_non_nullable - as List, - items: null == items - ? _value.items - : items // ignore: cast_nullable_to_non_nullable - as List, - 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, rsiLauncherInstallPaths: null == rsiLauncherInstallPaths - ? _value._rsiLauncherInstallPaths + ? _self.rsiLauncherInstallPaths : rsiLauncherInstallPaths // ignore: cast_nullable_to_non_nullable as List, items: null == items - ? _value._items + ? _self.items : items // ignore: cast_nullable_to_non_nullable as List, 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 scInstallPaths, + List rsiLauncherInstallPaths, + List 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, + rsiLauncherInstallPaths: null == rsiLauncherInstallPaths + ? _self._rsiLauncherInstallPaths + : rsiLauncherInstallPaths // ignore: cast_nullable_to_non_nullable + as List, + items: null == items + ? _self._items + : items // ignore: cast_nullable_to_non_nullable + as List, + 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 scInstallPaths, - final List rsiLauncherInstallPaths, - final List items, - final bool isItemLoading}) = _$ToolsUIStateImpl; - - @override - bool get working; - @override - String get scInstalledPath; - @override - String get rsiLauncherInstalledPath; - @override - List get scInstallPaths; - @override - List get rsiLauncherInstallPaths; - @override - List 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 diff --git a/packages/sct_dev_tools/pubspec.yaml b/packages/sct_dev_tools/pubspec.yaml index 61e26ba..10e32eb 100644 --- a/packages/sct_dev_tools/pubspec.yaml +++ b/packages/sct_dev_tools/pubspec.yaml @@ -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 diff --git a/pubspec.lock b/pubspec.lock index d2b2d26..72c5884 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -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" diff --git a/pubspec.yaml b/pubspec.yaml index 3807af5..da2e30c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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 diff --git a/rust/Cargo.lock b/rust/Cargo.lock index d27292d..908f632 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -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", ] diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 12036e1..e3b2085 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -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"] } diff --git a/rust/src/api/asar_api.rs b/rust/src/api/asar_api.rs index 66be349..4cad6e7 100644 --- a/rust/src/api/asar_api.rs +++ b/rust/src/api/asar_api.rs @@ -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) -> 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