From 44bf771f4c911de12458c061d202c83a7b2d288a Mon Sep 17 00:00:00 2001 From: xkeyC <3334969096@qq.com> Date: Fri, 15 Aug 2025 22:48:16 +0800 Subject: [PATCH] bump: flutter 3.35.1 --- lib/app.freezed.dart | 863 +-- lib/app.g.dart | 23 +- lib/common/rust/api/asar_api.dart | 15 +- lib/common/rust/api/http_api.dart | 44 +- lib/common/rust/api/rs_process.dart | 26 +- lib/common/rust/api/win32_api.dart | 24 +- lib/common/rust/frb_generated.dart | 685 +- lib/common/rust/frb_generated.io.dart | 574 +- lib/common/rust/http_package.dart | 12 +- .../utils/multi_window_manager.freezed.dart | 464 +- lib/common/utils/multi_window_manager.g.dart | 18 +- lib/data/nav_api_data.freezed.dart | 5989 ++++++++--------- lib/data/nav_api_data.g.dart | 523 +- lib/provider/aria2c.freezed.dart | 382 +- lib/provider/aria2c.g.dart | 15 +- lib/provider/unp4kc.freezed.dart | 513 +- lib/provider/unp4kc.g.dart | 15 +- .../home_game_login_dialog_ui_model.dart | 2 +- ...me_game_login_dialog_ui_model.freezed.dart | 536 +- .../home_game_login_dialog_ui_model.g.dart | 25 +- .../home_downloader_ui_model.freezed.dart | 426 +- .../home_downloader_ui_model.g.dart | 23 +- .../game_doctor_ui_model.freezed.dart | 437 +- .../game_doctor/game_doctor_ui_model.g.dart | 23 +- lib/ui/home/home_ui_model.freezed.dart | 709 +- lib/ui/home/home_ui_model.g.dart | 15 +- .../input_method_dialog_ui_model.freezed.dart | 446 +- .../input_method_dialog_ui_model.g.dart | 27 +- lib/ui/home/input_method/server.freezed.dart | 334 +- lib/ui/home/input_method/server.g.dart | 23 +- .../input_method/server_qr_dialog_ui.g.dart | 16 +- ...dvanced_localization_ui_model.freezed.dart | 537 +- .../advanced_localization_ui_model.g.dart | 27 +- .../localization_ui_model.freezed.dart | 537 +- .../localization/localization_ui_model.g.dart | 25 +- .../performance_ui_model.freezed.dart | 412 +- .../performance/performance_ui_model.g.dart | 23 +- lib/ui/nav/nav_state.freezed.dart | 348 +- lib/ui/nav/nav_state.g.dart | 5 +- .../settings/settings_ui_model.freezed.dart | 447 +- lib/ui/settings/settings_ui_model.g.dart | 16 +- ...si_launcher_enhance_dialog_ui.freezed.dart | 427 +- .../log_analyze_provider.freezed.dart | 364 +- .../log_analyze_provider.g.dart | 79 +- lib/ui/tools/tools_ui_model.freezed.dart | 508 +- lib/ui/tools/tools_ui_model.g.dart | 15 +- pubspec.lock | 172 +- pubspec.yaml | 8 +- rust/Cargo.lock | 44 +- rust/Cargo.toml | 4 +- rust/src/frb_generated.rs | 6 +- 51 files changed, 8759 insertions(+), 8472 deletions(-) diff --git a/lib/app.freezed.dart b/lib/app.freezed.dart index 1d47412..65c7d9a 100644 --- a/lib/app.freezed.dart +++ b/lib/app.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,83 +11,47 @@ part of 'app.dart'; // dart format off T _$identity(T value) => value; - /// @nodoc mixin _$AppGlobalState { - 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 => - _$AppGlobalStateCopyWithImpl( - this as AppGlobalState, _$identity); + 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 => _$AppGlobalStateCopyWithImpl(this as AppGlobalState, _$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)'; - } +@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> { - 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}); +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; - $ThemeConfCopyWith<$Res> get themeConf; } - /// @nodoc class _$AppGlobalStateCopyWithImpl<$Res> implements $AppGlobalStateCopyWith<$Res> { @@ -97,159 +60,215 @@ class _$AppGlobalStateCopyWithImpl<$Res> 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. +@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)); + }); +} +} + + +/// Adds pattern-matching-related methods to [AppGlobalState]. +extension AppGlobalStatePatterns on AppGlobalState { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _AppGlobalState value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _AppGlobalState() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _AppGlobalState value) $default,){ +final _that = this; +switch (_that) { +case _AppGlobalState(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _AppGlobalState value)? $default,){ +final _that = this; +switch (_that) { +case _AppGlobalState() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String? deviceUUID, String? applicationSupportDir, String? applicationBinaryModuleDir, AppVersionData? networkVersionData, ThemeConf themeConf, Locale? appLocale, Box? appConfBox)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _AppGlobalState() when $default != null: +return $default(_that.deviceUUID,_that.applicationSupportDir,_that.applicationBinaryModuleDir,_that.networkVersionData,_that.themeConf,_that.appLocale,_that.appConfBox);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String? deviceUUID, String? applicationSupportDir, String? applicationBinaryModuleDir, AppVersionData? networkVersionData, ThemeConf themeConf, Locale? appLocale, Box? appConfBox) $default,) {final _that = this; +switch (_that) { +case _AppGlobalState(): +return $default(_that.deviceUUID,_that.applicationSupportDir,_that.applicationBinaryModuleDir,_that.networkVersionData,_that.themeConf,_that.appLocale,_that.appConfBox);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String? deviceUUID, String? applicationSupportDir, String? applicationBinaryModuleDir, AppVersionData? networkVersionData, ThemeConf themeConf, Locale? appLocale, Box? appConfBox)? $default,) {final _that = this; +switch (_that) { +case _AppGlobalState() when $default != null: +return $default(_that.deviceUUID,_that.applicationSupportDir,_that.applicationBinaryModuleDir,_that.networkVersionData,_that.themeConf,_that.appLocale,_that.appConfBox);case _: + return null; + +} +} - /// 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}); + 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; +@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); +/// 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)'; - } +@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}); +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; - @override - $ThemeConfCopyWith<$Res> get themeConf; } - /// @nodoc class __$AppGlobalStateCopyWithImpl<$Res> implements _$AppGlobalStateCopyWith<$Res> { @@ -258,230 +277,294 @@ class __$AppGlobalStateCopyWithImpl<$Res> 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') $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)); - }); - } +/// 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); + 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)'; - } +@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}); -} +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 _$ThemeConfCopyWithImpl<$Res> implements $ThemeConfCopyWith<$Res> { +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. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? backgroundColor = null, - Object? menuColor = null, - Object? micaColor = null, - }) { - return _then(_self.copyWith( - 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, - )); - } +/// 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(_self.copyWith( +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, + )); +} + +} + + +/// Adds pattern-matching-related methods to [ThemeConf]. +extension ThemeConfPatterns on ThemeConf { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _ThemeConf value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _ThemeConf() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _ThemeConf value) $default,){ +final _that = this; +switch (_that) { +case _ThemeConf(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _ThemeConf value)? $default,){ +final _that = this; +switch (_that) { +case _ThemeConf() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( Color backgroundColor, Color menuColor, Color micaColor)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _ThemeConf() when $default != null: +return $default(_that.backgroundColor,_that.menuColor,_that.micaColor);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( Color backgroundColor, Color menuColor, Color micaColor) $default,) {final _that = this; +switch (_that) { +case _ThemeConf(): +return $default(_that.backgroundColor,_that.menuColor,_that.micaColor);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( Color backgroundColor, Color menuColor, Color micaColor)? $default,) {final _that = this; +switch (_that) { +case _ThemeConf() when $default != null: +return $default(_that.backgroundColor,_that.menuColor,_that.micaColor);case _: + return null; + +} +} + } /// @nodoc + class _ThemeConf implements ThemeConf { - const _ThemeConf( - {this.backgroundColor = const Color(0xbf132431), - this.menuColor = const Color(0xf2132431), - this.micaColor = const Color(0xff0a3142)}); + const _ThemeConf({this.backgroundColor = const Color(0xbf132431), this.menuColor = const Color(0xf2132431), this.micaColor = const Color(0xff0a3142)}); + - @override - @JsonKey() - final Color backgroundColor; - @override - @JsonKey() - final Color menuColor; - @override - @JsonKey() - final Color micaColor; +@override@JsonKey() final Color backgroundColor; +@override@JsonKey() final Color menuColor; +@override@JsonKey() final Color micaColor; - /// Create a copy of ThemeConf - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$ThemeConfCopyWith<_ThemeConf> get copyWith => - __$ThemeConfCopyWithImpl<_ThemeConf>(this, _$identity); +/// Create a copy of ThemeConf +/// with the given fields replaced by the non-null parameter values. +@override @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 _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)'; - } +@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> - implements $ThemeConfCopyWith<$Res> { - factory _$ThemeConfCopyWith( - _ThemeConf value, $Res Function(_ThemeConf) _then) = - __$ThemeConfCopyWithImpl; - @override - @useResult - $Res call({Color backgroundColor, Color menuColor, Color micaColor}); -} +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> { +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. - @override - @pragma('vm:prefer-inline') - $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, - )); - } +/// Create a copy of ThemeConf +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $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, + )); +} + + } // dart format on diff --git a/lib/app.g.dart b/lib/app.g.dart index 42b9d9b..5807dce 100644 --- a/lib/app.g.dart +++ b/lib/app.g.dart @@ -13,8 +13,9 @@ String _$routerHash() => r'cdf659da46a6dfbab2368a85be2f803f54823142'; final routerProvider = AutoDisposeProvider.internal( router, name: r'routerProvider', - debugGetCreateSourceHash: - const bool.fromEnvironment('dart.vm.product') ? null : _$routerHash, + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') + ? null + : _$routerHash, dependencies: null, allTransitiveDependencies: null, ); @@ -22,20 +23,20 @@ final routerProvider = AutoDisposeProvider.internal( @Deprecated('Will be removed in 3.0. Use Ref instead') // ignore: unused_element typedef RouterRef = AutoDisposeProviderRef; -String _$appGlobalModelHash() => r'4e372bc744903960e4e7b146dbb394ded15e2c18'; +String _$appGlobalModelHash() => r'6cb5e8398329c7bcbaa65daf426979cf54d1bfff'; /// See also [AppGlobalModel]. @ProviderFor(AppGlobalModel) final appGlobalModelProvider = AutoDisposeNotifierProvider.internal( - AppGlobalModel.new, - name: r'appGlobalModelProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$appGlobalModelHash, - dependencies: null, - allTransitiveDependencies: null, -); + AppGlobalModel.new, + name: r'appGlobalModelProvider', + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') + ? null + : _$appGlobalModelHash, + dependencies: null, + allTransitiveDependencies: null, + ); typedef _$AppGlobalModel = AutoDisposeNotifier; // ignore_for_file: type=lint diff --git a/lib/common/rust/api/asar_api.dart b/lib/common/rust/api/asar_api.dart index f5e4231..44eb4e3 100644 --- a/lib/common/rust/api/asar_api.dart +++ b/lib/common/rust/api/asar_api.dart @@ -1,15 +1,16 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.10.0. +// @generated by `flutter_rust_bridge`@ 2.11.1. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import import '../frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; -Future getRsiLauncherAsarData( - {required String asarPath}) => - RustLib.instance.api - .crateApiAsarApiGetRsiLauncherAsarData(asarPath: asarPath); +Future getRsiLauncherAsarData({ + required String asarPath, +}) => RustLib.instance.api.crateApiAsarApiGetRsiLauncherAsarData( + asarPath: asarPath, +); class RsiLauncherAsarData { final String asarPath; @@ -24,7 +25,9 @@ class RsiLauncherAsarData { Future writeMainJs({required List content}) => RustLib.instance.api.crateApiAsarApiRsiLauncherAsarDataWriteMainJs( - that: this, content: content); + that: this, + content: content, + ); @override int get hashCode => diff --git a/lib/common/rust/api/http_api.dart b/lib/common/rust/api/http_api.dart index 658965c..15c3f36 100644 --- a/lib/common/rust/api/http_api.dart +++ b/lib/common/rust/api/http_api.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.10.0. +// @generated by `flutter_rust_bridge`@ 2.11.1. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -12,20 +12,21 @@ import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; Future setDefaultHeader({required Map headers}) => RustLib.instance.api.crateApiHttpApiSetDefaultHeader(headers: headers); -Future fetch( - {required MyMethod method, - required String url, - Map? headers, - Uint8List? inputData, - String? withIpAddress, - bool? withCustomDns}) => - RustLib.instance.api.crateApiHttpApiFetch( - method: method, - url: url, - headers: headers, - inputData: inputData, - withIpAddress: withIpAddress, - withCustomDns: withCustomDns); +Future fetch({ + required MyMethod method, + required String url, + Map? headers, + Uint8List? inputData, + String? withIpAddress, + bool? withCustomDns, +}) => RustLib.instance.api.crateApiHttpApiFetch( + method: method, + url: url, + headers: headers, + inputData: inputData, + withIpAddress: withIpAddress, + withCustomDns: withCustomDns, +); Future> dnsLookupTxt({required String host}) => RustLib.instance.api.crateApiHttpApiDnsLookupTxt(host: host); @@ -33,15 +34,4 @@ Future> dnsLookupTxt({required String host}) => Future> dnsLookupIps({required String host}) => RustLib.instance.api.crateApiHttpApiDnsLookupIps(host: host); -enum MyMethod { - options, - gets, - post, - put, - delete, - head, - trace, - connect, - patch, - ; -} +enum MyMethod { options, gets, post, put, delete, head, trace, connect, patch } diff --git a/lib/common/rust/api/rs_process.dart b/lib/common/rust/api/rs_process.dart index b398b5e..0a7d334 100644 --- a/lib/common/rust/api/rs_process.dart +++ b/lib/common/rust/api/rs_process.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.10.0. +// @generated by `flutter_rust_bridge`@ 2.11.1. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -10,14 +10,15 @@ import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; // These types are ignored because they are neither used by any `pub` functions nor (for structs and enums) marked `#[frb(unignore)]`: `RsProcess` // These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `clone` -Stream start( - {required String executable, - required List arguments, - required String workingDirectory}) => - RustLib.instance.api.crateApiRsProcessStart( - executable: executable, - arguments: arguments, - workingDirectory: workingDirectory); +Stream start({ + required String executable, + required List arguments, + required String workingDirectory, +}) => RustLib.instance.api.crateApiRsProcessStart( + executable: executable, + arguments: arguments, + workingDirectory: workingDirectory, +); Future write({required int rsPid, required String data}) => RustLib.instance.api.crateApiRsProcessWrite(rsPid: rsPid, data: data); @@ -46,9 +47,4 @@ class RsProcessStreamData { rsPid == other.rsPid; } -enum RsProcessStreamDataType { - output, - error, - exit, - ; -} +enum RsProcessStreamDataType { output, error, exit } diff --git a/lib/common/rust/api/win32_api.dart b/lib/common/rust/api/win32_api.dart index d174164..e0f4ccd 100644 --- a/lib/common/rust/api/win32_api.dart +++ b/lib/common/rust/api/win32_api.dart @@ -1,16 +1,24 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.10.0. +// @generated by `flutter_rust_bridge`@ 2.11.1. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import import '../frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; -Future sendNotify( - {String? summary, String? body, String? appName, String? appId}) => - RustLib.instance.api.crateApiWin32ApiSendNotify( - summary: summary, body: body, appName: appName, appId: appId); +Future sendNotify({ + String? summary, + String? body, + String? appName, + String? appId, +}) => RustLib.instance.api.crateApiWin32ApiSendNotify( + summary: summary, + body: body, + appName: appName, + appId: appId, +); -Future setForegroundWindow({required String windowName}) => - RustLib.instance.api - .crateApiWin32ApiSetForegroundWindow(windowName: windowName); +Future setForegroundWindow({required String windowName}) => RustLib + .instance + .api + .crateApiWin32ApiSetForegroundWindow(windowName: windowName); diff --git a/lib/common/rust/frb_generated.dart b/lib/common/rust/frb_generated.dart index a6ed697..f7d0ba7 100644 --- a/lib/common/rust/frb_generated.dart +++ b/lib/common/rust/frb_generated.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.10.0. +// @generated by `flutter_rust_bridge`@ 2.11.1. // ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field @@ -27,22 +27,20 @@ class RustLib extends BaseEntrypoint { RustLibApi? api, BaseHandler? handler, ExternalLibrary? externalLibrary, + bool forceSameCodegenVersion = true, }) async { await instance.initImpl( api: api, handler: handler, externalLibrary: externalLibrary, + forceSameCodegenVersion: forceSameCodegenVersion, ); } /// Initialize flutter_rust_bridge in mock mode. /// No libraries for FFI are loaded. - static void initMock({ - required RustLibApi api, - }) { - instance.initMockImpl( - api: api, - ); + static void initMock({required RustLibApi api}) { + instance.initMockImpl(api: api); } /// Dispose flutter_rust_bridge @@ -67,17 +65,17 @@ class RustLib extends BaseEntrypoint { kDefaultExternalLibraryLoaderConfig; @override - String get codegenVersion => '2.10.0'; + String get codegenVersion => '2.11.1'; @override int get rustContentHash => 1832496273; static const kDefaultExternalLibraryLoaderConfig = ExternalLibraryLoaderConfig( - stem: 'rust', - ioDirectory: 'rust/target/release/', - webPrefix: 'pkg/', - ); + stem: 'rust', + ioDirectory: 'rust/target/release/', + webPrefix: 'pkg/', + ); } abstract class RustLibApi extends BaseApi { @@ -85,36 +83,49 @@ abstract class RustLibApi extends BaseApi { Future> crateApiHttpApiDnsLookupTxt({required String host}); - Future crateApiHttpApiFetch( - {required MyMethod method, - required String url, - Map? headers, - Uint8List? inputData, - String? withIpAddress, - bool? withCustomDns}); + Future crateApiHttpApiFetch({ + required MyMethod method, + required String url, + Map? headers, + Uint8List? inputData, + String? withIpAddress, + bool? withCustomDns, + }); - Future crateApiAsarApiGetRsiLauncherAsarData( - {required String asarPath}); + Future crateApiAsarApiGetRsiLauncherAsarData({ + required String asarPath, + }); - Future crateApiAsarApiRsiLauncherAsarDataWriteMainJs( - {required RsiLauncherAsarData that, required List content}); + Future crateApiAsarApiRsiLauncherAsarDataWriteMainJs({ + required RsiLauncherAsarData that, + required List content, + }); - Future crateApiWin32ApiSendNotify( - {String? summary, String? body, String? appName, String? appId}); + Future crateApiWin32ApiSendNotify({ + String? summary, + String? body, + String? appName, + String? appId, + }); - Future crateApiHttpApiSetDefaultHeader( - {required Map headers}); + Future crateApiHttpApiSetDefaultHeader({ + required Map headers, + }); - Future crateApiWin32ApiSetForegroundWindow( - {required String windowName}); + Future crateApiWin32ApiSetForegroundWindow({ + required String windowName, + }); - Stream crateApiRsProcessStart( - {required String executable, - required List arguments, - required String workingDirectory}); + Stream crateApiRsProcessStart({ + required String executable, + required List arguments, + required String workingDirectory, + }); - Future crateApiRsProcessWrite( - {required int rsPid, required String data}); + Future crateApiRsProcessWrite({ + required int rsPid, + required String data, + }); } class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { @@ -127,115 +138,128 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { @override Future> crateApiHttpApiDnsLookupIps({required String host}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(host); - return wire.wire__crate__api__http_api__dns_lookup_ips(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_list_String, - decodeErrorData: dco_decode_AnyhowException, + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(host); + return wire.wire__crate__api__http_api__dns_lookup_ips(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiHttpApiDnsLookupIpsConstMeta, + argValues: [host], + apiImpl: this, ), - constMeta: kCrateApiHttpApiDnsLookupIpsConstMeta, - argValues: [host], - apiImpl: this, - )); + ); } TaskConstMeta get kCrateApiHttpApiDnsLookupIpsConstMeta => - const TaskConstMeta( - debugName: "dns_lookup_ips", - argNames: ["host"], - ); + const TaskConstMeta(debugName: "dns_lookup_ips", argNames: ["host"]); @override Future> crateApiHttpApiDnsLookupTxt({required String host}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(host); - return wire.wire__crate__api__http_api__dns_lookup_txt(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_list_String, - decodeErrorData: dco_decode_AnyhowException, + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(host); + return wire.wire__crate__api__http_api__dns_lookup_txt(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiHttpApiDnsLookupTxtConstMeta, + argValues: [host], + apiImpl: this, ), - constMeta: kCrateApiHttpApiDnsLookupTxtConstMeta, - argValues: [host], - apiImpl: this, - )); + ); } TaskConstMeta get kCrateApiHttpApiDnsLookupTxtConstMeta => - const TaskConstMeta( - debugName: "dns_lookup_txt", - argNames: ["host"], - ); + const TaskConstMeta(debugName: "dns_lookup_txt", argNames: ["host"]); @override - Future crateApiHttpApiFetch( - {required MyMethod method, - required String url, - Map? headers, - Uint8List? inputData, - String? withIpAddress, - bool? withCustomDns}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_my_method(method); - var arg1 = cst_encode_String(url); - var arg2 = cst_encode_opt_Map_String_String_None(headers); - var arg3 = cst_encode_opt_list_prim_u_8_strict(inputData); - var arg4 = cst_encode_opt_String(withIpAddress); - var arg5 = cst_encode_opt_box_autoadd_bool(withCustomDns); - return wire.wire__crate__api__http_api__fetch( - port_, arg0, arg1, arg2, arg3, arg4, arg5); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_rust_http_response, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiHttpApiFetch({ + required MyMethod method, + required String url, + Map? headers, + Uint8List? inputData, + String? withIpAddress, + bool? withCustomDns, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_my_method(method); + var arg1 = cst_encode_String(url); + var arg2 = cst_encode_opt_Map_String_String_None(headers); + var arg3 = cst_encode_opt_list_prim_u_8_strict(inputData); + var arg4 = cst_encode_opt_String(withIpAddress); + var arg5 = cst_encode_opt_box_autoadd_bool(withCustomDns); + return wire.wire__crate__api__http_api__fetch( + port_, + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_rust_http_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiHttpApiFetchConstMeta, + argValues: [ + method, + url, + headers, + inputData, + withIpAddress, + withCustomDns, + ], + apiImpl: this, ), - constMeta: kCrateApiHttpApiFetchConstMeta, - argValues: [ - method, - url, - headers, - inputData, - withIpAddress, - withCustomDns - ], - apiImpl: this, - )); + ); } TaskConstMeta get kCrateApiHttpApiFetchConstMeta => const TaskConstMeta( - debugName: "fetch", - argNames: [ - "method", - "url", - "headers", - "inputData", - "withIpAddress", - "withCustomDns" - ], - ); + debugName: "fetch", + argNames: [ + "method", + "url", + "headers", + "inputData", + "withIpAddress", + "withCustomDns", + ], + ); @override - Future crateApiAsarApiGetRsiLauncherAsarData( - {required String asarPath}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(asarPath); - return wire.wire__crate__api__asar_api__get_rsi_launcher_asar_data( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_rsi_launcher_asar_data, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiAsarApiGetRsiLauncherAsarData({ + required String asarPath, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(asarPath); + return wire.wire__crate__api__asar_api__get_rsi_launcher_asar_data( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_rsi_launcher_asar_data, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiAsarApiGetRsiLauncherAsarDataConstMeta, + argValues: [asarPath], + apiImpl: this, ), - constMeta: kCrateApiAsarApiGetRsiLauncherAsarDataConstMeta, - argValues: [asarPath], - apiImpl: this, - )); + ); } TaskConstMeta get kCrateApiAsarApiGetRsiLauncherAsarDataConstMeta => @@ -245,24 +269,31 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ); @override - Future crateApiAsarApiRsiLauncherAsarDataWriteMainJs( - {required RsiLauncherAsarData that, required List content}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_rsi_launcher_asar_data(that); - var arg1 = cst_encode_list_prim_u_8_loose(content); - return wire - .wire__crate__api__asar_api__rsi_launcher_asar_data_write_main_js( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unit, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiAsarApiRsiLauncherAsarDataWriteMainJs({ + required RsiLauncherAsarData that, + required List content, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_rsi_launcher_asar_data(that); + var arg1 = cst_encode_list_prim_u_8_loose(content); + return wire + .wire__crate__api__asar_api__rsi_launcher_asar_data_write_main_js( + port_, + arg0, + arg1, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiAsarApiRsiLauncherAsarDataWriteMainJsConstMeta, + argValues: [that, content], + apiImpl: this, ), - constMeta: kCrateApiAsarApiRsiLauncherAsarDataWriteMainJsConstMeta, - argValues: [that, content], - apiImpl: this, - )); + ); } TaskConstMeta get kCrateApiAsarApiRsiLauncherAsarDataWriteMainJsConstMeta => @@ -272,48 +303,65 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ); @override - Future crateApiWin32ApiSendNotify( - {String? summary, String? body, String? appName, String? appId}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_opt_String(summary); - var arg1 = cst_encode_opt_String(body); - var arg2 = cst_encode_opt_String(appName); - var arg3 = cst_encode_opt_String(appId); - return wire.wire__crate__api__win32_api__send_notify( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unit, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiWin32ApiSendNotify({ + String? summary, + String? body, + String? appName, + String? appId, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_opt_String(summary); + var arg1 = cst_encode_opt_String(body); + var arg2 = cst_encode_opt_String(appName); + var arg3 = cst_encode_opt_String(appId); + return wire.wire__crate__api__win32_api__send_notify( + port_, + arg0, + arg1, + arg2, + arg3, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiWin32ApiSendNotifyConstMeta, + argValues: [summary, body, appName, appId], + apiImpl: this, ), - constMeta: kCrateApiWin32ApiSendNotifyConstMeta, - argValues: [summary, body, appName, appId], - apiImpl: this, - )); + ); } TaskConstMeta get kCrateApiWin32ApiSendNotifyConstMeta => const TaskConstMeta( - debugName: "send_notify", - argNames: ["summary", "body", "appName", "appId"], - ); + debugName: "send_notify", + argNames: ["summary", "body", "appName", "appId"], + ); @override - Future crateApiHttpApiSetDefaultHeader( - {required Map headers}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_Map_String_String_None(headers); - return wire.wire__crate__api__http_api__set_default_header(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unit, - decodeErrorData: null, + Future crateApiHttpApiSetDefaultHeader({ + required Map headers, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_Map_String_String_None(headers); + return wire.wire__crate__api__http_api__set_default_header( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: kCrateApiHttpApiSetDefaultHeaderConstMeta, + argValues: [headers], + apiImpl: this, ), - constMeta: kCrateApiHttpApiSetDefaultHeaderConstMeta, - argValues: [headers], - apiImpl: this, - )); + ); } TaskConstMeta get kCrateApiHttpApiSetDefaultHeaderConstMeta => @@ -323,22 +371,27 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ); @override - Future crateApiWin32ApiSetForegroundWindow( - {required String windowName}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(windowName); - return wire.wire__crate__api__win32_api__set_foreground_window( - port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_AnyhowException, + Future crateApiWin32ApiSetForegroundWindow({ + required String windowName, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(windowName); + return wire.wire__crate__api__win32_api__set_foreground_window( + port_, + arg0, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateApiWin32ApiSetForegroundWindowConstMeta, + argValues: [windowName], + apiImpl: this, ), - constMeta: kCrateApiWin32ApiSetForegroundWindowConstMeta, - argValues: [windowName], - apiImpl: this, - )); + ); } TaskConstMeta get kCrateApiWin32ApiSetForegroundWindowConstMeta => @@ -348,59 +401,73 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ); @override - Stream crateApiRsProcessStart( - {required String executable, - required List arguments, - required String workingDirectory}) { + Stream crateApiRsProcessStart({ + required String executable, + required List arguments, + required String workingDirectory, + }) { final streamSink = RustStreamSink(); - unawaited(handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(executable); - var arg1 = cst_encode_list_String(arguments); - var arg2 = cst_encode_String(workingDirectory); - var arg3 = cst_encode_StreamSink_rs_process_stream_data_Dco(streamSink); - return wire.wire__crate__api__rs_process__start( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unit, - decodeErrorData: null, + unawaited( + handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(executable); + var arg1 = cst_encode_list_String(arguments); + var arg2 = cst_encode_String(workingDirectory); + var arg3 = cst_encode_StreamSink_rs_process_stream_data_Dco( + streamSink, + ); + return wire.wire__crate__api__rs_process__start( + port_, + arg0, + arg1, + arg2, + arg3, + ); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: kCrateApiRsProcessStartConstMeta, + argValues: [executable, arguments, workingDirectory, streamSink], + apiImpl: this, + ), ), - constMeta: kCrateApiRsProcessStartConstMeta, - argValues: [executable, arguments, workingDirectory, streamSink], - apiImpl: this, - ))); + ); return streamSink.stream; } TaskConstMeta get kCrateApiRsProcessStartConstMeta => const TaskConstMeta( - debugName: "start", - argNames: ["executable", "arguments", "workingDirectory", "streamSink"], - ); + debugName: "start", + argNames: ["executable", "arguments", "workingDirectory", "streamSink"], + ); @override - Future crateApiRsProcessWrite( - {required int rsPid, required String data}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_u_32(rsPid); - var arg1 = cst_encode_String(data); - return wire.wire__crate__api__rs_process__write(port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unit, - decodeErrorData: null, + Future crateApiRsProcessWrite({ + required int rsPid, + required String data, + }) { + return handler.executeNormal( + NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_u_32(rsPid); + var arg1 = cst_encode_String(data); + return wire.wire__crate__api__rs_process__write(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: kCrateApiRsProcessWriteConstMeta, + argValues: [rsPid, data], + apiImpl: this, ), - constMeta: kCrateApiRsProcessWriteConstMeta, - argValues: [rsPid, data], - apiImpl: this, - )); + ); } - TaskConstMeta get kCrateApiRsProcessWriteConstMeta => const TaskConstMeta( - debugName: "write", - argNames: ["rsPid", "data"], - ); + TaskConstMeta get kCrateApiRsProcessWriteConstMeta => + const TaskConstMeta(debugName: "write", argNames: ["rsPid", "data"]); @protected AnyhowException dco_decode_AnyhowException(dynamic raw) { @@ -411,13 +478,16 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { @protected Map dco_decode_Map_String_String_None(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return Map.fromEntries(dco_decode_list_record_string_string(raw) - .map((e) => MapEntry(e.$1, e.$2))); + return Map.fromEntries( + dco_decode_list_record_string_string( + raw, + ).map((e) => MapEntry(e.$1, e.$2)), + ); } @protected RustStreamSink - dco_decode_StreamSink_rs_process_stream_data_Dco(dynamic raw) { + dco_decode_StreamSink_rs_process_stream_data_Dco(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs throw UnimplementedError(); } @@ -442,7 +512,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { @protected RsiLauncherAsarData dco_decode_box_autoadd_rsi_launcher_asar_data( - dynamic raw) { + dynamic raw, + ) { // Codec=Dco (DartCObject based), see doc to use other codecs return dco_decode_rsi_launcher_asar_data(raw); } @@ -532,10 +603,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { if (arr.length != 2) { throw Exception('Expected 2 elements, got ${arr.length}'); } - return ( - dco_decode_String(arr[0]), - dco_decode_String(arr[1]), - ); + return (dco_decode_String(arr[0]), dco_decode_String(arr[1])); } @protected @@ -626,7 +694,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { @protected Map sse_decode_Map_String_String_None( - SseDeserializer deserializer) { + SseDeserializer deserializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs var inner = sse_decode_list_record_string_string(deserializer); return Map.fromEntries(inner.map((e) => MapEntry(e.$1, e.$2))); @@ -634,8 +703,9 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { @protected RustStreamSink - sse_decode_StreamSink_rs_process_stream_data_Dco( - SseDeserializer deserializer) { + sse_decode_StreamSink_rs_process_stream_data_Dco( + SseDeserializer deserializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs throw UnimplementedError('Unreachable ()'); } @@ -661,7 +731,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { @protected RsiLauncherAsarData sse_decode_box_autoadd_rsi_launcher_asar_data( - SseDeserializer deserializer) { + SseDeserializer deserializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs return (sse_decode_rsi_launcher_asar_data(deserializer)); } @@ -706,7 +777,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { @protected List<(String, String)> sse_decode_list_record_string_string( - SseDeserializer deserializer) { + SseDeserializer deserializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs var len_ = sse_decode_i_32(deserializer); @@ -733,7 +805,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { @protected Map? sse_decode_opt_Map_String_String_None( - SseDeserializer deserializer) { + SseDeserializer deserializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs if (sse_decode_bool(deserializer)) { @@ -789,7 +862,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { @protected (String, String) sse_decode_record_string_string( - SseDeserializer deserializer) { + SseDeserializer deserializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs var var_field0 = sse_decode_String(deserializer); var var_field1 = sse_decode_String(deserializer); @@ -798,18 +872,23 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { @protected RsProcessStreamData sse_decode_rs_process_stream_data( - SseDeserializer deserializer) { + SseDeserializer deserializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs var var_dataType = sse_decode_rs_process_stream_data_type(deserializer); var var_data = sse_decode_String(deserializer); var var_rsPid = sse_decode_u_32(deserializer); return RsProcessStreamData( - dataType: var_dataType, data: var_data, rsPid: var_rsPid); + dataType: var_dataType, + data: var_data, + rsPid: var_rsPid, + ); } @protected RsProcessStreamDataType sse_decode_rs_process_stream_data_type( - SseDeserializer deserializer) { + SseDeserializer deserializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs var inner = sse_decode_i_32(deserializer); return RsProcessStreamDataType.values[inner]; @@ -817,15 +896,17 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { @protected RsiLauncherAsarData sse_decode_rsi_launcher_asar_data( - SseDeserializer deserializer) { + SseDeserializer deserializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs var var_asarPath = sse_decode_String(deserializer); var var_mainJsPath = sse_decode_String(deserializer); var var_mainJsContent = sse_decode_list_prim_u_8_strict(deserializer); return RsiLauncherAsarData( - asarPath: var_asarPath, - mainJsPath: var_mainJsPath, - mainJsContent: var_mainJsContent); + asarPath: var_asarPath, + mainJsPath: var_mainJsPath, + mainJsContent: var_mainJsContent, + ); } @protected @@ -839,13 +920,14 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { var var_remoteAddr = sse_decode_String(deserializer); var var_data = sse_decode_opt_list_prim_u_8_strict(deserializer); return RustHttpResponse( - statusCode: var_statusCode, - headers: var_headers, - url: var_url, - contentLength: var_contentLength, - version: var_version, - remoteAddr: var_remoteAddr, - data: var_data); + statusCode: var_statusCode, + headers: var_headers, + url: var_url, + contentLength: var_contentLength, + version: var_version, + remoteAddr: var_remoteAddr, + data: var_data, + ); } @protected @@ -933,30 +1015,40 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { @protected void sse_encode_AnyhowException( - AnyhowException self, SseSerializer serializer) { + AnyhowException self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_String(self.message, serializer); } @protected void sse_encode_Map_String_String_None( - Map self, SseSerializer serializer) { + Map self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_list_record_string_string( - self.entries.map((e) => (e.key, e.value)).toList(), serializer); + self.entries.map((e) => (e.key, e.value)).toList(), + serializer, + ); } @protected void sse_encode_StreamSink_rs_process_stream_data_Dco( - RustStreamSink self, SseSerializer serializer) { + RustStreamSink self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_String( - self.setupAndSerialize( - codec: DcoCodec( + self.setupAndSerialize( + codec: DcoCodec( decodeSuccessData: dco_decode_rs_process_stream_data, decodeErrorData: dco_decode_AnyhowException, - )), - serializer); + ), + ), + serializer, + ); } @protected @@ -979,7 +1071,9 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { @protected void sse_encode_box_autoadd_rsi_launcher_asar_data( - RsiLauncherAsarData self, SseSerializer serializer) { + RsiLauncherAsarData self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_rsi_launcher_asar_data(self, serializer); } @@ -1007,16 +1101,21 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { @protected void sse_encode_list_prim_u_8_loose( - List self, SseSerializer serializer) { + List self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_i_32(self.length, serializer); - serializer.buffer - .putUint8List(self is Uint8List ? self : Uint8List.fromList(self)); + serializer.buffer.putUint8List( + self is Uint8List ? self : Uint8List.fromList(self), + ); } @protected void sse_encode_list_prim_u_8_strict( - Uint8List self, SseSerializer serializer) { + Uint8List self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_i_32(self.length, serializer); serializer.buffer.putUint8List(self); @@ -1024,7 +1123,9 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { @protected void sse_encode_list_record_string_string( - List<(String, String)> self, SseSerializer serializer) { + List<(String, String)> self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_i_32(self.length, serializer); for (final item in self) { @@ -1034,7 +1135,9 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { @protected void sse_encode_my_http_version( - MyHttpVersion self, SseSerializer serializer) { + MyHttpVersion self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_i_32(self.index, serializer); } @@ -1047,7 +1150,9 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { @protected void sse_encode_opt_Map_String_String_None( - Map? self, SseSerializer serializer) { + Map? self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_bool(self != null, serializer); @@ -1088,7 +1193,9 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { @protected void sse_encode_opt_list_prim_u_8_strict( - Uint8List? self, SseSerializer serializer) { + Uint8List? self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_bool(self != null, serializer); @@ -1099,7 +1206,9 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { @protected void sse_encode_record_string_string( - (String, String) self, SseSerializer serializer) { + (String, String) self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_String(self.$1, serializer); sse_encode_String(self.$2, serializer); @@ -1107,7 +1216,9 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { @protected void sse_encode_rs_process_stream_data( - RsProcessStreamData self, SseSerializer serializer) { + RsProcessStreamData self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_rs_process_stream_data_type(self.dataType, serializer); sse_encode_String(self.data, serializer); @@ -1116,14 +1227,18 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { @protected void sse_encode_rs_process_stream_data_type( - RsProcessStreamDataType self, SseSerializer serializer) { + RsProcessStreamDataType self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_i_32(self.index, serializer); } @protected void sse_encode_rsi_launcher_asar_data( - RsiLauncherAsarData self, SseSerializer serializer) { + RsiLauncherAsarData self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_String(self.asarPath, serializer); sse_encode_String(self.mainJsPath, serializer); @@ -1132,7 +1247,9 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { @protected void sse_encode_rust_http_response( - RustHttpResponse self, SseSerializer serializer) { + RustHttpResponse self, + SseSerializer serializer, + ) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_u_16(self.statusCode, serializer); sse_encode_Map_String_String_None(self.headers, serializer); diff --git a/lib/common/rust/frb_generated.io.dart b/lib/common/rust/frb_generated.io.dart index d661ef7..e9a0a38 100644 --- a/lib/common/rust/frb_generated.io.dart +++ b/lib/common/rust/frb_generated.io.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.10.0. +// @generated by `flutter_rust_bridge`@ 2.11.1. // ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field @@ -30,7 +30,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected RustStreamSink - dco_decode_StreamSink_rs_process_stream_data_Dco(dynamic raw); + dco_decode_StreamSink_rs_process_stream_data_Dco(dynamic raw); @protected String dco_decode_String(dynamic raw); @@ -43,7 +43,8 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected RsiLauncherAsarData dco_decode_box_autoadd_rsi_launcher_asar_data( - dynamic raw); + dynamic raw, + ); @protected BigInt dco_decode_box_autoadd_u_64(dynamic raw); @@ -119,12 +120,14 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected Map sse_decode_Map_String_String_None( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected RustStreamSink - sse_decode_StreamSink_rs_process_stream_data_Dco( - SseDeserializer deserializer); + sse_decode_StreamSink_rs_process_stream_data_Dco( + SseDeserializer deserializer, + ); @protected String sse_decode_String(SseDeserializer deserializer); @@ -137,7 +140,8 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected RsiLauncherAsarData sse_decode_box_autoadd_rsi_launcher_asar_data( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected BigInt sse_decode_box_autoadd_u_64(SseDeserializer deserializer); @@ -156,7 +160,8 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected List<(String, String)> sse_decode_list_record_string_string( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected MyHttpVersion sse_decode_my_http_version(SseDeserializer deserializer); @@ -166,7 +171,8 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected Map? sse_decode_opt_Map_String_String_None( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected String? sse_decode_opt_String(SseDeserializer deserializer); @@ -182,19 +188,23 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected (String, String) sse_decode_record_string_string( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected RsProcessStreamData sse_decode_rs_process_stream_data( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected RsProcessStreamDataType sse_decode_rs_process_stream_data_type( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected RsiLauncherAsarData sse_decode_rsi_launcher_asar_data( - SseDeserializer deserializer); + SseDeserializer deserializer, + ); @protected RustHttpResponse sse_decode_rust_http_response(SseDeserializer deserializer); @@ -216,29 +226,35 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected ffi.Pointer cst_encode_AnyhowException( - AnyhowException raw) { + AnyhowException raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs throw UnimplementedError(); } @protected ffi.Pointer - cst_encode_Map_String_String_None(Map raw) { + cst_encode_Map_String_String_None(Map raw) { // Codec=Cst (C-struct based), see doc to use other codecs return cst_encode_list_record_string_string( - raw.entries.map((e) => (e.key, e.value)).toList()); + raw.entries.map((e) => (e.key, e.value)).toList(), + ); } @protected ffi.Pointer - cst_encode_StreamSink_rs_process_stream_data_Dco( - RustStreamSink raw) { + cst_encode_StreamSink_rs_process_stream_data_Dco( + RustStreamSink raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_String(raw.setupAndSerialize( + return cst_encode_String( + raw.setupAndSerialize( codec: DcoCodec( - decodeSuccessData: dco_decode_rs_process_stream_data, - decodeErrorData: dco_decode_AnyhowException, - ))); + decodeSuccessData: dco_decode_rs_process_stream_data, + decodeErrorData: dco_decode_AnyhowException, + ), + ), + ); } @protected @@ -255,7 +271,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected ffi.Pointer - cst_encode_box_autoadd_rsi_launcher_asar_data(RsiLauncherAsarData raw) { + cst_encode_box_autoadd_rsi_launcher_asar_data(RsiLauncherAsarData raw) { // Codec=Cst (C-struct based), see doc to use other codecs final ptr = wire.cst_new_box_autoadd_rsi_launcher_asar_data(); cst_api_fill_to_wire_rsi_launcher_asar_data(raw, ptr.ref); @@ -280,7 +296,8 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected ffi.Pointer cst_encode_list_prim_u_8_loose( - List raw) { + List raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs final ans = wire.cst_new_list_prim_u_8_loose(raw.length); ans.ref.ptr.asTypedList(raw.length).setAll(0, raw); @@ -289,7 +306,8 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected ffi.Pointer cst_encode_list_prim_u_8_strict( - Uint8List raw) { + Uint8List raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs final ans = wire.cst_new_list_prim_u_8_strict(raw.length); ans.ref.ptr.asTypedList(raw.length).setAll(0, raw); @@ -298,7 +316,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected ffi.Pointer - cst_encode_list_record_string_string(List<(String, String)> raw) { + cst_encode_list_record_string_string(List<(String, String)> raw) { // Codec=Cst (C-struct based), see doc to use other codecs final ans = wire.cst_new_list_record_string_string(raw.length); for (var i = 0; i < raw.length; ++i) { @@ -309,14 +327,15 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected ffi.Pointer - cst_encode_opt_Map_String_String_None(Map? raw) { + cst_encode_opt_Map_String_String_None(Map? raw) { // Codec=Cst (C-struct based), see doc to use other codecs return raw == null ? ffi.nullptr : cst_encode_Map_String_String_None(raw); } @protected ffi.Pointer cst_encode_opt_String( - String? raw) { + String? raw, + ) { // Codec=Cst (C-struct based), see doc to use other codecs return raw == null ? ffi.nullptr : cst_encode_String(raw); } @@ -335,7 +354,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected ffi.Pointer - cst_encode_opt_list_prim_u_8_strict(Uint8List? raw) { + cst_encode_opt_list_prim_u_8_strict(Uint8List? raw) { // Codec=Cst (C-struct based), see doc to use other codecs return raw == null ? ffi.nullptr : cst_encode_list_prim_u_8_strict(raw); } @@ -348,21 +367,26 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected void cst_api_fill_to_wire_box_autoadd_rsi_launcher_asar_data( - RsiLauncherAsarData apiObj, - ffi.Pointer wireObj) { + RsiLauncherAsarData apiObj, + ffi.Pointer wireObj, + ) { cst_api_fill_to_wire_rsi_launcher_asar_data(apiObj, wireObj.ref); } @protected void cst_api_fill_to_wire_record_string_string( - (String, String) apiObj, wire_cst_record_string_string wireObj) { + (String, String) apiObj, + wire_cst_record_string_string wireObj, + ) { wireObj.field0 = cst_encode_String(apiObj.$1); wireObj.field1 = cst_encode_String(apiObj.$2); } @protected void cst_api_fill_to_wire_rs_process_stream_data( - RsProcessStreamData apiObj, wire_cst_rs_process_stream_data wireObj) { + RsProcessStreamData apiObj, + wire_cst_rs_process_stream_data wireObj, + ) { wireObj.data_type = cst_encode_rs_process_stream_data_type(apiObj.dataType); wireObj.data = cst_encode_String(apiObj.data); wireObj.rs_pid = cst_encode_u_32(apiObj.rsPid); @@ -370,21 +394,27 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected void cst_api_fill_to_wire_rsi_launcher_asar_data( - RsiLauncherAsarData apiObj, wire_cst_rsi_launcher_asar_data wireObj) { + RsiLauncherAsarData apiObj, + wire_cst_rsi_launcher_asar_data wireObj, + ) { wireObj.asar_path = cst_encode_String(apiObj.asarPath); wireObj.main_js_path = cst_encode_String(apiObj.mainJsPath); - wireObj.main_js_content = - cst_encode_list_prim_u_8_strict(apiObj.mainJsContent); + wireObj.main_js_content = cst_encode_list_prim_u_8_strict( + apiObj.mainJsContent, + ); } @protected void cst_api_fill_to_wire_rust_http_response( - RustHttpResponse apiObj, wire_cst_rust_http_response wireObj) { + RustHttpResponse apiObj, + wire_cst_rust_http_response wireObj, + ) { wireObj.status_code = cst_encode_u_16(apiObj.statusCode); wireObj.headers = cst_encode_Map_String_String_None(apiObj.headers); wireObj.url = cst_encode_String(apiObj.url); - wireObj.content_length = - cst_encode_opt_box_autoadd_u_64(apiObj.contentLength); + wireObj.content_length = cst_encode_opt_box_autoadd_u_64( + apiObj.contentLength, + ); wireObj.version = cst_encode_my_http_version(apiObj.version); wireObj.remote_addr = cst_encode_String(apiObj.remoteAddr); wireObj.data = cst_encode_opt_list_prim_u_8_strict(apiObj.data); @@ -419,15 +449,21 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected void sse_encode_AnyhowException( - AnyhowException self, SseSerializer serializer); + AnyhowException self, + SseSerializer serializer, + ); @protected void sse_encode_Map_String_String_None( - Map self, SseSerializer serializer); + Map self, + SseSerializer serializer, + ); @protected void sse_encode_StreamSink_rs_process_stream_data_Dco( - RustStreamSink self, SseSerializer serializer); + RustStreamSink self, + SseSerializer serializer, + ); @protected void sse_encode_String(String self, SseSerializer serializer); @@ -440,7 +476,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected void sse_encode_box_autoadd_rsi_launcher_asar_data( - RsiLauncherAsarData self, SseSerializer serializer); + RsiLauncherAsarData self, + SseSerializer serializer, + ); @protected void sse_encode_box_autoadd_u_64(BigInt self, SseSerializer serializer); @@ -456,11 +494,15 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected void sse_encode_list_prim_u_8_strict( - Uint8List self, SseSerializer serializer); + Uint8List self, + SseSerializer serializer, + ); @protected void sse_encode_list_record_string_string( - List<(String, String)> self, SseSerializer serializer); + List<(String, String)> self, + SseSerializer serializer, + ); @protected void sse_encode_my_http_version(MyHttpVersion self, SseSerializer serializer); @@ -470,7 +512,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected void sse_encode_opt_Map_String_String_None( - Map? self, SseSerializer serializer); + Map? self, + SseSerializer serializer, + ); @protected void sse_encode_opt_String(String? self, SseSerializer serializer); @@ -483,27 +527,39 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected void sse_encode_opt_list_prim_u_8_strict( - Uint8List? self, SseSerializer serializer); + Uint8List? self, + SseSerializer serializer, + ); @protected void sse_encode_record_string_string( - (String, String) self, SseSerializer serializer); + (String, String) self, + SseSerializer serializer, + ); @protected void sse_encode_rs_process_stream_data( - RsProcessStreamData self, SseSerializer serializer); + RsProcessStreamData self, + SseSerializer serializer, + ); @protected void sse_encode_rs_process_stream_data_type( - RsProcessStreamDataType self, SseSerializer serializer); + RsProcessStreamDataType self, + SseSerializer serializer, + ); @protected void sse_encode_rsi_launcher_asar_data( - RsiLauncherAsarData self, SseSerializer serializer); + RsiLauncherAsarData self, + SseSerializer serializer, + ); @protected void sse_encode_rust_http_response( - RustHttpResponse self, SseSerializer serializer); + RustHttpResponse self, + SseSerializer serializer, + ); @protected void sse_encode_u_16(int self, SseSerializer serializer); @@ -536,29 +592,25 @@ class RustLibWire implements BaseWire { /// Holds the symbol lookup function. final ffi.Pointer Function(String symbolName) - _lookup; + _lookup; /// The symbols are looked up in [dynamicLibrary]. RustLibWire(ffi.DynamicLibrary dynamicLibrary) - : _lookup = dynamicLibrary.lookup; + : _lookup = dynamicLibrary.lookup; /// The symbols are looked up with [lookup]. RustLibWire.fromLookup( - ffi.Pointer Function(String symbolName) - lookup) - : _lookup = lookup; + ffi.Pointer Function(String symbolName) lookup, + ) : _lookup = lookup; - void store_dart_post_cobject( - DartPostCObjectFnType ptr, - ) { - return _store_dart_post_cobject( - ptr, - ); + void store_dart_post_cobject(DartPostCObjectFnType ptr) { + return _store_dart_post_cobject(ptr); } late final _store_dart_post_cobjectPtr = _lookup>( - 'store_dart_post_cobject'); + 'store_dart_post_cobject', + ); late final _store_dart_post_cobject = _store_dart_post_cobjectPtr .asFunction(); @@ -566,39 +618,45 @@ class RustLibWire implements BaseWire { int port_, ffi.Pointer host, ) { - return _wire__crate__api__http_api__dns_lookup_ips( - port_, - host, - ); + return _wire__crate__api__http_api__dns_lookup_ips(port_, host); } - late final _wire__crate__api__http_api__dns_lookup_ipsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_starcitizen_doctor_wire__crate__api__http_api__dns_lookup_ips'); + late final _wire__crate__api__http_api__dns_lookup_ipsPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >('frbgen_starcitizen_doctor_wire__crate__api__http_api__dns_lookup_ips'); late final _wire__crate__api__http_api__dns_lookup_ips = - _wire__crate__api__http_api__dns_lookup_ipsPtr.asFunction< - void Function(int, ffi.Pointer)>(); + _wire__crate__api__http_api__dns_lookup_ipsPtr + .asFunction< + void Function(int, ffi.Pointer) + >(); void wire__crate__api__http_api__dns_lookup_txt( int port_, ffi.Pointer host, ) { - return _wire__crate__api__http_api__dns_lookup_txt( - port_, - host, - ); + return _wire__crate__api__http_api__dns_lookup_txt(port_, host); } - late final _wire__crate__api__http_api__dns_lookup_txtPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_starcitizen_doctor_wire__crate__api__http_api__dns_lookup_txt'); + late final _wire__crate__api__http_api__dns_lookup_txtPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >('frbgen_starcitizen_doctor_wire__crate__api__http_api__dns_lookup_txt'); late final _wire__crate__api__http_api__dns_lookup_txt = - _wire__crate__api__http_api__dns_lookup_txtPtr.asFunction< - void Function(int, ffi.Pointer)>(); + _wire__crate__api__http_api__dns_lookup_txtPtr + .asFunction< + void Function(int, ffi.Pointer) + >(); void wire__crate__api__http_api__fetch( int port_, @@ -620,27 +678,33 @@ class RustLibWire implements BaseWire { ); } - late final _wire__crate__api__http_api__fetchPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_starcitizen_doctor_wire__crate__api__http_api__fetch'); + late final _wire__crate__api__http_api__fetchPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >('frbgen_starcitizen_doctor_wire__crate__api__http_api__fetch'); late final _wire__crate__api__http_api__fetch = - _wire__crate__api__http_api__fetchPtr.asFunction< - void Function( + _wire__crate__api__http_api__fetchPtr + .asFunction< + void Function( int, int, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, + ) + >(); void wire__crate__api__asar_api__get_rsi_launcher_asar_data( int port_, @@ -652,14 +716,22 @@ class RustLibWire implements BaseWire { ); } - late final _wire__crate__api__asar_api__get_rsi_launcher_asar_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_starcitizen_doctor_wire__crate__api__asar_api__get_rsi_launcher_asar_data'); + late final _wire__crate__api__asar_api__get_rsi_launcher_asar_dataPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_starcitizen_doctor_wire__crate__api__asar_api__get_rsi_launcher_asar_data', + ); late final _wire__crate__api__asar_api__get_rsi_launcher_asar_data = - _wire__crate__api__asar_api__get_rsi_launcher_asar_dataPtr.asFunction< - void Function(int, ffi.Pointer)>(); + _wire__crate__api__asar_api__get_rsi_launcher_asar_dataPtr + .asFunction< + void Function(int, ffi.Pointer) + >(); void wire__crate__api__asar_api__rsi_launcher_asar_data_write_main_js( int port_, @@ -675,17 +747,25 @@ class RustLibWire implements BaseWire { late final _wire__crate__api__asar_api__rsi_launcher_asar_data_write_main_jsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_starcitizen_doctor_wire__crate__api__asar_api__rsi_launcher_asar_data_write_main_js'); + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ) + > + >( + 'frbgen_starcitizen_doctor_wire__crate__api__asar_api__rsi_launcher_asar_data_write_main_js', + ); late final _wire__crate__api__asar_api__rsi_launcher_asar_data_write_main_js = _wire__crate__api__asar_api__rsi_launcher_asar_data_write_main_jsPtr .asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); void wire__crate__api__win32_api__send_notify( int port_, @@ -703,43 +783,53 @@ class RustLibWire implements BaseWire { ); } - late final _wire__crate__api__win32_api__send_notifyPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_starcitizen_doctor_wire__crate__api__win32_api__send_notify'); + late final _wire__crate__api__win32_api__send_notifyPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >('frbgen_starcitizen_doctor_wire__crate__api__win32_api__send_notify'); late final _wire__crate__api__win32_api__send_notify = - _wire__crate__api__win32_api__send_notifyPtr.asFunction< - void Function( + _wire__crate__api__win32_api__send_notifyPtr + .asFunction< + void Function( int, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, + ) + >(); void wire__crate__api__http_api__set_default_header( int port_, ffi.Pointer headers, ) { - return _wire__crate__api__http_api__set_default_header( - port_, - headers, - ); + return _wire__crate__api__http_api__set_default_header(port_, headers); } - late final _wire__crate__api__http_api__set_default_headerPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_starcitizen_doctor_wire__crate__api__http_api__set_default_header'); + late final _wire__crate__api__http_api__set_default_headerPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_starcitizen_doctor_wire__crate__api__http_api__set_default_header', + ); late final _wire__crate__api__http_api__set_default_header = - _wire__crate__api__http_api__set_default_headerPtr.asFunction< - void Function( - int, ffi.Pointer)>(); + _wire__crate__api__http_api__set_default_headerPtr + .asFunction< + void Function(int, ffi.Pointer) + >(); void wire__crate__api__win32_api__set_foreground_window( int port_, @@ -751,14 +841,22 @@ class RustLibWire implements BaseWire { ); } - late final _wire__crate__api__win32_api__set_foreground_windowPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_starcitizen_doctor_wire__crate__api__win32_api__set_foreground_window'); + late final _wire__crate__api__win32_api__set_foreground_windowPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ) + > + >( + 'frbgen_starcitizen_doctor_wire__crate__api__win32_api__set_foreground_window', + ); late final _wire__crate__api__win32_api__set_foreground_window = - _wire__crate__api__win32_api__set_foreground_windowPtr.asFunction< - void Function(int, ffi.Pointer)>(); + _wire__crate__api__win32_api__set_foreground_windowPtr + .asFunction< + void Function(int, ffi.Pointer) + >(); void wire__crate__api__rs_process__start( int port_, @@ -776,149 +874,152 @@ class RustLibWire implements BaseWire { ); } - late final _wire__crate__api__rs_process__startPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_starcitizen_doctor_wire__crate__api__rs_process__start'); + late final _wire__crate__api__rs_process__startPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >('frbgen_starcitizen_doctor_wire__crate__api__rs_process__start'); late final _wire__crate__api__rs_process__start = - _wire__crate__api__rs_process__startPtr.asFunction< - void Function( + _wire__crate__api__rs_process__startPtr + .asFunction< + void Function( int, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, + ) + >(); void wire__crate__api__rs_process__write( int port_, int rs_pid, ffi.Pointer data, ) { - return _wire__crate__api__rs_process__write( - port_, - rs_pid, - data, - ); + return _wire__crate__api__rs_process__write(port_, rs_pid, data); } - late final _wire__crate__api__rs_process__writePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Uint32, - ffi.Pointer)>>( - 'frbgen_starcitizen_doctor_wire__crate__api__rs_process__write'); + late final _wire__crate__api__rs_process__writePtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Uint32, + ffi.Pointer, + ) + > + >('frbgen_starcitizen_doctor_wire__crate__api__rs_process__write'); late final _wire__crate__api__rs_process__write = - _wire__crate__api__rs_process__writePtr.asFunction< - void Function( - int, int, ffi.Pointer)>(); + _wire__crate__api__rs_process__writePtr + .asFunction< + void Function(int, int, ffi.Pointer) + >(); - ffi.Pointer cst_new_box_autoadd_bool( - bool value, - ) { - return _cst_new_box_autoadd_bool( - value, - ); + ffi.Pointer cst_new_box_autoadd_bool(bool value) { + return _cst_new_box_autoadd_bool(value); } late final _cst_new_box_autoadd_boolPtr = _lookup Function(ffi.Bool)>>( - 'frbgen_starcitizen_doctor_cst_new_box_autoadd_bool'); + 'frbgen_starcitizen_doctor_cst_new_box_autoadd_bool', + ); late final _cst_new_box_autoadd_bool = _cst_new_box_autoadd_boolPtr .asFunction Function(bool)>(); ffi.Pointer - cst_new_box_autoadd_rsi_launcher_asar_data() { + cst_new_box_autoadd_rsi_launcher_asar_data() { return _cst_new_box_autoadd_rsi_launcher_asar_data(); } - late final _cst_new_box_autoadd_rsi_launcher_asar_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function()>>( - 'frbgen_starcitizen_doctor_cst_new_box_autoadd_rsi_launcher_asar_data'); + late final _cst_new_box_autoadd_rsi_launcher_asar_dataPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function() + > + >('frbgen_starcitizen_doctor_cst_new_box_autoadd_rsi_launcher_asar_data'); late final _cst_new_box_autoadd_rsi_launcher_asar_data = - _cst_new_box_autoadd_rsi_launcher_asar_dataPtr.asFunction< - ffi.Pointer Function()>(); + _cst_new_box_autoadd_rsi_launcher_asar_dataPtr + .asFunction< + ffi.Pointer Function() + >(); - ffi.Pointer cst_new_box_autoadd_u_64( - int value, - ) { - return _cst_new_box_autoadd_u_64( - value, - ); + ffi.Pointer cst_new_box_autoadd_u_64(int value) { + return _cst_new_box_autoadd_u_64(value); } late final _cst_new_box_autoadd_u_64Ptr = _lookup Function(ffi.Uint64)>>( - 'frbgen_starcitizen_doctor_cst_new_box_autoadd_u_64'); + 'frbgen_starcitizen_doctor_cst_new_box_autoadd_u_64', + ); late final _cst_new_box_autoadd_u_64 = _cst_new_box_autoadd_u_64Ptr .asFunction Function(int)>(); - ffi.Pointer cst_new_list_String( - int len, - ) { - return _cst_new_list_String( - len, - ); + ffi.Pointer cst_new_list_String(int len) { + return _cst_new_list_String(len); } - late final _cst_new_list_StringPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>('frbgen_starcitizen_doctor_cst_new_list_String'); + late final _cst_new_list_StringPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Int32) + > + >('frbgen_starcitizen_doctor_cst_new_list_String'); late final _cst_new_list_String = _cst_new_list_StringPtr .asFunction Function(int)>(); ffi.Pointer cst_new_list_prim_u_8_loose( int len, ) { - return _cst_new_list_prim_u_8_loose( - len, - ); + return _cst_new_list_prim_u_8_loose(len); } - late final _cst_new_list_prim_u_8_loosePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Int32)>>( - 'frbgen_starcitizen_doctor_cst_new_list_prim_u_8_loose'); + late final _cst_new_list_prim_u_8_loosePtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Int32) + > + >('frbgen_starcitizen_doctor_cst_new_list_prim_u_8_loose'); late final _cst_new_list_prim_u_8_loose = _cst_new_list_prim_u_8_loosePtr .asFunction Function(int)>(); ffi.Pointer cst_new_list_prim_u_8_strict( int len, ) { - return _cst_new_list_prim_u_8_strict( - len, - ); + return _cst_new_list_prim_u_8_strict(len); } - late final _cst_new_list_prim_u_8_strictPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Int32)>>( - 'frbgen_starcitizen_doctor_cst_new_list_prim_u_8_strict'); + late final _cst_new_list_prim_u_8_strictPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Int32) + > + >('frbgen_starcitizen_doctor_cst_new_list_prim_u_8_strict'); late final _cst_new_list_prim_u_8_strict = _cst_new_list_prim_u_8_strictPtr .asFunction Function(int)>(); ffi.Pointer - cst_new_list_record_string_string( - int len, - ) { - return _cst_new_list_record_string_string( - len, - ); + cst_new_list_record_string_string(int len) { + return _cst_new_list_record_string_string(len); } - late final _cst_new_list_record_string_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int32)>>( - 'frbgen_starcitizen_doctor_cst_new_list_record_string_string'); + late final _cst_new_list_record_string_stringPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Int32) + > + >('frbgen_starcitizen_doctor_cst_new_list_record_string_string'); late final _cst_new_list_record_string_string = - _cst_new_list_record_string_stringPtr.asFunction< - ffi.Pointer Function(int)>(); + _cst_new_list_record_string_stringPtr + .asFunction< + ffi.Pointer Function(int) + >(); int dummy_method_to_enforce_bundling() { return _dummy_method_to_enforce_bundling(); @@ -926,19 +1027,20 @@ class RustLibWire implements BaseWire { late final _dummy_method_to_enforce_bundlingPtr = _lookup>( - 'dummy_method_to_enforce_bundling'); + 'dummy_method_to_enforce_bundling', + ); late final _dummy_method_to_enforce_bundling = _dummy_method_to_enforce_bundlingPtr.asFunction(); } typedef DartPort = ffi.Int64; typedef DartDartPort = int; -typedef DartPostCObjectFnTypeFunction = ffi.Bool Function( - DartPort port_id, ffi.Pointer message); -typedef DartDartPostCObjectFnTypeFunction = bool Function( - DartDartPort port_id, ffi.Pointer message); -typedef DartPostCObjectFnType - = ffi.Pointer>; +typedef DartPostCObjectFnTypeFunction = + ffi.Bool Function(DartPort port_id, ffi.Pointer message); +typedef DartDartPostCObjectFnTypeFunction = + bool Function(DartDartPort port_id, ffi.Pointer message); +typedef DartPostCObjectFnType = + ffi.Pointer>; final class wire_cst_list_prim_u_8_strict extends ffi.Struct { external ffi.Pointer ptr; diff --git a/lib/common/rust/http_package.dart b/lib/common/rust/http_package.dart index e2b83ce..6ab82bc 100644 --- a/lib/common/rust/http_package.dart +++ b/lib/common/rust/http_package.dart @@ -1,20 +1,12 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.10.0. +// @generated by `flutter_rust_bridge`@ 2.11.1. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import import 'frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; -enum MyHttpVersion { - http09, - http10, - http11, - http2, - http3, - httpUnknown, - ; -} +enum MyHttpVersion { http09, http10, http11, http2, http3, httpUnknown } class RustHttpResponse { final int statusCode; diff --git a/lib/common/utils/multi_window_manager.freezed.dart b/lib/common/utils/multi_window_manager.freezed.dart index bc0d33d..3c0fdfc 100644 --- a/lib/common/utils/multi_window_manager.freezed.dart +++ b/lib/common/utils/multi_window_manager.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,75 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$MultiWindowAppState { - 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) - @pragma('vm:prefer-inline') - $MultiWindowAppStateCopyWith get copyWith => - _$MultiWindowAppStateCopyWithImpl( - this as MultiWindowAppState, _$identity); + 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) +@pragma('vm:prefer-inline') +$MultiWindowAppStateCopyWith get copyWith => _$MultiWindowAppStateCopyWithImpl(this as MultiWindowAppState, _$identity); /// Serializes this MultiWindowAppState to a JSON map. Map toJson(); - @override - 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 +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)'; +} + - @override - String toString() { - return 'MultiWindowAppState(backgroundColor: $backgroundColor, menuColor: $menuColor, micaColor: $micaColor, gameInstallPaths: $gameInstallPaths, languageCode: $languageCode, countryCode: $countryCode)'; - } } /// @nodoc -abstract mixin class $MultiWindowAppStateCopyWith<$Res> { - factory $MultiWindowAppStateCopyWith( - MultiWindowAppState value, $Res Function(MultiWindowAppState) _then) = - _$MultiWindowAppStateCopyWithImpl; - @useResult - $Res call( - {String backgroundColor, - String menuColor, - String micaColor, - List gameInstallPaths, - String? languageCode, - String? countryCode}); -} +abstract mixin class $MultiWindowAppStateCopyWith<$Res> { + factory $MultiWindowAppStateCopyWith(MultiWindowAppState value, $Res Function(MultiWindowAppState) _then) = _$MultiWindowAppStateCopyWithImpl; +@useResult +$Res call({ + String backgroundColor, String menuColor, String micaColor, List gameInstallPaths, String? languageCode, String? countryCode +}); + + + +} /// @nodoc class _$MultiWindowAppStateCopyWithImpl<$Res> implements $MultiWindowAppStateCopyWith<$Res> { @@ -92,150 +63,213 @@ class _$MultiWindowAppStateCopyWithImpl<$Res> final MultiWindowAppState _self; final $Res Function(MultiWindowAppState) _then; - /// Create a copy of MultiWindowAppState - /// 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, - Object? gameInstallPaths = null, - Object? languageCode = freezed, - Object? countryCode = freezed, - }) { - return _then(_self.copyWith( - 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?, - )); - } +/// Create a copy of MultiWindowAppState +/// 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,Object? gameInstallPaths = null,Object? languageCode = freezed,Object? countryCode = freezed,}) { + return _then(_self.copyWith( +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?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [MultiWindowAppState]. +extension MultiWindowAppStatePatterns on MultiWindowAppState { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _MultiWindowAppState value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _MultiWindowAppState() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _MultiWindowAppState value) $default,){ +final _that = this; +switch (_that) { +case _MultiWindowAppState(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _MultiWindowAppState value)? $default,){ +final _that = this; +switch (_that) { +case _MultiWindowAppState() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String backgroundColor, String menuColor, String micaColor, List gameInstallPaths, String? languageCode, String? countryCode)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _MultiWindowAppState() when $default != null: +return $default(_that.backgroundColor,_that.menuColor,_that.micaColor,_that.gameInstallPaths,_that.languageCode,_that.countryCode);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String backgroundColor, String menuColor, String micaColor, List gameInstallPaths, String? languageCode, String? countryCode) $default,) {final _that = this; +switch (_that) { +case _MultiWindowAppState(): +return $default(_that.backgroundColor,_that.menuColor,_that.micaColor,_that.gameInstallPaths,_that.languageCode,_that.countryCode);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String backgroundColor, String menuColor, String micaColor, List gameInstallPaths, String? languageCode, String? countryCode)? $default,) {final _that = this; +switch (_that) { +case _MultiWindowAppState() when $default != null: +return $default(_that.backgroundColor,_that.menuColor,_that.micaColor,_that.gameInstallPaths,_that.languageCode,_that.countryCode);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _MultiWindowAppState implements MultiWindowAppState { - const _MultiWindowAppState( - {required this.backgroundColor, - required this.menuColor, - required this.micaColor, - required final List gameInstallPaths, - this.languageCode, - this.countryCode}) - : _gameInstallPaths = gameInstallPaths; - factory _MultiWindowAppState.fromJson(Map json) => - _$MultiWindowAppStateFromJson(json); + const _MultiWindowAppState({required this.backgroundColor, required this.menuColor, required this.micaColor, required final List gameInstallPaths, this.languageCode, this.countryCode}): _gameInstallPaths = gameInstallPaths; + factory _MultiWindowAppState.fromJson(Map json) => _$MultiWindowAppStateFromJson(json); - @override - final String backgroundColor; - @override - final String menuColor; - @override - final String micaColor; - final List _gameInstallPaths; - @override - List get gameInstallPaths { - if (_gameInstallPaths is EqualUnmodifiableListView) - return _gameInstallPaths; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_gameInstallPaths); - } +@override final String backgroundColor; +@override final String menuColor; +@override final String micaColor; + final List _gameInstallPaths; +@override List get gameInstallPaths { + if (_gameInstallPaths is EqualUnmodifiableListView) return _gameInstallPaths; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_gameInstallPaths); +} - @override - final String? languageCode; - @override - final String? countryCode; +@override final String? languageCode; +@override final String? countryCode; - /// Create a copy of MultiWindowAppState - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$MultiWindowAppStateCopyWith<_MultiWindowAppState> get copyWith => - __$MultiWindowAppStateCopyWithImpl<_MultiWindowAppState>( - this, _$identity); +/// Create a copy of MultiWindowAppState +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$MultiWindowAppStateCopyWith<_MultiWindowAppState> get copyWith => __$MultiWindowAppStateCopyWithImpl<_MultiWindowAppState>(this, _$identity); - @override - Map toJson() { - return _$MultiWindowAppStateToJson( - this, - ); - } +@override +Map toJson() { + return _$MultiWindowAppStateToJson(this, ); +} - @override - 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)); - } +@override +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)'; +} - @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 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}); -} +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 +}); + + + +} /// @nodoc class __$MultiWindowAppStateCopyWithImpl<$Res> implements _$MultiWindowAppStateCopyWith<$Res> { @@ -244,45 +278,21 @@ class __$MultiWindowAppStateCopyWithImpl<$Res> 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 - @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?, - )); - } +/// Create a copy of MultiWindowAppState +/// with the given fields replaced by the non-null parameter values. +@override @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 a703c27..829da24 100644 --- a/lib/common/utils/multi_window_manager.g.dart +++ b/lib/common/utils/multi_window_manager.g.dart @@ -19,12 +19,12 @@ _MultiWindowAppState _$MultiWindowAppStateFromJson(Map json) => ); Map _$MultiWindowAppStateToJson( - _MultiWindowAppState instance) => - { - 'backgroundColor': instance.backgroundColor, - 'menuColor': instance.menuColor, - 'micaColor': instance.micaColor, - 'gameInstallPaths': instance.gameInstallPaths, - 'languageCode': instance.languageCode, - 'countryCode': instance.countryCode, - }; + _MultiWindowAppState instance, +) => { + 'backgroundColor': instance.backgroundColor, + 'menuColor': instance.menuColor, + 'micaColor': instance.micaColor, + 'gameInstallPaths': instance.gameInstallPaths, + 'languageCode': instance.languageCode, + 'countryCode': instance.countryCode, +}; diff --git a/lib/data/nav_api_data.freezed.dart b/lib/data/nav_api_data.freezed.dart index 06b5224..3625e6f 100644 --- a/lib/data/nav_api_data.freezed.dart +++ b/lib/data/nav_api_data.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -15,107 +14,47 @@ T _$identity(T value) => value; /// @nodoc mixin _$NavApiDocsItemData { - @JsonKey(name: 'id') - String get id; - @JsonKey(name: 'name') - String get name; - @JsonKey(name: 'slug') - String get slug; - @JsonKey(name: 'abstract') - String get abstract_; - @JsonKey(name: 'description') - String get description; - @JsonKey(name: 'image') - NavApiDocsItemImageData get image; - @JsonKey(name: 'link') - String get link; - @JsonKey(name: 'is_sponsored') - bool get isSponsored; - @JsonKey(name: 'tags') - List get tags; - @JsonKey(name: 'updatedAt') - String get updatedAt; - @JsonKey(name: 'createdAt') - 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 => - _$NavApiDocsItemDataCopyWithImpl( - this as NavApiDocsItemData, _$identity); +@JsonKey(name: 'id') String get id;@JsonKey(name: 'name') String get name;@JsonKey(name: 'slug') String get slug;@JsonKey(name: 'abstract') String get abstract_;@JsonKey(name: 'description') String get description;@JsonKey(name: 'image') NavApiDocsItemImageData get image;@JsonKey(name: 'link') String get link;@JsonKey(name: 'is_sponsored') bool get isSponsored;@JsonKey(name: 'tags') List get tags;@JsonKey(name: 'updatedAt') String get updatedAt;@JsonKey(name: 'createdAt') 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 => _$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 +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)'; +} + - @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 mixin class $NavApiDocsItemDataCopyWith<$Res> { - factory $NavApiDocsItemDataCopyWith( - NavApiDocsItemData value, $Res Function(NavApiDocsItemData) _then) = - _$NavApiDocsItemDataCopyWithImpl; - @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}); +abstract mixin class $NavApiDocsItemDataCopyWith<$Res> { + factory $NavApiDocsItemDataCopyWith(NavApiDocsItemData value, $Res Function(NavApiDocsItemData) _then) = _$NavApiDocsItemDataCopyWithImpl; +@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 +}); + + +$NavApiDocsItemImageDataCopyWith<$Res> get image; - $NavApiDocsItemImageDataCopyWith<$Res> get image; } - /// @nodoc class _$NavApiDocsItemDataCopyWithImpl<$Res> implements $NavApiDocsItemDataCopyWith<$Res> { @@ -124,228 +63,232 @@ class _$NavApiDocsItemDataCopyWithImpl<$Res> final NavApiDocsItemData _self; final $Res Function(NavApiDocsItemData) _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(_self.copyWith( - 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, - )); - } +/// 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(_self.copyWith( +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, + )); +} +/// 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)); + }); +} +} + + +/// Adds pattern-matching-related methods to [NavApiDocsItemData]. +extension NavApiDocsItemDataPatterns on NavApiDocsItemData { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _NavApiDocsItemData value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _NavApiDocsItemData() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _NavApiDocsItemData value) $default,){ +final _that = this; +switch (_that) { +case _NavApiDocsItemData(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _NavApiDocsItemData value)? $default,){ +final _that = this; +switch (_that) { +case _NavApiDocsItemData() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function(@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)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _NavApiDocsItemData() when $default != null: +return $default(_that.id,_that.name,_that.slug,_that.abstract_,_that.description,_that.image,_that.link,_that.isSponsored,_that.tags,_that.updatedAt,_that.createdAt);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function(@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) $default,) {final _that = this; +switch (_that) { +case _NavApiDocsItemData(): +return $default(_that.id,_that.name,_that.slug,_that.abstract_,_that.description,_that.image,_that.link,_that.isSponsored,_that.tags,_that.updatedAt,_that.createdAt);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function(@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)? $default,) {final _that = this; +switch (_that) { +case _NavApiDocsItemData() when $default != null: +return $default(_that.id,_that.name,_that.slug,_that.abstract_,_that.description,_that.image,_that.link,_that.isSponsored,_that.tags,_that.updatedAt,_that.createdAt);case _: + return null; + +} +} - /// 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 @JsonSerializable() + class _NavApiDocsItemData extends NavApiDocsItemData { - const _NavApiDocsItemData( - {@JsonKey(name: 'id') this.id = '', - @JsonKey(name: 'name') this.name = '', - @JsonKey(name: 'slug') this.slug = '', - @JsonKey(name: 'abstract') this.abstract_ = '', - @JsonKey(name: 'description') this.description = '', - @JsonKey(name: 'image') this.image = const NavApiDocsItemImageData(), - @JsonKey(name: 'link') this.link = '', - @JsonKey(name: 'is_sponsored') this.isSponsored = false, - @JsonKey(name: 'tags') final List tags = - const [], - @JsonKey(name: 'updatedAt') this.updatedAt = '', - @JsonKey(name: 'createdAt') this.createdAt = ''}) - : _tags = tags, - super._(); - factory _NavApiDocsItemData.fromJson(Map json) => - _$NavApiDocsItemDataFromJson(json); + const _NavApiDocsItemData({@JsonKey(name: 'id') this.id = '', @JsonKey(name: 'name') this.name = '', @JsonKey(name: 'slug') this.slug = '', @JsonKey(name: 'abstract') this.abstract_ = '', @JsonKey(name: 'description') this.description = '', @JsonKey(name: 'image') this.image = const NavApiDocsItemImageData(), @JsonKey(name: 'link') this.link = '', @JsonKey(name: 'is_sponsored') this.isSponsored = false, @JsonKey(name: 'tags') final List tags = const [], @JsonKey(name: 'updatedAt') this.updatedAt = '', @JsonKey(name: 'createdAt') this.createdAt = ''}): _tags = tags,super._(); + factory _NavApiDocsItemData.fromJson(Map json) => _$NavApiDocsItemDataFromJson(json); - @override - @JsonKey(name: 'id') - final String id; - @override - @JsonKey(name: 'name') - final String name; - @override - @JsonKey(name: 'slug') - final String slug; - @override - @JsonKey(name: 'abstract') - final String abstract_; - @override - @JsonKey(name: 'description') - final String description; - @override - @JsonKey(name: 'image') - final NavApiDocsItemImageData image; - @override - @JsonKey(name: 'link') - final String link; - @override - @JsonKey(name: 'is_sponsored') - final bool isSponsored; - final List _tags; - @override - @JsonKey(name: 'tags') - List get tags { - if (_tags is EqualUnmodifiableListView) return _tags; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_tags); - } +@override@JsonKey(name: 'id') final String id; +@override@JsonKey(name: 'name') final String name; +@override@JsonKey(name: 'slug') final String slug; +@override@JsonKey(name: 'abstract') final String abstract_; +@override@JsonKey(name: 'description') final String description; +@override@JsonKey(name: 'image') final NavApiDocsItemImageData image; +@override@JsonKey(name: 'link') final String link; +@override@JsonKey(name: 'is_sponsored') final bool isSponsored; + final List _tags; +@override@JsonKey(name: 'tags') List get tags { + if (_tags is EqualUnmodifiableListView) return _tags; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_tags); +} - @override - @JsonKey(name: 'updatedAt') - final String updatedAt; - @override - @JsonKey(name: 'createdAt') - final String createdAt; +@override@JsonKey(name: 'updatedAt') final String updatedAt; +@override@JsonKey(name: 'createdAt') final String createdAt; - /// Create a copy of NavApiDocsItemData - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$NavApiDocsItemDataCopyWith<_NavApiDocsItemData> get copyWith => - __$NavApiDocsItemDataCopyWithImpl<_NavApiDocsItemData>(this, _$identity); +/// Create a copy of NavApiDocsItemData +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$NavApiDocsItemDataCopyWith<_NavApiDocsItemData> get copyWith => __$NavApiDocsItemDataCopyWithImpl<_NavApiDocsItemData>(this, _$identity); - @override - Map toJson() { - return _$NavApiDocsItemDataToJson( - this, - ); - } +@override +Map toJson() { + return _$NavApiDocsItemDataToJson(this, ); +} - @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)); - } +@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)'; +} - @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 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}); +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 $NavApiDocsItemImageDataCopyWith<$Res> get image; - @override - $NavApiDocsItemImageDataCopyWith<$Res> get image; } - /// @nodoc class __$NavApiDocsItemDataCopyWithImpl<$Res> implements _$NavApiDocsItemDataCopyWith<$Res> { @@ -354,218 +297,81 @@ class __$NavApiDocsItemDataCopyWithImpl<$Res> 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 - @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, - )); - } - - /// 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)); - }); - } +/// Create a copy of NavApiDocsItemData +/// with the given fields replaced by the non-null parameter values. +@override @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, + )); } +/// 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; - @JsonKey(name: 'createdBy') - NavApiDocsItemImageCreatedByData get createdBy; - @JsonKey(name: 'title') - String get title; - @JsonKey(name: 'original') - bool get original; - @JsonKey(name: 'credit') - String get credit; - @JsonKey(name: 'source') - String get source; - @JsonKey(name: 'license') - String get license; - @JsonKey(name: 'caption') - dynamic get caption; - @JsonKey(name: 'updatedAt') - String get updatedAt; - @JsonKey(name: 'createdAt') - String get createdAt; - @JsonKey(name: 'url') - String get url; - @JsonKey(name: 'filename') - String get filename; - @JsonKey(name: 'mimeType') - String get mimeType; - @JsonKey(name: 'filesize') - int get filesize; - @JsonKey(name: 'width') - int get width; - @JsonKey(name: 'height') - int get height; - @JsonKey(name: 'sizes') - 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 => - _$NavApiDocsItemImageDataCopyWithImpl( - this as NavApiDocsItemImageData, _$identity); +@JsonKey(name: 'id') String get id;@JsonKey(name: 'createdBy') NavApiDocsItemImageCreatedByData get createdBy;@JsonKey(name: 'title') String get title;@JsonKey(name: 'original') bool get original;@JsonKey(name: 'credit') String get credit;@JsonKey(name: 'source') String get source;@JsonKey(name: 'license') String get license;@JsonKey(name: 'caption') dynamic get caption;@JsonKey(name: 'updatedAt') String get updatedAt;@JsonKey(name: 'createdAt') String get createdAt;@JsonKey(name: 'url') String get url;@JsonKey(name: 'filename') String get filename;@JsonKey(name: 'mimeType') String get mimeType;@JsonKey(name: 'filesize') int get filesize;@JsonKey(name: 'width') int get width;@JsonKey(name: 'height') int get height;@JsonKey(name: 'sizes') 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 => _$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 +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)'; +} + - @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 mixin class $NavApiDocsItemImageDataCopyWith<$Res> { - factory $NavApiDocsItemImageDataCopyWith(NavApiDocsItemImageData value, - $Res Function(NavApiDocsItemImageData) _then) = - _$NavApiDocsItemImageDataCopyWithImpl; - @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}); +abstract mixin class $NavApiDocsItemImageDataCopyWith<$Res> { + factory $NavApiDocsItemImageDataCopyWith(NavApiDocsItemImageData value, $Res Function(NavApiDocsItemImageData) _then) = _$NavApiDocsItemImageDataCopyWithImpl; +@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 +}); + + +$NavApiDocsItemImageCreatedByDataCopyWith<$Res> get createdBy;$NavApiDocsItemImageSizesDataCopyWith<$Res> get sizes; - $NavApiDocsItemImageCreatedByDataCopyWith<$Res> get createdBy; - $NavApiDocsItemImageSizesDataCopyWith<$Res> get sizes; } - /// @nodoc class _$NavApiDocsItemImageDataCopyWithImpl<$Res> implements $NavApiDocsItemImageDataCopyWith<$Res> { @@ -574,310 +380,247 @@ class _$NavApiDocsItemImageDataCopyWithImpl<$Res> final NavApiDocsItemImageData _self; final $Res Function(NavApiDocsItemImageData) _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(_self.copyWith( - 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, - )); - } +/// 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(_self.copyWith( +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, + )); +} +/// 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)); + }); +} +} - /// 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)); - }); - } +/// Adds pattern-matching-related methods to [NavApiDocsItemImageData]. +extension NavApiDocsItemImageDataPatterns on NavApiDocsItemImageData { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _NavApiDocsItemImageData value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _NavApiDocsItemImageData() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _NavApiDocsItemImageData value) $default,){ +final _that = this; +switch (_that) { +case _NavApiDocsItemImageData(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _NavApiDocsItemImageData value)? $default,){ +final _that = this; +switch (_that) { +case _NavApiDocsItemImageData() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function(@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)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _NavApiDocsItemImageData() when $default != null: +return $default(_that.id,_that.createdBy,_that.title,_that.original,_that.credit,_that.source,_that.license,_that.caption,_that.updatedAt,_that.createdAt,_that.url,_that.filename,_that.mimeType,_that.filesize,_that.width,_that.height,_that.sizes);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function(@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) $default,) {final _that = this; +switch (_that) { +case _NavApiDocsItemImageData(): +return $default(_that.id,_that.createdBy,_that.title,_that.original,_that.credit,_that.source,_that.license,_that.caption,_that.updatedAt,_that.createdAt,_that.url,_that.filename,_that.mimeType,_that.filesize,_that.width,_that.height,_that.sizes);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function(@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)? $default,) {final _that = this; +switch (_that) { +case _NavApiDocsItemImageData() when $default != null: +return $default(_that.id,_that.createdBy,_that.title,_that.original,_that.credit,_that.source,_that.license,_that.caption,_that.updatedAt,_that.createdAt,_that.url,_that.filename,_that.mimeType,_that.filesize,_that.width,_that.height,_that.sizes);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _NavApiDocsItemImageData extends NavApiDocsItemImageData { - const _NavApiDocsItemImageData( - {@JsonKey(name: 'id') this.id = '', - @JsonKey(name: 'createdBy') - this.createdBy = const NavApiDocsItemImageCreatedByData(), - @JsonKey(name: 'title') this.title = '', - @JsonKey(name: 'original') this.original = false, - @JsonKey(name: 'credit') this.credit = '', - @JsonKey(name: 'source') this.source = '', - @JsonKey(name: 'license') this.license = '', - @JsonKey(name: 'caption') this.caption, - @JsonKey(name: 'updatedAt') this.updatedAt = '', - @JsonKey(name: 'createdAt') this.createdAt = '', - @JsonKey(name: 'url') this.url = '', - @JsonKey(name: 'filename') this.filename = '', - @JsonKey(name: 'mimeType') this.mimeType = '', - @JsonKey(name: 'filesize') this.filesize = 0, - @JsonKey(name: 'width') this.width = 0, - @JsonKey(name: 'height') this.height = 0, - @JsonKey(name: 'sizes') - this.sizes = const NavApiDocsItemImageSizesData()}) - : super._(); - factory _NavApiDocsItemImageData.fromJson(Map json) => - _$NavApiDocsItemImageDataFromJson(json); + const _NavApiDocsItemImageData({@JsonKey(name: 'id') this.id = '', @JsonKey(name: 'createdBy') this.createdBy = const NavApiDocsItemImageCreatedByData(), @JsonKey(name: 'title') this.title = '', @JsonKey(name: 'original') this.original = false, @JsonKey(name: 'credit') this.credit = '', @JsonKey(name: 'source') this.source = '', @JsonKey(name: 'license') this.license = '', @JsonKey(name: 'caption') this.caption, @JsonKey(name: 'updatedAt') this.updatedAt = '', @JsonKey(name: 'createdAt') this.createdAt = '', @JsonKey(name: 'url') this.url = '', @JsonKey(name: 'filename') this.filename = '', @JsonKey(name: 'mimeType') this.mimeType = '', @JsonKey(name: 'filesize') this.filesize = 0, @JsonKey(name: 'width') this.width = 0, @JsonKey(name: 'height') this.height = 0, @JsonKey(name: 'sizes') this.sizes = const NavApiDocsItemImageSizesData()}): super._(); + factory _NavApiDocsItemImageData.fromJson(Map json) => _$NavApiDocsItemImageDataFromJson(json); - @override - @JsonKey(name: 'id') - final String id; - @override - @JsonKey(name: 'createdBy') - final NavApiDocsItemImageCreatedByData createdBy; - @override - @JsonKey(name: 'title') - final String title; - @override - @JsonKey(name: 'original') - final bool original; - @override - @JsonKey(name: 'credit') - final String credit; - @override - @JsonKey(name: 'source') - final String source; - @override - @JsonKey(name: 'license') - final String license; - @override - @JsonKey(name: 'caption') - final dynamic caption; - @override - @JsonKey(name: 'updatedAt') - final String updatedAt; - @override - @JsonKey(name: 'createdAt') - final String createdAt; - @override - @JsonKey(name: 'url') - final String url; - @override - @JsonKey(name: 'filename') - final String filename; - @override - @JsonKey(name: 'mimeType') - final String mimeType; - @override - @JsonKey(name: 'filesize') - final int filesize; - @override - @JsonKey(name: 'width') - final int width; - @override - @JsonKey(name: 'height') - final int height; - @override - @JsonKey(name: 'sizes') - final NavApiDocsItemImageSizesData sizes; +@override@JsonKey(name: 'id') final String id; +@override@JsonKey(name: 'createdBy') final NavApiDocsItemImageCreatedByData createdBy; +@override@JsonKey(name: 'title') final String title; +@override@JsonKey(name: 'original') final bool original; +@override@JsonKey(name: 'credit') final String credit; +@override@JsonKey(name: 'source') final String source; +@override@JsonKey(name: 'license') final String license; +@override@JsonKey(name: 'caption') final dynamic caption; +@override@JsonKey(name: 'updatedAt') final String updatedAt; +@override@JsonKey(name: 'createdAt') final String createdAt; +@override@JsonKey(name: 'url') final String url; +@override@JsonKey(name: 'filename') final String filename; +@override@JsonKey(name: 'mimeType') final String mimeType; +@override@JsonKey(name: 'filesize') final int filesize; +@override@JsonKey(name: 'width') final int width; +@override@JsonKey(name: 'height') final int height; +@override@JsonKey(name: 'sizes') final NavApiDocsItemImageSizesData sizes; - /// Create a copy of NavApiDocsItemImageData - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$NavApiDocsItemImageDataCopyWith<_NavApiDocsItemImageData> get copyWith => - __$NavApiDocsItemImageDataCopyWithImpl<_NavApiDocsItemImageData>( - this, _$identity); +/// Create a copy of NavApiDocsItemImageData +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$NavApiDocsItemImageDataCopyWith<_NavApiDocsItemImageData> get copyWith => __$NavApiDocsItemImageDataCopyWithImpl<_NavApiDocsItemImageData>(this, _$identity); - @override - Map toJson() { - return _$NavApiDocsItemImageDataToJson( - this, - ); - } +@override +Map toJson() { + return _$NavApiDocsItemImageDataToJson(this, ); +} - @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)); - } +@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)'; +} - @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 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}); +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 $NavApiDocsItemImageCreatedByDataCopyWith<$Res> get createdBy;@override $NavApiDocsItemImageSizesDataCopyWith<$Res> get sizes; - @override - $NavApiDocsItemImageCreatedByDataCopyWith<$Res> get createdBy; - @override - $NavApiDocsItemImageSizesDataCopyWith<$Res> get sizes; } - /// @nodoc class __$NavApiDocsItemImageDataCopyWithImpl<$Res> implements _$NavApiDocsItemImageDataCopyWith<$Res> { @@ -886,232 +629,96 @@ class __$NavApiDocsItemImageDataCopyWithImpl<$Res> 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 - @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, - )); - } - - /// 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)); - }); - } +/// Create a copy of NavApiDocsItemImageData +/// with the given fields replaced by the non-null parameter values. +@override @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, + )); } +/// 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; - @JsonKey(name: 'sub') - String get sub; - @JsonKey(name: 'external_provider') - String get externalProvider; - @JsonKey(name: 'username') - String get username; - @JsonKey(name: 'name') - String get name; - @JsonKey(name: 'roles') - List get roles; - @JsonKey(name: 'avatar_url') - String get avatarUrl; - @JsonKey(name: 'updatedAt') - String get updatedAt; - @JsonKey(name: 'createdAt') - String get createdAt; - @JsonKey(name: 'email') - String get email; - @JsonKey(name: 'loginAttempts') - int get loginAttempts; - @JsonKey(name: 'avatar') - String get avatar; - /// Create a copy of NavApiDocsItemImageCreatedByData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $NavApiDocsItemImageCreatedByDataCopyWith - get copyWith => _$NavApiDocsItemImageCreatedByDataCopyWithImpl< - NavApiDocsItemImageCreatedByData>( - this as NavApiDocsItemImageCreatedByData, _$identity); +@JsonKey(name: 'id') String get id;@JsonKey(name: 'sub') String get sub;@JsonKey(name: 'external_provider') String get externalProvider;@JsonKey(name: 'username') String get username;@JsonKey(name: 'name') String get name;@JsonKey(name: 'roles') List get roles;@JsonKey(name: 'avatar_url') String get avatarUrl;@JsonKey(name: 'updatedAt') String get updatedAt;@JsonKey(name: 'createdAt') String get createdAt;@JsonKey(name: 'email') String get email;@JsonKey(name: 'loginAttempts') int get loginAttempts;@JsonKey(name: 'avatar') String get avatar; +/// Create a copy of NavApiDocsItemImageCreatedByData +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$NavApiDocsItemImageCreatedByDataCopyWith get copyWith => _$NavApiDocsItemImageCreatedByDataCopyWithImpl(this as NavApiDocsItemImageCreatedByData, _$identity); /// Serializes this NavApiDocsItemImageCreatedByData to a JSON map. Map toJson(); - @override - 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 +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)'; +} + - @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 mixin class $NavApiDocsItemImageCreatedByDataCopyWith<$Res> { - factory $NavApiDocsItemImageCreatedByDataCopyWith( - NavApiDocsItemImageCreatedByData value, - $Res Function(NavApiDocsItemImageCreatedByData) _then) = - _$NavApiDocsItemImageCreatedByDataCopyWithImpl; - @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}); -} +abstract mixin class $NavApiDocsItemImageCreatedByDataCopyWith<$Res> { + factory $NavApiDocsItemImageCreatedByDataCopyWith(NavApiDocsItemImageCreatedByData value, $Res Function(NavApiDocsItemImageCreatedByData) _then) = _$NavApiDocsItemImageCreatedByDataCopyWithImpl; +@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> implements $NavApiDocsItemImageCreatedByDataCopyWith<$Res> { @@ -1120,231 +727,225 @@ class _$NavApiDocsItemImageCreatedByDataCopyWithImpl<$Res> final NavApiDocsItemImageCreatedByData _self; final $Res Function(NavApiDocsItemImageCreatedByData) _then; - /// Create a copy of NavApiDocsItemImageCreatedByData - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @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(_self.copyWith( - 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, - )); - } +/// Create a copy of NavApiDocsItemImageCreatedByData +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @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(_self.copyWith( +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, + )); +} + +} + + +/// Adds pattern-matching-related methods to [NavApiDocsItemImageCreatedByData]. +extension NavApiDocsItemImageCreatedByDataPatterns on NavApiDocsItemImageCreatedByData { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _NavApiDocsItemImageCreatedByData value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _NavApiDocsItemImageCreatedByData() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _NavApiDocsItemImageCreatedByData value) $default,){ +final _that = this; +switch (_that) { +case _NavApiDocsItemImageCreatedByData(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _NavApiDocsItemImageCreatedByData value)? $default,){ +final _that = this; +switch (_that) { +case _NavApiDocsItemImageCreatedByData() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function(@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)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _NavApiDocsItemImageCreatedByData() when $default != null: +return $default(_that.id,_that.sub,_that.externalProvider,_that.username,_that.name,_that.roles,_that.avatarUrl,_that.updatedAt,_that.createdAt,_that.email,_that.loginAttempts,_that.avatar);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function(@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) $default,) {final _that = this; +switch (_that) { +case _NavApiDocsItemImageCreatedByData(): +return $default(_that.id,_that.sub,_that.externalProvider,_that.username,_that.name,_that.roles,_that.avatarUrl,_that.updatedAt,_that.createdAt,_that.email,_that.loginAttempts,_that.avatar);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function(@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)? $default,) {final _that = this; +switch (_that) { +case _NavApiDocsItemImageCreatedByData() when $default != null: +return $default(_that.id,_that.sub,_that.externalProvider,_that.username,_that.name,_that.roles,_that.avatarUrl,_that.updatedAt,_that.createdAt,_that.email,_that.loginAttempts,_that.avatar);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() -class _NavApiDocsItemImageCreatedByData - extends NavApiDocsItemImageCreatedByData { - const _NavApiDocsItemImageCreatedByData( - {@JsonKey(name: 'id') this.id = '', - @JsonKey(name: 'sub') this.sub = '', - @JsonKey(name: 'external_provider') this.externalProvider = '', - @JsonKey(name: 'username') this.username = '', - @JsonKey(name: 'name') this.name = '', - @JsonKey(name: 'roles') final List roles = const [], - @JsonKey(name: 'avatar_url') this.avatarUrl = '', - @JsonKey(name: 'updatedAt') this.updatedAt = '', - @JsonKey(name: 'createdAt') this.createdAt = '', - @JsonKey(name: 'email') this.email = '', - @JsonKey(name: 'loginAttempts') this.loginAttempts = 0, - @JsonKey(name: 'avatar') this.avatar = ''}) - : _roles = roles, - super._(); - factory _NavApiDocsItemImageCreatedByData.fromJson( - Map json) => - _$NavApiDocsItemImageCreatedByDataFromJson(json); - @override - @JsonKey(name: 'id') - final String id; - @override - @JsonKey(name: 'sub') - final String sub; - @override - @JsonKey(name: 'external_provider') - final String externalProvider; - @override - @JsonKey(name: 'username') - final String username; - @override - @JsonKey(name: 'name') - final String name; - final List _roles; - @override - @JsonKey(name: 'roles') - List get roles { - if (_roles is EqualUnmodifiableListView) return _roles; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_roles); - } +class _NavApiDocsItemImageCreatedByData extends NavApiDocsItemImageCreatedByData { + const _NavApiDocsItemImageCreatedByData({@JsonKey(name: 'id') this.id = '', @JsonKey(name: 'sub') this.sub = '', @JsonKey(name: 'external_provider') this.externalProvider = '', @JsonKey(name: 'username') this.username = '', @JsonKey(name: 'name') this.name = '', @JsonKey(name: 'roles') final List roles = const [], @JsonKey(name: 'avatar_url') this.avatarUrl = '', @JsonKey(name: 'updatedAt') this.updatedAt = '', @JsonKey(name: 'createdAt') this.createdAt = '', @JsonKey(name: 'email') this.email = '', @JsonKey(name: 'loginAttempts') this.loginAttempts = 0, @JsonKey(name: 'avatar') this.avatar = ''}): _roles = roles,super._(); + factory _NavApiDocsItemImageCreatedByData.fromJson(Map json) => _$NavApiDocsItemImageCreatedByDataFromJson(json); - @override - @JsonKey(name: 'avatar_url') - final String avatarUrl; - @override - @JsonKey(name: 'updatedAt') - final String updatedAt; - @override - @JsonKey(name: 'createdAt') - final String createdAt; - @override - @JsonKey(name: 'email') - final String email; - @override - @JsonKey(name: 'loginAttempts') - final int loginAttempts; - @override - @JsonKey(name: 'avatar') - final String avatar; +@override@JsonKey(name: 'id') final String id; +@override@JsonKey(name: 'sub') final String sub; +@override@JsonKey(name: 'external_provider') final String externalProvider; +@override@JsonKey(name: 'username') final String username; +@override@JsonKey(name: 'name') final String name; + final List _roles; +@override@JsonKey(name: 'roles') List get roles { + if (_roles is EqualUnmodifiableListView) return _roles; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_roles); +} - /// Create a copy of NavApiDocsItemImageCreatedByData - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$NavApiDocsItemImageCreatedByDataCopyWith<_NavApiDocsItemImageCreatedByData> - get copyWith => __$NavApiDocsItemImageCreatedByDataCopyWithImpl< - _NavApiDocsItemImageCreatedByData>(this, _$identity); +@override@JsonKey(name: 'avatar_url') final String avatarUrl; +@override@JsonKey(name: 'updatedAt') final String updatedAt; +@override@JsonKey(name: 'createdAt') final String createdAt; +@override@JsonKey(name: 'email') final String email; +@override@JsonKey(name: 'loginAttempts') final int loginAttempts; +@override@JsonKey(name: 'avatar') final String avatar; - @override - Map toJson() { - return _$NavApiDocsItemImageCreatedByDataToJson( - this, - ); - } +/// Create a copy of NavApiDocsItemImageCreatedByData +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$NavApiDocsItemImageCreatedByDataCopyWith<_NavApiDocsItemImageCreatedByData> get copyWith => __$NavApiDocsItemImageCreatedByDataCopyWithImpl<_NavApiDocsItemImageCreatedByData>(this, _$identity); - @override - 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)); - } +@override +Map toJson() { + return _$NavApiDocsItemImageCreatedByDataToJson(this, ); +} + +@override +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)'; +} - @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 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}); -} +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 +}); + + + +} /// @nodoc class __$NavApiDocsItemImageCreatedByDataCopyWithImpl<$Res> implements _$NavApiDocsItemImageCreatedByDataCopyWith<$Res> { @@ -1353,148 +954,73 @@ class __$NavApiDocsItemImageCreatedByDataCopyWithImpl<$Res> 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 - @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, - )); - } +/// Create a copy of NavApiDocsItemImageCreatedByData +/// with the given fields replaced by the non-null parameter values. +@override @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; - @JsonKey(name: 'width') - int get width; - @JsonKey(name: 'height') - int get height; - @JsonKey(name: 'mimeType') - String get mimeType; - @JsonKey(name: 'filesize') - int get filesize; - @JsonKey(name: 'filename') - 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 => _$NavApiDocsItemImageSizesThumbnailDataCopyWithImpl< - NavApiDocsItemImageSizesThumbnailData>( - this as NavApiDocsItemImageSizesThumbnailData, _$identity); +@JsonKey(name: 'url') String get url;@JsonKey(name: 'width') int get width;@JsonKey(name: 'height') int get height;@JsonKey(name: 'mimeType') String get mimeType;@JsonKey(name: 'filesize') int get filesize;@JsonKey(name: 'filename') 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 get copyWith => _$NavApiDocsItemImageSizesThumbnailDataCopyWithImpl(this as NavApiDocsItemImageSizesThumbnailData, _$identity); /// Serializes this NavApiDocsItemImageSizesThumbnailData to a JSON map. Map toJson(); - @override - 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 +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)'; +} + - @override - String toString() { - return 'NavApiDocsItemImageSizesThumbnailData(url: $url, width: $width, height: $height, mimeType: $mimeType, filesize: $filesize, filename: $filename)'; - } } /// @nodoc -abstract mixin class $NavApiDocsItemImageSizesThumbnailDataCopyWith<$Res> { - factory $NavApiDocsItemImageSizesThumbnailDataCopyWith( - NavApiDocsItemImageSizesThumbnailData value, - $Res Function(NavApiDocsItemImageSizesThumbnailData) _then) = - _$NavApiDocsItemImageSizesThumbnailDataCopyWithImpl; - @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}); -} +abstract mixin class $NavApiDocsItemImageSizesThumbnailDataCopyWith<$Res> { + factory $NavApiDocsItemImageSizesThumbnailDataCopyWith(NavApiDocsItemImageSizesThumbnailData value, $Res Function(NavApiDocsItemImageSizesThumbnailData) _then) = _$NavApiDocsItemImageSizesThumbnailDataCopyWithImpl; +@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 _$NavApiDocsItemImageSizesThumbnailDataCopyWithImpl<$Res> implements $NavApiDocsItemImageSizesThumbnailDataCopyWith<$Res> { @@ -1503,144 +1029,207 @@ class _$NavApiDocsItemImageSizesThumbnailDataCopyWithImpl<$Res> final NavApiDocsItemImageSizesThumbnailData _self; final $Res Function(NavApiDocsItemImageSizesThumbnailData) _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(_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, - )); - } +/// 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(_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, + )); +} + +} + + +/// Adds pattern-matching-related methods to [NavApiDocsItemImageSizesThumbnailData]. +extension NavApiDocsItemImageSizesThumbnailDataPatterns on NavApiDocsItemImageSizesThumbnailData { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _NavApiDocsItemImageSizesThumbnailData value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesThumbnailData() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _NavApiDocsItemImageSizesThumbnailData value) $default,){ +final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesThumbnailData(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _NavApiDocsItemImageSizesThumbnailData value)? $default,){ +final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesThumbnailData() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function(@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)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesThumbnailData() when $default != null: +return $default(_that.url,_that.width,_that.height,_that.mimeType,_that.filesize,_that.filename);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function(@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) $default,) {final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesThumbnailData(): +return $default(_that.url,_that.width,_that.height,_that.mimeType,_that.filesize,_that.filename);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function(@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)? $default,) {final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesThumbnailData() when $default != null: +return $default(_that.url,_that.width,_that.height,_that.mimeType,_that.filesize,_that.filename);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() -class _NavApiDocsItemImageSizesThumbnailData - extends NavApiDocsItemImageSizesThumbnailData { - const _NavApiDocsItemImageSizesThumbnailData( - {@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 _NavApiDocsItemImageSizesThumbnailData.fromJson( - Map json) => - _$NavApiDocsItemImageSizesThumbnailDataFromJson(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; +class _NavApiDocsItemImageSizesThumbnailData extends NavApiDocsItemImageSizesThumbnailData { + const _NavApiDocsItemImageSizesThumbnailData({@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 _NavApiDocsItemImageSizesThumbnailData.fromJson(Map json) => _$NavApiDocsItemImageSizesThumbnailDataFromJson(json); - /// Create a copy of NavApiDocsItemImageSizesThumbnailData - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$NavApiDocsItemImageSizesThumbnailDataCopyWith< - _NavApiDocsItemImageSizesThumbnailData> - get copyWith => __$NavApiDocsItemImageSizesThumbnailDataCopyWithImpl< - _NavApiDocsItemImageSizesThumbnailData>(this, _$identity); +@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; - @override - Map toJson() { - return _$NavApiDocsItemImageSizesThumbnailDataToJson( - this, - ); - } +/// Create a copy of NavApiDocsItemImageSizesThumbnailData +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$NavApiDocsItemImageSizesThumbnailDataCopyWith<_NavApiDocsItemImageSizesThumbnailData> get copyWith => __$NavApiDocsItemImageSizesThumbnailDataCopyWithImpl<_NavApiDocsItemImageSizesThumbnailData>(this, _$identity); - @override - 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)); - } +@override +Map toJson() { + return _$NavApiDocsItemImageSizesThumbnailDataToJson(this, ); +} + +@override +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)'; +} - @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 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}); -} +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 +}); + + + +} /// @nodoc class __$NavApiDocsItemImageSizesThumbnailDataCopyWithImpl<$Res> implements _$NavApiDocsItemImageSizesThumbnailDataCopyWith<$Res> { @@ -1649,118 +1238,67 @@ class __$NavApiDocsItemImageSizesThumbnailDataCopyWithImpl<$Res> 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 - @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, - )); - } +/// Create a copy of NavApiDocsItemImageSizesThumbnailData +/// 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(_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; - @JsonKey(name: 'preload') - NavApiDocsItemImageSizesPreloadData get preload; - @JsonKey(name: 'card') - NavApiDocsItemImageSizesCardData get card; - @JsonKey(name: 'tablet') - NavApiDocsItemImageSizesTabletData get tablet; - @JsonKey(name: 'avatar') - 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 => _$NavApiDocsItemImageSizesDataCopyWithImpl< - NavApiDocsItemImageSizesData>( - this as NavApiDocsItemImageSizesData, _$identity); +@JsonKey(name: 'thumbnail') NavApiDocsItemImageSizesThumbnailData get thumbnail;@JsonKey(name: 'preload') NavApiDocsItemImageSizesPreloadData get preload;@JsonKey(name: 'card') NavApiDocsItemImageSizesCardData get card;@JsonKey(name: 'tablet') NavApiDocsItemImageSizesTabletData get tablet;@JsonKey(name: 'avatar') 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 => _$NavApiDocsItemImageSizesDataCopyWithImpl(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 +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)'; +} + - @override - String toString() { - return 'NavApiDocsItemImageSizesData(thumbnail: $thumbnail, preload: $preload, card: $card, tablet: $tablet, avatar: $avatar)'; - } } /// @nodoc -abstract mixin class $NavApiDocsItemImageSizesDataCopyWith<$Res> { - factory $NavApiDocsItemImageSizesDataCopyWith( - NavApiDocsItemImageSizesData value, - $Res Function(NavApiDocsItemImageSizesData) _then) = - _$NavApiDocsItemImageSizesDataCopyWithImpl; - @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}); +abstract mixin class $NavApiDocsItemImageSizesDataCopyWith<$Res> { + factory $NavApiDocsItemImageSizesDataCopyWith(NavApiDocsItemImageSizesData value, $Res Function(NavApiDocsItemImageSizesData) _then) = _$NavApiDocsItemImageSizesDataCopyWithImpl; +@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 +}); + + +$NavApiDocsItemImageSizesThumbnailDataCopyWith<$Res> get thumbnail;$NavApiDocsItemImageSizesPreloadDataCopyWith<$Res> get preload;$NavApiDocsItemImageSizesCardDataCopyWith<$Res> get card;$NavApiDocsItemImageSizesTabletDataCopyWith<$Res> get tablet;$NavApiDocsItemImageSizesAvatarDataCopyWith<$Res> get avatar; - $NavApiDocsItemImageSizesThumbnailDataCopyWith<$Res> get thumbnail; - $NavApiDocsItemImageSizesPreloadDataCopyWith<$Res> get preload; - $NavApiDocsItemImageSizesCardDataCopyWith<$Res> get card; - $NavApiDocsItemImageSizesTabletDataCopyWith<$Res> get tablet; - $NavApiDocsItemImageSizesAvatarDataCopyWith<$Res> get avatar; } - /// @nodoc class _$NavApiDocsItemImageSizesDataCopyWithImpl<$Res> implements $NavApiDocsItemImageSizesDataCopyWith<$Res> { @@ -1769,199 +1307,250 @@ class _$NavApiDocsItemImageSizesDataCopyWithImpl<$Res> final NavApiDocsItemImageSizesData _self; final $Res Function(NavApiDocsItemImageSizesData) _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(_self.copyWith( - 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, - )); - } +/// 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(_self.copyWith( +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, + )); +} +/// 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)); + }); +} +} - /// 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)); - }); - } +/// Adds pattern-matching-related methods to [NavApiDocsItemImageSizesData]. +extension NavApiDocsItemImageSizesDataPatterns on NavApiDocsItemImageSizesData { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` - /// 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)); - }); - } +@optionalTypeArgs TResult maybeMap(TResult Function( _NavApiDocsItemImageSizesData value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesData() when $default != null: +return $default(_that);case _: + return orElse(); - /// 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)); - }); - } +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _NavApiDocsItemImageSizesData value) $default,){ +final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesData(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _NavApiDocsItemImageSizesData value)? $default,){ +final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesData() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function(@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)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesData() when $default != null: +return $default(_that.thumbnail,_that.preload,_that.card,_that.tablet,_that.avatar);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function(@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) $default,) {final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesData(): +return $default(_that.thumbnail,_that.preload,_that.card,_that.tablet,_that.avatar);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function(@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)? $default,) {final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesData() when $default != null: +return $default(_that.thumbnail,_that.preload,_that.card,_that.tablet,_that.avatar);case _: + return null; + +} +} - /// 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 @JsonSerializable() + class _NavApiDocsItemImageSizesData extends NavApiDocsItemImageSizesData { - const _NavApiDocsItemImageSizesData( - {@JsonKey(name: 'thumbnail') - this.thumbnail = const NavApiDocsItemImageSizesThumbnailData(), - @JsonKey(name: 'preload') - this.preload = const NavApiDocsItemImageSizesPreloadData(), - @JsonKey(name: 'card') - this.card = const NavApiDocsItemImageSizesCardData(), - @JsonKey(name: 'tablet') - this.tablet = const NavApiDocsItemImageSizesTabletData(), - @JsonKey(name: 'avatar') - this.avatar = const NavApiDocsItemImageSizesAvatarData()}) - : super._(); - factory _NavApiDocsItemImageSizesData.fromJson(Map json) => - _$NavApiDocsItemImageSizesDataFromJson(json); + const _NavApiDocsItemImageSizesData({@JsonKey(name: 'thumbnail') this.thumbnail = const NavApiDocsItemImageSizesThumbnailData(), @JsonKey(name: 'preload') this.preload = const NavApiDocsItemImageSizesPreloadData(), @JsonKey(name: 'card') this.card = const NavApiDocsItemImageSizesCardData(), @JsonKey(name: 'tablet') this.tablet = const NavApiDocsItemImageSizesTabletData(), @JsonKey(name: 'avatar') this.avatar = const NavApiDocsItemImageSizesAvatarData()}): super._(); + factory _NavApiDocsItemImageSizesData.fromJson(Map json) => _$NavApiDocsItemImageSizesDataFromJson(json); - @override - @JsonKey(name: 'thumbnail') - final NavApiDocsItemImageSizesThumbnailData thumbnail; - @override - @JsonKey(name: 'preload') - final NavApiDocsItemImageSizesPreloadData preload; - @override - @JsonKey(name: 'card') - final NavApiDocsItemImageSizesCardData card; - @override - @JsonKey(name: 'tablet') - final NavApiDocsItemImageSizesTabletData tablet; - @override - @JsonKey(name: 'avatar') - final NavApiDocsItemImageSizesAvatarData avatar; +@override@JsonKey(name: 'thumbnail') final NavApiDocsItemImageSizesThumbnailData thumbnail; +@override@JsonKey(name: 'preload') final NavApiDocsItemImageSizesPreloadData preload; +@override@JsonKey(name: 'card') final NavApiDocsItemImageSizesCardData card; +@override@JsonKey(name: 'tablet') final NavApiDocsItemImageSizesTabletData tablet; +@override@JsonKey(name: 'avatar') final NavApiDocsItemImageSizesAvatarData avatar; - /// Create a copy of NavApiDocsItemImageSizesData - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$NavApiDocsItemImageSizesDataCopyWith<_NavApiDocsItemImageSizesData> - get copyWith => __$NavApiDocsItemImageSizesDataCopyWithImpl< - _NavApiDocsItemImageSizesData>(this, _$identity); +/// Create a copy of NavApiDocsItemImageSizesData +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$NavApiDocsItemImageSizesDataCopyWith<_NavApiDocsItemImageSizesData> get copyWith => __$NavApiDocsItemImageSizesDataCopyWithImpl<_NavApiDocsItemImageSizesData>(this, _$identity); - @override - Map toJson() { - return _$NavApiDocsItemImageSizesDataToJson( - this, - ); - } +@override +Map toJson() { + return _$NavApiDocsItemImageSizesDataToJson(this, ); +} - @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)); - } +@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)'; +} - @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 mixin class _$NavApiDocsItemImageSizesDataCopyWith<$Res> - implements $NavApiDocsItemImageSizesDataCopyWith<$Res> { - factory _$NavApiDocsItemImageSizesDataCopyWith( - _NavApiDocsItemImageSizesData value, - $Res Function(_NavApiDocsItemImageSizesData) _then) = - __$NavApiDocsItemImageSizesDataCopyWithImpl; - @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}); +abstract mixin class _$NavApiDocsItemImageSizesDataCopyWith<$Res> implements $NavApiDocsItemImageSizesDataCopyWith<$Res> { + factory _$NavApiDocsItemImageSizesDataCopyWith(_NavApiDocsItemImageSizesData value, $Res Function(_NavApiDocsItemImageSizesData) _then) = __$NavApiDocsItemImageSizesDataCopyWithImpl; +@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; - @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 __$NavApiDocsItemImageSizesDataCopyWithImpl<$Res> implements _$NavApiDocsItemImageSizesDataCopyWith<$Res> { @@ -1970,170 +1559,111 @@ class __$NavApiDocsItemImageSizesDataCopyWithImpl<$Res> 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 - @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, - )); - } - - /// 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)); - }); - } +/// Create a copy of NavApiDocsItemImageSizesData +/// with the given fields replaced by the non-null parameter values. +@override @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, + )); } +/// 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; - @JsonKey(name: 'width') - dynamic get width; - @JsonKey(name: 'height') - dynamic get height; - @JsonKey(name: 'mimeType') - dynamic get mimeType; - @JsonKey(name: 'filesize') - dynamic get filesize; - @JsonKey(name: 'filename') - 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 => _$NavApiDocsItemImageSizesPreloadDataCopyWithImpl< - NavApiDocsItemImageSizesPreloadData>( - this as NavApiDocsItemImageSizesPreloadData, _$identity); +@JsonKey(name: 'url') dynamic get url;@JsonKey(name: 'width') dynamic get width;@JsonKey(name: 'height') dynamic get height;@JsonKey(name: 'mimeType') dynamic get mimeType;@JsonKey(name: 'filesize') dynamic get filesize;@JsonKey(name: 'filename') 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 get copyWith => _$NavApiDocsItemImageSizesPreloadDataCopyWithImpl(this as NavApiDocsItemImageSizesPreloadData, _$identity); /// Serializes this NavApiDocsItemImageSizesPreloadData to a JSON map. Map toJson(); - @override - 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 +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)'; +} + - @override - String toString() { - return 'NavApiDocsItemImageSizesPreloadData(url: $url, width: $width, height: $height, mimeType: $mimeType, filesize: $filesize, filename: $filename)'; - } } /// @nodoc -abstract mixin class $NavApiDocsItemImageSizesPreloadDataCopyWith<$Res> { - factory $NavApiDocsItemImageSizesPreloadDataCopyWith( - NavApiDocsItemImageSizesPreloadData value, - $Res Function(NavApiDocsItemImageSizesPreloadData) _then) = - _$NavApiDocsItemImageSizesPreloadDataCopyWithImpl; - @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}); -} +abstract mixin class $NavApiDocsItemImageSizesPreloadDataCopyWith<$Res> { + factory $NavApiDocsItemImageSizesPreloadDataCopyWith(NavApiDocsItemImageSizesPreloadData value, $Res Function(NavApiDocsItemImageSizesPreloadData) _then) = _$NavApiDocsItemImageSizesPreloadDataCopyWithImpl; +@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 +}); + + + +} /// @nodoc class _$NavApiDocsItemImageSizesPreloadDataCopyWithImpl<$Res> implements $NavApiDocsItemImageSizesPreloadDataCopyWith<$Res> { @@ -2142,147 +1672,207 @@ class _$NavApiDocsItemImageSizesPreloadDataCopyWithImpl<$Res> final NavApiDocsItemImageSizesPreloadData _self; final $Res Function(NavApiDocsItemImageSizesPreloadData) _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(_self.copyWith( - 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, - )); - } +/// 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(_self.copyWith( +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, + )); +} + +} + + +/// Adds pattern-matching-related methods to [NavApiDocsItemImageSizesPreloadData]. +extension NavApiDocsItemImageSizesPreloadDataPatterns on NavApiDocsItemImageSizesPreloadData { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _NavApiDocsItemImageSizesPreloadData value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesPreloadData() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _NavApiDocsItemImageSizesPreloadData value) $default,){ +final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesPreloadData(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _NavApiDocsItemImageSizesPreloadData value)? $default,){ +final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesPreloadData() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function(@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)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesPreloadData() when $default != null: +return $default(_that.url,_that.width,_that.height,_that.mimeType,_that.filesize,_that.filename);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function(@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) $default,) {final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesPreloadData(): +return $default(_that.url,_that.width,_that.height,_that.mimeType,_that.filesize,_that.filename);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function(@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)? $default,) {final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesPreloadData() when $default != null: +return $default(_that.url,_that.width,_that.height,_that.mimeType,_that.filesize,_that.filename);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() -class _NavApiDocsItemImageSizesPreloadData - extends NavApiDocsItemImageSizesPreloadData { - const _NavApiDocsItemImageSizesPreloadData( - {@JsonKey(name: 'url') this.url, - @JsonKey(name: 'width') this.width, - @JsonKey(name: 'height') this.height, - @JsonKey(name: 'mimeType') this.mimeType, - @JsonKey(name: 'filesize') this.filesize, - @JsonKey(name: 'filename') this.filename}) - : super._(); - factory _NavApiDocsItemImageSizesPreloadData.fromJson( - Map json) => - _$NavApiDocsItemImageSizesPreloadDataFromJson(json); - @override - @JsonKey(name: 'url') - final dynamic url; - @override - @JsonKey(name: 'width') - final dynamic width; - @override - @JsonKey(name: 'height') - final dynamic height; - @override - @JsonKey(name: 'mimeType') - final dynamic mimeType; - @override - @JsonKey(name: 'filesize') - final dynamic filesize; - @override - @JsonKey(name: 'filename') - final dynamic filename; +class _NavApiDocsItemImageSizesPreloadData extends NavApiDocsItemImageSizesPreloadData { + const _NavApiDocsItemImageSizesPreloadData({@JsonKey(name: 'url') this.url, @JsonKey(name: 'width') this.width, @JsonKey(name: 'height') this.height, @JsonKey(name: 'mimeType') this.mimeType, @JsonKey(name: 'filesize') this.filesize, @JsonKey(name: 'filename') this.filename}): super._(); + factory _NavApiDocsItemImageSizesPreloadData.fromJson(Map json) => _$NavApiDocsItemImageSizesPreloadDataFromJson(json); - /// Create a copy of NavApiDocsItemImageSizesPreloadData - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$NavApiDocsItemImageSizesPreloadDataCopyWith< - _NavApiDocsItemImageSizesPreloadData> - get copyWith => __$NavApiDocsItemImageSizesPreloadDataCopyWithImpl< - _NavApiDocsItemImageSizesPreloadData>(this, _$identity); +@override@JsonKey(name: 'url') final dynamic url; +@override@JsonKey(name: 'width') final dynamic width; +@override@JsonKey(name: 'height') final dynamic height; +@override@JsonKey(name: 'mimeType') final dynamic mimeType; +@override@JsonKey(name: 'filesize') final dynamic filesize; +@override@JsonKey(name: 'filename') final dynamic filename; - @override - Map toJson() { - return _$NavApiDocsItemImageSizesPreloadDataToJson( - this, - ); - } +/// Create a copy of NavApiDocsItemImageSizesPreloadData +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$NavApiDocsItemImageSizesPreloadDataCopyWith<_NavApiDocsItemImageSizesPreloadData> get copyWith => __$NavApiDocsItemImageSizesPreloadDataCopyWithImpl<_NavApiDocsItemImageSizesPreloadData>(this, _$identity); - @override - 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)); - } +@override +Map toJson() { + return _$NavApiDocsItemImageSizesPreloadDataToJson(this, ); +} + +@override +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)'; +} - @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 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}); -} +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 +}); + + + +} /// @nodoc class __$NavApiDocsItemImageSizesPreloadDataCopyWithImpl<$Res> implements _$NavApiDocsItemImageSizesPreloadDataCopyWith<$Res> { @@ -2291,117 +1881,67 @@ class __$NavApiDocsItemImageSizesPreloadDataCopyWithImpl<$Res> 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 - @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, - )); - } +/// Create a copy of NavApiDocsItemImageSizesPreloadData +/// with the given fields replaced by the non-null parameter values. +@override @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; - @JsonKey(name: 'width') - int get width; - @JsonKey(name: 'height') - int get height; - @JsonKey(name: 'mimeType') - String get mimeType; - @JsonKey(name: 'filesize') - int get filesize; - @JsonKey(name: 'filename') - 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 => _$NavApiDocsItemImageSizesCardDataCopyWithImpl< - NavApiDocsItemImageSizesCardData>( - this as NavApiDocsItemImageSizesCardData, _$identity); +@JsonKey(name: 'url') String get url;@JsonKey(name: 'width') int get width;@JsonKey(name: 'height') int get height;@JsonKey(name: 'mimeType') String get mimeType;@JsonKey(name: 'filesize') int get filesize;@JsonKey(name: 'filename') 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 => _$NavApiDocsItemImageSizesCardDataCopyWithImpl(this as NavApiDocsItemImageSizesCardData, _$identity); /// Serializes this NavApiDocsItemImageSizesCardData to a JSON map. Map toJson(); - @override - 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)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, url, width, height, mimeType, filesize, filename); +@override +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)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +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)'; +} + - @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}); -} +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> { @@ -2410,143 +1950,207 @@ class _$NavApiDocsItemImageSizesCardDataCopyWithImpl<$Res> 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, - )); - } +/// 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, + )); +} + +} + + +/// Adds pattern-matching-related methods to [NavApiDocsItemImageSizesCardData]. +extension NavApiDocsItemImageSizesCardDataPatterns on NavApiDocsItemImageSizesCardData { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _NavApiDocsItemImageSizesCardData value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesCardData() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _NavApiDocsItemImageSizesCardData value) $default,){ +final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesCardData(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _NavApiDocsItemImageSizesCardData value)? $default,){ +final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesCardData() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function(@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)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesCardData() when $default != null: +return $default(_that.url,_that.width,_that.height,_that.mimeType,_that.filesize,_that.filename);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function(@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) $default,) {final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesCardData(): +return $default(_that.url,_that.width,_that.height,_that.mimeType,_that.filesize,_that.filename);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function(@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)? $default,) {final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesCardData() when $default != null: +return $default(_that.url,_that.width,_that.height,_that.mimeType,_that.filesize,_that.filename);case _: + return null; + +} +} + } /// @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; +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); - /// 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@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; - @override - Map toJson() { - return _$NavApiDocsItemImageSizesCardDataToJson( - this, - ); - } +/// 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 - 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)); - } +@override +Map toJson() { + return _$NavApiDocsItemImageSizesCardDataToJson(this, ); +} + +@override +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)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +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)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - 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> - 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}); -} +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 +}); + + + +} /// @nodoc class __$NavApiDocsItemImageSizesCardDataCopyWithImpl<$Res> implements _$NavApiDocsItemImageSizesCardDataCopyWith<$Res> { @@ -2555,118 +2159,67 @@ class __$NavApiDocsItemImageSizesCardDataCopyWithImpl<$Res> 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 - @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, - )); - } +/// Create a copy of NavApiDocsItemImageSizesCardData +/// 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(_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; - @JsonKey(name: 'width') - int get width; - @JsonKey(name: 'height') - int get height; - @JsonKey(name: 'mimeType') - String get mimeType; - @JsonKey(name: 'filesize') - int get filesize; - @JsonKey(name: 'filename') - 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 => _$NavApiDocsItemImageSizesTabletDataCopyWithImpl< - NavApiDocsItemImageSizesTabletData>( - this as NavApiDocsItemImageSizesTabletData, _$identity); +@JsonKey(name: 'url') String get url;@JsonKey(name: 'width') int get width;@JsonKey(name: 'height') int get height;@JsonKey(name: 'mimeType') String get mimeType;@JsonKey(name: 'filesize') int get filesize;@JsonKey(name: 'filename') 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 get copyWith => _$NavApiDocsItemImageSizesTabletDataCopyWithImpl(this as NavApiDocsItemImageSizesTabletData, _$identity); /// Serializes this NavApiDocsItemImageSizesTabletData to a JSON map. Map toJson(); - @override - 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)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, url, width, height, mimeType, filesize, filename); +@override +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)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +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 - String toString() { - return 'NavApiDocsItemImageSizesTabletData(url: $url, width: $width, height: $height, mimeType: $mimeType, filesize: $filesize, filename: $filename)'; - } } /// @nodoc -abstract mixin class $NavApiDocsItemImageSizesTabletDataCopyWith<$Res> { - factory $NavApiDocsItemImageSizesTabletDataCopyWith( - NavApiDocsItemImageSizesTabletData value, - $Res Function(NavApiDocsItemImageSizesTabletData) _then) = - _$NavApiDocsItemImageSizesTabletDataCopyWithImpl; - @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}); -} +abstract mixin class $NavApiDocsItemImageSizesTabletDataCopyWith<$Res> { + factory $NavApiDocsItemImageSizesTabletDataCopyWith(NavApiDocsItemImageSizesTabletData value, $Res Function(NavApiDocsItemImageSizesTabletData) _then) = _$NavApiDocsItemImageSizesTabletDataCopyWithImpl; +@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> { @@ -2675,144 +2228,207 @@ class _$NavApiDocsItemImageSizesTabletDataCopyWithImpl<$Res> final NavApiDocsItemImageSizesTabletData _self; final $Res Function(NavApiDocsItemImageSizesTabletData) _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(_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, - )); - } +/// 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(_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, + )); +} + +} + + +/// Adds pattern-matching-related methods to [NavApiDocsItemImageSizesTabletData]. +extension NavApiDocsItemImageSizesTabletDataPatterns on NavApiDocsItemImageSizesTabletData { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _NavApiDocsItemImageSizesTabletData value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesTabletData() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _NavApiDocsItemImageSizesTabletData value) $default,){ +final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesTabletData(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _NavApiDocsItemImageSizesTabletData value)? $default,){ +final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesTabletData() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function(@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)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesTabletData() when $default != null: +return $default(_that.url,_that.width,_that.height,_that.mimeType,_that.filesize,_that.filename);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function(@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) $default,) {final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesTabletData(): +return $default(_that.url,_that.width,_that.height,_that.mimeType,_that.filesize,_that.filename);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function(@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)? $default,) {final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesTabletData() when $default != null: +return $default(_that.url,_that.width,_that.height,_that.mimeType,_that.filesize,_that.filename);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() -class _NavApiDocsItemImageSizesTabletData - extends NavApiDocsItemImageSizesTabletData { - const _NavApiDocsItemImageSizesTabletData( - {@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 _NavApiDocsItemImageSizesTabletData.fromJson( - Map json) => - _$NavApiDocsItemImageSizesTabletDataFromJson(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; +class _NavApiDocsItemImageSizesTabletData extends NavApiDocsItemImageSizesTabletData { + const _NavApiDocsItemImageSizesTabletData({@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 _NavApiDocsItemImageSizesTabletData.fromJson(Map json) => _$NavApiDocsItemImageSizesTabletDataFromJson(json); - /// Create a copy of NavApiDocsItemImageSizesTabletData - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$NavApiDocsItemImageSizesTabletDataCopyWith< - _NavApiDocsItemImageSizesTabletData> - get copyWith => __$NavApiDocsItemImageSizesTabletDataCopyWithImpl< - _NavApiDocsItemImageSizesTabletData>(this, _$identity); +@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; - @override - Map toJson() { - return _$NavApiDocsItemImageSizesTabletDataToJson( - this, - ); - } +/// Create a copy of NavApiDocsItemImageSizesTabletData +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$NavApiDocsItemImageSizesTabletDataCopyWith<_NavApiDocsItemImageSizesTabletData> get copyWith => __$NavApiDocsItemImageSizesTabletDataCopyWithImpl<_NavApiDocsItemImageSizesTabletData>(this, _$identity); - @override - 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)); - } +@override +Map toJson() { + return _$NavApiDocsItemImageSizesTabletDataToJson(this, ); +} + +@override +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)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +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)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - 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)'; - } } /// @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}); -} +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> { @@ -2821,118 +2437,67 @@ class __$NavApiDocsItemImageSizesTabletDataCopyWithImpl<$Res> 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, - )); - } +/// 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; - @JsonKey(name: 'width') - int get width; - @JsonKey(name: 'height') - int get height; - @JsonKey(name: 'mimeType') - String get mimeType; - @JsonKey(name: 'filesize') - int get filesize; - @JsonKey(name: 'filename') - String get filename; - /// Create a copy of NavApiDocsItemImageSizesAvatarData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $NavApiDocsItemImageSizesAvatarDataCopyWith< - NavApiDocsItemImageSizesAvatarData> - get copyWith => _$NavApiDocsItemImageSizesAvatarDataCopyWithImpl< - NavApiDocsItemImageSizesAvatarData>( - this as NavApiDocsItemImageSizesAvatarData, _$identity); +@JsonKey(name: 'url') String get url;@JsonKey(name: 'width') int get width;@JsonKey(name: 'height') int get height;@JsonKey(name: 'mimeType') String get mimeType;@JsonKey(name: 'filesize') int get filesize;@JsonKey(name: 'filename') String get filename; +/// Create a copy of NavApiDocsItemImageSizesAvatarData +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$NavApiDocsItemImageSizesAvatarDataCopyWith get copyWith => _$NavApiDocsItemImageSizesAvatarDataCopyWithImpl(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 +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)'; +} + - @override - String toString() { - return 'NavApiDocsItemImageSizesAvatarData(url: $url, width: $width, height: $height, mimeType: $mimeType, filesize: $filesize, filename: $filename)'; - } } /// @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}); -} +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> { @@ -2941,144 +2506,207 @@ class _$NavApiDocsItemImageSizesAvatarDataCopyWithImpl<$Res> 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, - )); - } +/// 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, + )); +} + +} + + +/// Adds pattern-matching-related methods to [NavApiDocsItemImageSizesAvatarData]. +extension NavApiDocsItemImageSizesAvatarDataPatterns on NavApiDocsItemImageSizesAvatarData { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _NavApiDocsItemImageSizesAvatarData value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesAvatarData() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _NavApiDocsItemImageSizesAvatarData value) $default,){ +final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesAvatarData(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _NavApiDocsItemImageSizesAvatarData value)? $default,){ +final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesAvatarData() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function(@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)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesAvatarData() when $default != null: +return $default(_that.url,_that.width,_that.height,_that.mimeType,_that.filesize,_that.filename);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function(@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) $default,) {final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesAvatarData(): +return $default(_that.url,_that.width,_that.height,_that.mimeType,_that.filesize,_that.filename);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function(@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)? $default,) {final _that = this; +switch (_that) { +case _NavApiDocsItemImageSizesAvatarData() when $default != null: +return $default(_that.url,_that.width,_that.height,_that.mimeType,_that.filesize,_that.filename);case _: + return null; + +} +} + } /// @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; +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); - /// 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@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; - @override - Map toJson() { - return _$NavApiDocsItemImageSizesAvatarDataToJson( - this, - ); - } +/// 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 - 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)); - } +@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)'; +} - @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}); -} +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> { @@ -3087,111 +2715,67 @@ class __$NavApiDocsItemImageSizesAvatarDataCopyWithImpl<$Res> 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, - )); - } +/// 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; - @JsonKey(name: 'name') - String get name; - @JsonKey(name: 'slug') - String get slug; - @JsonKey(name: 'updatedAt') - String get updatedAt; - @JsonKey(name: 'createdAt') - String get createdAt; - /// Create a copy of NavApiDocsItemTagsItemData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $NavApiDocsItemTagsItemDataCopyWith - get copyWith => - _$NavApiDocsItemTagsItemDataCopyWithImpl( - this as NavApiDocsItemTagsItemData, _$identity); +@JsonKey(name: 'id') String get id;@JsonKey(name: 'name') String get name;@JsonKey(name: 'slug') String get slug;@JsonKey(name: 'updatedAt') String get updatedAt;@JsonKey(name: 'createdAt') String get createdAt; +/// Create a copy of NavApiDocsItemTagsItemData +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$NavApiDocsItemTagsItemDataCopyWith get copyWith => _$NavApiDocsItemTagsItemDataCopyWithImpl(this as NavApiDocsItemTagsItemData, _$identity); /// Serializes this NavApiDocsItemTagsItemData to a JSON map. Map toJson(); - @override - 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 +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)'; +} + - @override - String toString() { - return 'NavApiDocsItemTagsItemData(id: $id, name: $name, slug: $slug, updatedAt: $updatedAt, createdAt: $createdAt)'; - } } /// @nodoc -abstract mixin class $NavApiDocsItemTagsItemDataCopyWith<$Res> { - factory $NavApiDocsItemTagsItemDataCopyWith(NavApiDocsItemTagsItemData value, - $Res Function(NavApiDocsItemTagsItemData) _then) = - _$NavApiDocsItemTagsItemDataCopyWithImpl; - @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}); -} +abstract mixin class $NavApiDocsItemTagsItemDataCopyWith<$Res> { + factory $NavApiDocsItemTagsItemDataCopyWith(NavApiDocsItemTagsItemData value, $Res Function(NavApiDocsItemTagsItemData) _then) = _$NavApiDocsItemTagsItemDataCopyWithImpl; +@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> implements $NavApiDocsItemTagsItemDataCopyWith<$Res> { @@ -3200,129 +2784,205 @@ class _$NavApiDocsItemTagsItemDataCopyWithImpl<$Res> final NavApiDocsItemTagsItemData _self; final $Res Function(NavApiDocsItemTagsItemData) _then; - /// Create a copy of NavApiDocsItemTagsItemData - /// 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? updatedAt = null, - Object? createdAt = null, - }) { - return _then(_self.copyWith( - 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, - )); - } +/// Create a copy of NavApiDocsItemTagsItemData +/// 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? updatedAt = null,Object? createdAt = null,}) { + return _then(_self.copyWith( +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, + )); +} + +} + + +/// Adds pattern-matching-related methods to [NavApiDocsItemTagsItemData]. +extension NavApiDocsItemTagsItemDataPatterns on NavApiDocsItemTagsItemData { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _NavApiDocsItemTagsItemData value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _NavApiDocsItemTagsItemData() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _NavApiDocsItemTagsItemData value) $default,){ +final _that = this; +switch (_that) { +case _NavApiDocsItemTagsItemData(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _NavApiDocsItemTagsItemData value)? $default,){ +final _that = this; +switch (_that) { +case _NavApiDocsItemTagsItemData() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function(@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)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _NavApiDocsItemTagsItemData() when $default != null: +return $default(_that.id,_that.name,_that.slug,_that.updatedAt,_that.createdAt);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function(@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) $default,) {final _that = this; +switch (_that) { +case _NavApiDocsItemTagsItemData(): +return $default(_that.id,_that.name,_that.slug,_that.updatedAt,_that.createdAt);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function(@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)? $default,) {final _that = this; +switch (_that) { +case _NavApiDocsItemTagsItemData() when $default != null: +return $default(_that.id,_that.name,_that.slug,_that.updatedAt,_that.createdAt);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + 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 _NavApiDocsItemTagsItemData.fromJson(Map json) => - _$NavApiDocsItemTagsItemDataFromJson(json); + 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 _NavApiDocsItemTagsItemData.fromJson(Map json) => _$NavApiDocsItemTagsItemDataFromJson(json); - @override - @JsonKey(name: 'id') - final String id; - @override - @JsonKey(name: 'name') - final String name; - @override - @JsonKey(name: 'slug') - final String slug; - @override - @JsonKey(name: 'updatedAt') - final String updatedAt; - @override - @JsonKey(name: 'createdAt') - final String createdAt; +@override@JsonKey(name: 'id') final String id; +@override@JsonKey(name: 'name') final String name; +@override@JsonKey(name: 'slug') final String slug; +@override@JsonKey(name: 'updatedAt') final String updatedAt; +@override@JsonKey(name: 'createdAt') final String createdAt; - /// Create a copy of NavApiDocsItemTagsItemData - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$NavApiDocsItemTagsItemDataCopyWith<_NavApiDocsItemTagsItemData> - get copyWith => __$NavApiDocsItemTagsItemDataCopyWithImpl< - _NavApiDocsItemTagsItemData>(this, _$identity); +/// Create a copy of NavApiDocsItemTagsItemData +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$NavApiDocsItemTagsItemDataCopyWith<_NavApiDocsItemTagsItemData> get copyWith => __$NavApiDocsItemTagsItemDataCopyWithImpl<_NavApiDocsItemTagsItemData>(this, _$identity); - @override - Map toJson() { - return _$NavApiDocsItemTagsItemDataToJson( - this, - ); - } +@override +Map toJson() { + return _$NavApiDocsItemTagsItemDataToJson(this, ); +} - @override - 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)); - } +@override +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)'; +} - @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 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}); -} +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 +}); + + + +} /// @nodoc class __$NavApiDocsItemTagsItemDataCopyWithImpl<$Res> implements _$NavApiDocsItemTagsItemDataCopyWith<$Res> { @@ -3331,407 +2991,316 @@ class __$NavApiDocsItemTagsItemDataCopyWithImpl<$Res> 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 - @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, - )); - } +/// Create a copy of NavApiDocsItemTagsItemData +/// with the given fields replaced by the non-null parameter values. +@override @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; - @JsonKey(name: 'hasNextPage') - bool get hasNextPage; - @JsonKey(name: 'hasPrevPage') - bool get hasPrevPage; - @JsonKey(name: 'limit') - int get limit; - @JsonKey(name: 'nextPage') - dynamic get nextPage; - @JsonKey(name: 'page') - int get page; - @JsonKey(name: 'pagingCounter') - int get pagingCounter; - @JsonKey(name: 'prevPage') - dynamic get prevPage; - @JsonKey(name: 'totalDocs') - int get totalDocs; - @JsonKey(name: 'totalPages') - int get totalPages; - /// Create a copy of NavApiData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $NavApiDataCopyWith get copyWith => - _$NavApiDataCopyWithImpl(this as NavApiData, _$identity); +@JsonKey(name: 'docs') List get docs;@JsonKey(name: 'hasNextPage') bool get hasNextPage;@JsonKey(name: 'hasPrevPage') bool get hasPrevPage;@JsonKey(name: 'limit') int get limit;@JsonKey(name: 'nextPage') dynamic get nextPage;@JsonKey(name: 'page') int get page;@JsonKey(name: 'pagingCounter') int get pagingCounter;@JsonKey(name: 'prevPage') dynamic get prevPage;@JsonKey(name: 'totalDocs') int get totalDocs;@JsonKey(name: 'totalPages') int get totalPages; +/// Create a copy of NavApiData +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$NavApiDataCopyWith get copyWith => _$NavApiDataCopyWithImpl(this as NavApiData, _$identity); /// Serializes this NavApiData to a JSON map. Map toJson(); - @override - 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 +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)'; +} + - @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 mixin class $NavApiDataCopyWith<$Res> { - factory $NavApiDataCopyWith( - NavApiData value, $Res Function(NavApiData) _then) = - _$NavApiDataCopyWithImpl; - @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}); -} +abstract mixin class $NavApiDataCopyWith<$Res> { + factory $NavApiDataCopyWith(NavApiData value, $Res Function(NavApiData) _then) = _$NavApiDataCopyWithImpl; +@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> implements $NavApiDataCopyWith<$Res> { +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. - @pragma('vm:prefer-inline') - @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(_self.copyWith( - 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, - )); - } +/// Create a copy of NavApiData +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @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(_self.copyWith( +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, + )); +} + +} + + +/// Adds pattern-matching-related methods to [NavApiData]. +extension NavApiDataPatterns on NavApiData { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _NavApiData value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _NavApiData() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _NavApiData value) $default,){ +final _that = this; +switch (_that) { +case _NavApiData(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _NavApiData value)? $default,){ +final _that = this; +switch (_that) { +case _NavApiData() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function(@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)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _NavApiData() when $default != null: +return $default(_that.docs,_that.hasNextPage,_that.hasPrevPage,_that.limit,_that.nextPage,_that.page,_that.pagingCounter,_that.prevPage,_that.totalDocs,_that.totalPages);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function(@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) $default,) {final _that = this; +switch (_that) { +case _NavApiData(): +return $default(_that.docs,_that.hasNextPage,_that.hasPrevPage,_that.limit,_that.nextPage,_that.page,_that.pagingCounter,_that.prevPage,_that.totalDocs,_that.totalPages);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function(@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)? $default,) {final _that = this; +switch (_that) { +case _NavApiData() when $default != null: +return $default(_that.docs,_that.hasNextPage,_that.hasPrevPage,_that.limit,_that.nextPage,_that.page,_that.pagingCounter,_that.prevPage,_that.totalDocs,_that.totalPages);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _NavApiData extends NavApiData { - const _NavApiData( - {@JsonKey(name: 'docs') - final List docs = const [], - @JsonKey(name: 'hasNextPage') this.hasNextPage = false, - @JsonKey(name: 'hasPrevPage') this.hasPrevPage = false, - @JsonKey(name: 'limit') this.limit = 0, - @JsonKey(name: 'nextPage') this.nextPage, - @JsonKey(name: 'page') this.page = 0, - @JsonKey(name: 'pagingCounter') this.pagingCounter = 0, - @JsonKey(name: 'prevPage') this.prevPage, - @JsonKey(name: 'totalDocs') this.totalDocs = 0, - @JsonKey(name: 'totalPages') this.totalPages = 0}) - : _docs = docs, - super._(); - factory _NavApiData.fromJson(Map json) => - _$NavApiDataFromJson(json); + const _NavApiData({@JsonKey(name: 'docs') final List docs = const [], @JsonKey(name: 'hasNextPage') this.hasNextPage = false, @JsonKey(name: 'hasPrevPage') this.hasPrevPage = false, @JsonKey(name: 'limit') this.limit = 0, @JsonKey(name: 'nextPage') this.nextPage, @JsonKey(name: 'page') this.page = 0, @JsonKey(name: 'pagingCounter') this.pagingCounter = 0, @JsonKey(name: 'prevPage') this.prevPage, @JsonKey(name: 'totalDocs') this.totalDocs = 0, @JsonKey(name: 'totalPages') this.totalPages = 0}): _docs = docs,super._(); + factory _NavApiData.fromJson(Map json) => _$NavApiDataFromJson(json); - final List _docs; - @override - @JsonKey(name: 'docs') - List get docs { - if (_docs is EqualUnmodifiableListView) return _docs; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_docs); - } + final List _docs; +@override@JsonKey(name: 'docs') List get docs { + if (_docs is EqualUnmodifiableListView) return _docs; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_docs); +} - @override - @JsonKey(name: 'hasNextPage') - final bool hasNextPage; - @override - @JsonKey(name: 'hasPrevPage') - final bool hasPrevPage; - @override - @JsonKey(name: 'limit') - final int limit; - @override - @JsonKey(name: 'nextPage') - final dynamic nextPage; - @override - @JsonKey(name: 'page') - final int page; - @override - @JsonKey(name: 'pagingCounter') - final int pagingCounter; - @override - @JsonKey(name: 'prevPage') - final dynamic prevPage; - @override - @JsonKey(name: 'totalDocs') - final int totalDocs; - @override - @JsonKey(name: 'totalPages') - final int totalPages; +@override@JsonKey(name: 'hasNextPage') final bool hasNextPage; +@override@JsonKey(name: 'hasPrevPage') final bool hasPrevPage; +@override@JsonKey(name: 'limit') final int limit; +@override@JsonKey(name: 'nextPage') final dynamic nextPage; +@override@JsonKey(name: 'page') final int page; +@override@JsonKey(name: 'pagingCounter') final int pagingCounter; +@override@JsonKey(name: 'prevPage') final dynamic prevPage; +@override@JsonKey(name: 'totalDocs') final int totalDocs; +@override@JsonKey(name: 'totalPages') final int totalPages; - /// Create a copy of NavApiData - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$NavApiDataCopyWith<_NavApiData> get copyWith => - __$NavApiDataCopyWithImpl<_NavApiData>(this, _$identity); +/// Create a copy of NavApiData +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$NavApiDataCopyWith<_NavApiData> get copyWith => __$NavApiDataCopyWithImpl<_NavApiData>(this, _$identity); - @override - Map toJson() { - return _$NavApiDataToJson( - this, - ); - } +@override +Map toJson() { + return _$NavApiDataToJson(this, ); +} - @override - 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)); - } +@override +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)'; +} - @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 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}); -} +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 +}); + + + +} /// @nodoc -class __$NavApiDataCopyWithImpl<$Res> implements _$NavApiDataCopyWith<$Res> { +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. - @override - @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, - )); - } +/// Create a copy of NavApiData +/// with the given fields replaced by the non-null parameter values. +@override @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 d3bba6f..0fd3b80 100644 --- a/lib/data/nav_api_data.g.dart +++ b/lib/data/nav_api_data.g.dart @@ -6,27 +6,30 @@ part of 'nav_api_data.dart'; // JsonSerializableGenerator // ************************************************************************** -_NavApiDocsItemData _$NavApiDocsItemDataFromJson(Map json) => - _NavApiDocsItemData( - id: json['id'] as String? ?? '', - name: json['name'] as String? ?? '', - slug: json['slug'] as String? ?? '', - abstract_: json['abstract'] as String? ?? '', - description: json['description'] as String? ?? '', - image: json['image'] == null - ? const NavApiDocsItemImageData() - : NavApiDocsItemImageData.fromJson( - json['image'] as Map), - link: json['link'] as String? ?? '', - isSponsored: json['is_sponsored'] as bool? ?? false, - tags: (json['tags'] as List?) - ?.map((e) => NavApiDocsItemTagsItemData.fromJson( - e as Map)) - .toList() ?? - const [], - updatedAt: json['updatedAt'] as String? ?? '', - createdAt: json['createdAt'] as String? ?? '', - ); +_NavApiDocsItemData _$NavApiDocsItemDataFromJson( + Map json, +) => _NavApiDocsItemData( + id: json['id'] as String? ?? '', + name: json['name'] as String? ?? '', + slug: json['slug'] as String? ?? '', + abstract_: json['abstract'] as String? ?? '', + description: json['description'] as String? ?? '', + image: json['image'] == null + ? const NavApiDocsItemImageData() + : NavApiDocsItemImageData.fromJson(json['image'] as Map), + link: json['link'] as String? ?? '', + isSponsored: json['is_sponsored'] as bool? ?? false, + tags: + (json['tags'] as List?) + ?.map( + (e) => + NavApiDocsItemTagsItemData.fromJson(e as Map), + ) + .toList() ?? + const [], + updatedAt: json['updatedAt'] as String? ?? '', + createdAt: json['createdAt'] as String? ?? '', +); Map _$NavApiDocsItemDataToJson(_NavApiDocsItemData instance) => { @@ -44,174 +47,96 @@ Map _$NavApiDocsItemDataToJson(_NavApiDocsItemData instance) => }; _NavApiDocsItemImageData _$NavApiDocsItemImageDataFromJson( - Map json) => - _NavApiDocsItemImageData( - id: json['id'] as String? ?? '', - createdBy: json['createdBy'] == null - ? const NavApiDocsItemImageCreatedByData() - : NavApiDocsItemImageCreatedByData.fromJson( - json['createdBy'] as Map), - title: json['title'] as String? ?? '', - original: json['original'] as bool? ?? false, - credit: json['credit'] as String? ?? '', - source: json['source'] as String? ?? '', - license: json['license'] as String? ?? '', - caption: json['caption'], - updatedAt: json['updatedAt'] as String? ?? '', - createdAt: json['createdAt'] as String? ?? '', - url: json['url'] as String? ?? '', - filename: json['filename'] as String? ?? '', - mimeType: json['mimeType'] as String? ?? '', - filesize: (json['filesize'] as num?)?.toInt() ?? 0, - width: (json['width'] as num?)?.toInt() ?? 0, - height: (json['height'] as num?)?.toInt() ?? 0, - sizes: json['sizes'] == null - ? const NavApiDocsItemImageSizesData() - : NavApiDocsItemImageSizesData.fromJson( - json['sizes'] as Map), - ); + Map json, +) => _NavApiDocsItemImageData( + id: json['id'] as String? ?? '', + createdBy: json['createdBy'] == null + ? const NavApiDocsItemImageCreatedByData() + : NavApiDocsItemImageCreatedByData.fromJson( + json['createdBy'] as Map, + ), + title: json['title'] as String? ?? '', + original: json['original'] as bool? ?? false, + credit: json['credit'] as String? ?? '', + source: json['source'] as String? ?? '', + license: json['license'] as String? ?? '', + caption: json['caption'], + updatedAt: json['updatedAt'] as String? ?? '', + createdAt: json['createdAt'] as String? ?? '', + url: json['url'] as String? ?? '', + filename: json['filename'] as String? ?? '', + mimeType: json['mimeType'] as String? ?? '', + filesize: (json['filesize'] as num?)?.toInt() ?? 0, + width: (json['width'] as num?)?.toInt() ?? 0, + height: (json['height'] as num?)?.toInt() ?? 0, + sizes: json['sizes'] == null + ? const NavApiDocsItemImageSizesData() + : NavApiDocsItemImageSizesData.fromJson( + json['sizes'] as Map, + ), +); Map _$NavApiDocsItemImageDataToJson( - _NavApiDocsItemImageData instance) => - { - 'id': instance.id, - 'createdBy': instance.createdBy, - 'title': instance.title, - 'original': instance.original, - 'credit': instance.credit, - 'source': instance.source, - 'license': instance.license, - 'caption': instance.caption, - 'updatedAt': instance.updatedAt, - 'createdAt': instance.createdAt, - 'url': instance.url, - 'filename': instance.filename, - 'mimeType': instance.mimeType, - 'filesize': instance.filesize, - 'width': instance.width, - 'height': instance.height, - 'sizes': instance.sizes, - }; + _NavApiDocsItemImageData instance, +) => { + 'id': instance.id, + 'createdBy': instance.createdBy, + 'title': instance.title, + 'original': instance.original, + 'credit': instance.credit, + 'source': instance.source, + 'license': instance.license, + 'caption': instance.caption, + 'updatedAt': instance.updatedAt, + 'createdAt': instance.createdAt, + 'url': instance.url, + 'filename': instance.filename, + 'mimeType': instance.mimeType, + 'filesize': instance.filesize, + 'width': instance.width, + 'height': instance.height, + 'sizes': instance.sizes, +}; _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? ?? '', - ); + 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? ?? '', +); Map _$NavApiDocsItemImageCreatedByDataToJson( - _NavApiDocsItemImageCreatedByData instance) => - { - 'id': instance.id, - 'sub': instance.sub, - 'external_provider': instance.externalProvider, - 'username': instance.username, - 'name': instance.name, - 'roles': instance.roles, - 'avatar_url': instance.avatarUrl, - 'updatedAt': instance.updatedAt, - 'createdAt': instance.createdAt, - 'email': instance.email, - 'loginAttempts': instance.loginAttempts, - 'avatar': instance.avatar, - }; + _NavApiDocsItemImageCreatedByData instance, +) => { + 'id': instance.id, + 'sub': instance.sub, + 'external_provider': instance.externalProvider, + 'username': instance.username, + 'name': instance.name, + 'roles': instance.roles, + 'avatar_url': instance.avatarUrl, + 'updatedAt': instance.updatedAt, + 'createdAt': instance.createdAt, + 'email': instance.email, + 'loginAttempts': instance.loginAttempts, + 'avatar': instance.avatar, +}; _NavApiDocsItemImageSizesThumbnailData - _$NavApiDocsItemImageSizesThumbnailDataFromJson( - Map json) => - _NavApiDocsItemImageSizesThumbnailData( - 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 _$NavApiDocsItemImageSizesThumbnailDataToJson( - _NavApiDocsItemImageSizesThumbnailData instance) => - { - 'url': instance.url, - 'width': instance.width, - 'height': instance.height, - 'mimeType': instance.mimeType, - 'filesize': instance.filesize, - 'filename': instance.filename, - }; - -_NavApiDocsItemImageSizesData _$NavApiDocsItemImageSizesDataFromJson( - Map json) => - _NavApiDocsItemImageSizesData( - thumbnail: json['thumbnail'] == null - ? const NavApiDocsItemImageSizesThumbnailData() - : NavApiDocsItemImageSizesThumbnailData.fromJson( - json['thumbnail'] as Map), - preload: json['preload'] == null - ? const NavApiDocsItemImageSizesPreloadData() - : NavApiDocsItemImageSizesPreloadData.fromJson( - json['preload'] as Map), - card: json['card'] == null - ? const NavApiDocsItemImageSizesCardData() - : NavApiDocsItemImageSizesCardData.fromJson( - json['card'] as Map), - tablet: json['tablet'] == null - ? const NavApiDocsItemImageSizesTabletData() - : NavApiDocsItemImageSizesTabletData.fromJson( - json['tablet'] as Map), - avatar: json['avatar'] == null - ? const NavApiDocsItemImageSizesAvatarData() - : NavApiDocsItemImageSizesAvatarData.fromJson( - json['avatar'] as Map), - ); - -Map _$NavApiDocsItemImageSizesDataToJson( - _NavApiDocsItemImageSizesData instance) => - { - 'thumbnail': instance.thumbnail, - 'preload': instance.preload, - 'card': instance.card, - 'tablet': instance.tablet, - 'avatar': instance.avatar, - }; - -_NavApiDocsItemImageSizesPreloadData - _$NavApiDocsItemImageSizesPreloadDataFromJson(Map json) => - _NavApiDocsItemImageSizesPreloadData( - url: json['url'], - width: json['width'], - height: json['height'], - mimeType: json['mimeType'], - filesize: json['filesize'], - filename: json['filename'], - ); - -Map _$NavApiDocsItemImageSizesPreloadDataToJson( - _NavApiDocsItemImageSizesPreloadData instance) => - { - 'url': instance.url, - 'width': instance.width, - 'height': instance.height, - 'mimeType': instance.mimeType, - 'filesize': instance.filesize, - 'filename': instance.filename, - }; - -_NavApiDocsItemImageSizesCardData _$NavApiDocsItemImageSizesCardDataFromJson( - Map json) => - _NavApiDocsItemImageSizesCardData( +_$NavApiDocsItemImageSizesThumbnailDataFromJson(Map json) => + _NavApiDocsItemImageSizesThumbnailData( url: json['url'] as String? ?? '', width: (json['width'] as num?)?.toInt() ?? 0, height: (json['height'] as num?)?.toInt() ?? 0, @@ -220,97 +145,181 @@ _NavApiDocsItemImageSizesCardData _$NavApiDocsItemImageSizesCardDataFromJson( filename: json['filename'] as String? ?? '', ); +Map _$NavApiDocsItemImageSizesThumbnailDataToJson( + _NavApiDocsItemImageSizesThumbnailData instance, +) => { + 'url': instance.url, + 'width': instance.width, + 'height': instance.height, + 'mimeType': instance.mimeType, + 'filesize': instance.filesize, + 'filename': instance.filename, +}; + +_NavApiDocsItemImageSizesData _$NavApiDocsItemImageSizesDataFromJson( + Map json, +) => _NavApiDocsItemImageSizesData( + thumbnail: json['thumbnail'] == null + ? const NavApiDocsItemImageSizesThumbnailData() + : NavApiDocsItemImageSizesThumbnailData.fromJson( + json['thumbnail'] as Map, + ), + preload: json['preload'] == null + ? const NavApiDocsItemImageSizesPreloadData() + : NavApiDocsItemImageSizesPreloadData.fromJson( + json['preload'] as Map, + ), + card: json['card'] == null + ? const NavApiDocsItemImageSizesCardData() + : NavApiDocsItemImageSizesCardData.fromJson( + json['card'] as Map, + ), + tablet: json['tablet'] == null + ? const NavApiDocsItemImageSizesTabletData() + : NavApiDocsItemImageSizesTabletData.fromJson( + json['tablet'] as Map, + ), + avatar: json['avatar'] == null + ? const NavApiDocsItemImageSizesAvatarData() + : NavApiDocsItemImageSizesAvatarData.fromJson( + json['avatar'] as Map, + ), +); + +Map _$NavApiDocsItemImageSizesDataToJson( + _NavApiDocsItemImageSizesData instance, +) => { + 'thumbnail': instance.thumbnail, + 'preload': instance.preload, + 'card': instance.card, + 'tablet': instance.tablet, + 'avatar': instance.avatar, +}; + +_NavApiDocsItemImageSizesPreloadData +_$NavApiDocsItemImageSizesPreloadDataFromJson(Map json) => + _NavApiDocsItemImageSizesPreloadData( + url: json['url'], + width: json['width'], + height: json['height'], + mimeType: json['mimeType'], + filesize: json['filesize'], + filename: json['filename'], + ); + +Map _$NavApiDocsItemImageSizesPreloadDataToJson( + _NavApiDocsItemImageSizesPreloadData instance, +) => { + 'url': instance.url, + 'width': instance.width, + 'height': instance.height, + 'mimeType': instance.mimeType, + 'filesize': instance.filesize, + 'filename': instance.filename, +}; + +_NavApiDocsItemImageSizesCardData _$NavApiDocsItemImageSizesCardDataFromJson( + Map json, +) => _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, - }; + _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? ?? '', - ); +_$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, - }; + _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? ?? '', - ); +_$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, - }; + _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? ?? '', - updatedAt: json['updatedAt'] as String? ?? '', - createdAt: json['createdAt'] as String? ?? '', - ); + Map json, +) => _NavApiDocsItemTagsItemData( + id: json['id'] as String? ?? '', + name: json['name'] as String? ?? '', + slug: json['slug'] as String? ?? '', + updatedAt: json['updatedAt'] as String? ?? '', + createdAt: json['createdAt'] as String? ?? '', +); Map _$NavApiDocsItemTagsItemDataToJson( - _NavApiDocsItemTagsItemData instance) => - { - 'id': instance.id, - 'name': instance.name, - 'slug': instance.slug, - 'updatedAt': instance.updatedAt, - 'createdAt': instance.createdAt, - }; + _NavApiDocsItemTagsItemData instance, +) => { + 'id': instance.id, + 'name': instance.name, + 'slug': instance.slug, + 'updatedAt': instance.updatedAt, + 'createdAt': instance.createdAt, +}; _NavApiData _$NavApiDataFromJson(Map json) => _NavApiData( - docs: (json['docs'] as List?) - ?.map( - (e) => NavApiDocsItemData.fromJson(e as Map)) - .toList() ?? - const [], - hasNextPage: json['hasNextPage'] as bool? ?? false, - hasPrevPage: json['hasPrevPage'] as bool? ?? false, - limit: (json['limit'] as num?)?.toInt() ?? 0, - nextPage: json['nextPage'], - page: (json['page'] as num?)?.toInt() ?? 0, - pagingCounter: (json['pagingCounter'] as num?)?.toInt() ?? 0, - prevPage: json['prevPage'], - totalDocs: (json['totalDocs'] as num?)?.toInt() ?? 0, - totalPages: (json['totalPages'] as num?)?.toInt() ?? 0, - ); + docs: + (json['docs'] as List?) + ?.map((e) => NavApiDocsItemData.fromJson(e as Map)) + .toList() ?? + const [], + hasNextPage: json['hasNextPage'] as bool? ?? false, + hasPrevPage: json['hasPrevPage'] as bool? ?? false, + limit: (json['limit'] as num?)?.toInt() ?? 0, + nextPage: json['nextPage'], + page: (json['page'] as num?)?.toInt() ?? 0, + pagingCounter: (json['pagingCounter'] as num?)?.toInt() ?? 0, + prevPage: json['prevPage'], + totalDocs: (json['totalDocs'] as num?)?.toInt() ?? 0, + totalPages: (json['totalPages'] as num?)?.toInt() ?? 0, +); Map _$NavApiDataToJson(_NavApiData instance) => { diff --git a/lib/provider/aria2c.freezed.dart b/lib/provider/aria2c.freezed.dart index 46b16cb..4a4c616 100644 --- a/lib/provider/aria2c.freezed.dart +++ b/lib/provider/aria2c.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,62 +11,53 @@ part of 'aria2c.dart'; // dart format off T _$identity(T value) => value; - /// @nodoc 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 => - _$Aria2cModelStateCopyWithImpl( - this as Aria2cModelState, _$identity); + 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 => _$Aria2cModelStateCopyWithImpl(this as Aria2cModelState, _$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 +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)'; +} - @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> { - factory $Aria2cModelStateCopyWith( - Aria2cModelState value, $Res Function(Aria2cModelState) _then) = - _$Aria2cModelStateCopyWithImpl; - @useResult - $Res call( - {String aria2cDir, Aria2c? aria2c, Aria2GlobalStat? aria2globalStat}); -} +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> { @@ -76,98 +66,204 @@ class _$Aria2cModelStateCopyWithImpl<$Res> 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?, - )); - } +/// 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?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [Aria2cModelState]. +extension Aria2cModelStatePatterns on Aria2cModelState { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _Aria2cModelState value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _Aria2cModelState() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _Aria2cModelState value) $default,){ +final _that = this; +switch (_that) { +case _Aria2cModelState(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _Aria2cModelState value)? $default,){ +final _that = this; +switch (_that) { +case _Aria2cModelState() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String aria2cDir, Aria2c? aria2c, Aria2GlobalStat? aria2globalStat)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _Aria2cModelState() when $default != null: +return $default(_that.aria2cDir,_that.aria2c,_that.aria2globalStat);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String aria2cDir, Aria2c? aria2c, Aria2GlobalStat? aria2globalStat) $default,) {final _that = this; +switch (_that) { +case _Aria2cModelState(): +return $default(_that.aria2cDir,_that.aria2c,_that.aria2globalStat);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String aria2cDir, Aria2c? aria2c, Aria2GlobalStat? aria2globalStat)? $default,) {final _that = this; +switch (_that) { +case _Aria2cModelState() when $default != null: +return $default(_that.aria2cDir,_that.aria2c,_that.aria2globalStat);case _: + return null; + +} +} + } /// @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; +class _Aria2cModelState with DiagnosticableTreeMixin implements Aria2cModelState { + const _Aria2cModelState({required this.aria2cDir, this.aria2c, this.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 final String aria2cDir; +@override final Aria2c? aria2c; +@override final Aria2GlobalStat? aria2globalStat; - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'Aria2cModelState')) - ..add(DiagnosticsProperty('aria2cDir', aria2cDir)) - ..add(DiagnosticsProperty('aria2c', aria2c)) - ..add(DiagnosticsProperty('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 - 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 +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)'; +} + - @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}); -} +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> { @@ -176,30 +272,18 @@ class __$Aria2cModelStateCopyWithImpl<$Res> 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') - $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?, - )); - } +/// Create a copy of Aria2cModelState +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $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?, + )); +} + + } // dart format on diff --git a/lib/provider/aria2c.g.dart b/lib/provider/aria2c.g.dart index 0a6c5b5..2ecd212 100644 --- a/lib/provider/aria2c.g.dart +++ b/lib/provider/aria2c.g.dart @@ -12,13 +12,14 @@ String _$aria2cModelHash() => r'3d51aeefd92e5291dca1f01db961f9c5496ec24f'; @ProviderFor(Aria2cModel) final aria2cModelProvider = AutoDisposeNotifierProvider.internal( - Aria2cModel.new, - name: r'aria2cModelProvider', - debugGetCreateSourceHash: - const bool.fromEnvironment('dart.vm.product') ? null : _$aria2cModelHash, - dependencies: null, - allTransitiveDependencies: null, -); + Aria2cModel.new, + name: r'aria2cModelProvider', + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') + ? null + : _$aria2cModelHash, + dependencies: null, + allTransitiveDependencies: null, + ); typedef _$Aria2cModel = AutoDisposeNotifier; // ignore_for_file: type=lint diff --git a/lib/provider/unp4kc.freezed.dart b/lib/provider/unp4kc.freezed.dart index 48876cf..9ed7d64 100644 --- a/lib/provider/unp4kc.freezed.dart +++ b/lib/provider/unp4kc.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,301 +11,299 @@ part of 'unp4kc.dart'; // dart format off T _$identity(T value) => value; - /// @nodoc 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) - @pragma('vm:prefer-inline') - $Unp4kcStateCopyWith get copyWith => - _$Unp4kcStateCopyWithImpl(this as Unp4kcState, _$identity); + 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) +@pragma('vm:prefer-inline') +$Unp4kcStateCopyWith get copyWith => _$Unp4kcStateCopyWithImpl(this as Unp4kcState, _$identity); - @override - 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 +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)'; +} - @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 mixin class $Unp4kcStateCopyWith<$Res> { - factory $Unp4kcStateCopyWith( - Unp4kcState value, $Res Function(Unp4kcState) _then) = - _$Unp4kcStateCopyWithImpl; - @useResult - $Res call( - {bool startUp, - Map? files, - MemoryFileSystem? fs, - String curPath, - String? endMessage, - MapEntry? tempOpenFile, - String errorMessage}); -} +abstract mixin class $Unp4kcStateCopyWith<$Res> { + factory $Unp4kcStateCopyWith(Unp4kcState value, $Res Function(Unp4kcState) _then) = _$Unp4kcStateCopyWithImpl; +@useResult +$Res call({ + bool startUp, Map? files, MemoryFileSystem? fs, String curPath, String? endMessage, MapEntry? tempOpenFile, String errorMessage +}); + + + +} /// @nodoc -class _$Unp4kcStateCopyWithImpl<$Res> implements $Unp4kcStateCopyWith<$Res> { +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. - @pragma('vm:prefer-inline') - @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(_self.copyWith( - 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, - )); - } +/// Create a copy of Unp4kcState +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @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(_self.copyWith( +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, + )); +} + +} + + +/// Adds pattern-matching-related methods to [Unp4kcState]. +extension Unp4kcStatePatterns on Unp4kcState { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _Unp4kcState value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _Unp4kcState() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _Unp4kcState value) $default,){ +final _that = this; +switch (_that) { +case _Unp4kcState(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _Unp4kcState value)? $default,){ +final _that = this; +switch (_that) { +case _Unp4kcState() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool startUp, Map? files, MemoryFileSystem? fs, String curPath, String? endMessage, MapEntry? tempOpenFile, String errorMessage)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _Unp4kcState() when $default != null: +return $default(_that.startUp,_that.files,_that.fs,_that.curPath,_that.endMessage,_that.tempOpenFile,_that.errorMessage);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool startUp, Map? files, MemoryFileSystem? fs, String curPath, String? endMessage, MapEntry? tempOpenFile, String errorMessage) $default,) {final _that = this; +switch (_that) { +case _Unp4kcState(): +return $default(_that.startUp,_that.files,_that.fs,_that.curPath,_that.endMessage,_that.tempOpenFile,_that.errorMessage);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool startUp, Map? files, MemoryFileSystem? fs, String curPath, String? endMessage, MapEntry? tempOpenFile, String errorMessage)? $default,) {final _that = this; +switch (_that) { +case _Unp4kcState() when $default != null: +return $default(_that.startUp,_that.files,_that.fs,_that.curPath,_that.endMessage,_that.tempOpenFile,_that.errorMessage);case _: + return null; + +} +} + } /// @nodoc + class _Unp4kcState with DiagnosticableTreeMixin implements Unp4kcState { - const _Unp4kcState( - {required this.startUp, - final Map? files, - this.fs, - required this.curPath, - this.endMessage, - this.tempOpenFile, - this.errorMessage = ""}) - : _files = files; + const _Unp4kcState({required this.startUp, final Map? files, this.fs, required this.curPath, this.endMessage, this.tempOpenFile, this.errorMessage = ""}): _files = files; + - @override - final bool startUp; - final Map? _files; - @override - Map? get files { - final value = _files; - if (value == null) return null; - if (_files is EqualUnmodifiableMapView) return _files; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(value); - } +@override final bool startUp; + final Map? _files; +@override Map? get files { + final value = _files; + if (value == null) return null; + if (_files is EqualUnmodifiableMapView) return _files; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); +} - @override - final MemoryFileSystem? fs; - @override - final String curPath; - @override - final String? endMessage; - @override - final MapEntry? tempOpenFile; - @override - @JsonKey() - final String errorMessage; +@override final MemoryFileSystem? fs; +@override final String curPath; +@override final String? endMessage; +@override final MapEntry? tempOpenFile; +@override@JsonKey() final String errorMessage; - /// Create a copy of Unp4kcState - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$Unp4kcStateCopyWith<_Unp4kcState> get copyWith => - __$Unp4kcStateCopyWithImpl<_Unp4kcState>(this, _$identity); +/// Create a copy of Unp4kcState +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$Unp4kcStateCopyWith<_Unp4kcState> get copyWith => __$Unp4kcStateCopyWithImpl<_Unp4kcState>(this, _$identity); - @override - 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 +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)'; +} - @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 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}); -} +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> { +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. - @override - @pragma('vm:prefer-inline') - $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, - )); - } +/// Create a copy of Unp4kcState +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $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, + )); +} + + } // dart format on diff --git a/lib/provider/unp4kc.g.dart b/lib/provider/unp4kc.g.dart index 7d53f38..b204b22 100644 --- a/lib/provider/unp4kc.g.dart +++ b/lib/provider/unp4kc.g.dart @@ -12,13 +12,14 @@ String _$unp4kCModelHash() => r'636da3fe20d1fa94917dd63934f08f8dbffc8a9d'; @ProviderFor(Unp4kCModel) final unp4kCModelProvider = AutoDisposeNotifierProvider.internal( - Unp4kCModel.new, - name: r'unp4kCModelProvider', - debugGetCreateSourceHash: - const bool.fromEnvironment('dart.vm.product') ? null : _$unp4kCModelHash, - dependencies: null, - allTransitiveDependencies: null, -); + Unp4kCModel.new, + name: r'unp4kCModelProvider', + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') + ? null + : _$unp4kCModelHash, + dependencies: null, + allTransitiveDependencies: null, + ); typedef _$Unp4kCModel = AutoDisposeNotifier; // ignore_for_file: type=lint 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 f15fe86..23e2e06 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 @@ -48,7 +48,7 @@ class HomeGameLoginUIModel extends _$HomeGameLoginUIModel { final homeState = ref.read(homeUIModelProvider); if (!context.mounted) return; goWebView(context, S.current.home_action_login_rsi_account, - "https://robertsspaceindustries.com/en/connect?jumpto=%2Fconnect", + "https://robertsspaceindustries.com/en/connect?jumpto=/account/dashboard", loginMode: true, rsiLoginCallback: (message, ok) async { // dPrint( // "======rsiLoginCallback=== $ok ===== data==\n${json.encode(message)}"); 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 1beafb7..e346980 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,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,90 +11,47 @@ part of 'home_game_login_dialog_ui_model.dart'; // dart format off T _$identity(T value) => value; - /// @nodoc mixin _$HomeGameLoginState { - 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) - @pragma('vm:prefer-inline') - $HomeGameLoginStateCopyWith get copyWith => - _$HomeGameLoginStateCopyWithImpl( - this as HomeGameLoginState, _$identity); + 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) +@pragma('vm:prefer-inline') +$HomeGameLoginStateCopyWith get copyWith => _$HomeGameLoginStateCopyWithImpl(this as HomeGameLoginState, _$identity); - @override - 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)'; - } +@override +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 mixin class $HomeGameLoginStateCopyWith<$Res> { - factory $HomeGameLoginStateCopyWith( - HomeGameLoginState value, $Res Function(HomeGameLoginState) _then) = - _$HomeGameLoginStateCopyWithImpl; - @useResult - $Res call( - {int loginStatus, - String? nickname, - String? avatarUrl, - String? authToken, - String? webToken, - Map? releaseInfo, - RsiGameLibraryData? libraryData, - String? installPath, - bool? isDeviceSupportWinHello}); -} +abstract mixin class $HomeGameLoginStateCopyWith<$Res> { + factory $HomeGameLoginStateCopyWith(HomeGameLoginState value, $Res Function(HomeGameLoginState) _then) = _$HomeGameLoginStateCopyWithImpl; +@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> implements $HomeGameLoginStateCopyWith<$Res> { @@ -104,238 +60,244 @@ class _$HomeGameLoginStateCopyWithImpl<$Res> final HomeGameLoginState _self; final $Res Function(HomeGameLoginState) _then; - /// Create a copy of HomeGameLoginState - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @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(_self.copyWith( - 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?, - )); - } +/// Create a copy of HomeGameLoginState +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @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(_self.copyWith( +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?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [HomeGameLoginState]. +extension HomeGameLoginStatePatterns on HomeGameLoginState { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _LoginStatus value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _LoginStatus() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _LoginStatus value) $default,){ +final _that = this; +switch (_that) { +case _LoginStatus(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _LoginStatus value)? $default,){ +final _that = this; +switch (_that) { +case _LoginStatus() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( int loginStatus, String? nickname, String? avatarUrl, String? authToken, String? webToken, Map? releaseInfo, RsiGameLibraryData? libraryData, String? installPath, bool? isDeviceSupportWinHello)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _LoginStatus() when $default != null: +return $default(_that.loginStatus,_that.nickname,_that.avatarUrl,_that.authToken,_that.webToken,_that.releaseInfo,_that.libraryData,_that.installPath,_that.isDeviceSupportWinHello);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( int loginStatus, String? nickname, String? avatarUrl, String? authToken, String? webToken, Map? releaseInfo, RsiGameLibraryData? libraryData, String? installPath, bool? isDeviceSupportWinHello) $default,) {final _that = this; +switch (_that) { +case _LoginStatus(): +return $default(_that.loginStatus,_that.nickname,_that.avatarUrl,_that.authToken,_that.webToken,_that.releaseInfo,_that.libraryData,_that.installPath,_that.isDeviceSupportWinHello);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( int loginStatus, String? nickname, String? avatarUrl, String? authToken, String? webToken, Map? releaseInfo, RsiGameLibraryData? libraryData, String? installPath, bool? isDeviceSupportWinHello)? $default,) {final _that = this; +switch (_that) { +case _LoginStatus() when $default != null: +return $default(_that.loginStatus,_that.nickname,_that.avatarUrl,_that.authToken,_that.webToken,_that.releaseInfo,_that.libraryData,_that.installPath,_that.isDeviceSupportWinHello);case _: + return null; + +} +} + } /// @nodoc + class _LoginStatus implements HomeGameLoginState { - _LoginStatus( - {required this.loginStatus, - this.nickname, - this.avatarUrl, - this.authToken, - this.webToken, - final Map? releaseInfo, - this.libraryData, - this.installPath, - this.isDeviceSupportWinHello}) - : _releaseInfo = releaseInfo; + _LoginStatus({required this.loginStatus, this.nickname, this.avatarUrl, this.authToken, this.webToken, final Map? releaseInfo, this.libraryData, this.installPath, this.isDeviceSupportWinHello}): _releaseInfo = releaseInfo; + - @override - final int loginStatus; - @override - final String? nickname; - @override - final String? avatarUrl; - @override - final String? authToken; - @override - final String? webToken; - final Map? _releaseInfo; - @override - Map? get releaseInfo { - final value = _releaseInfo; - if (value == null) return null; - if (_releaseInfo is EqualUnmodifiableMapView) return _releaseInfo; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(value); - } +@override final int loginStatus; +@override final String? nickname; +@override final String? avatarUrl; +@override final String? authToken; +@override final String? webToken; + final Map? _releaseInfo; +@override Map? get releaseInfo { + final value = _releaseInfo; + if (value == null) return null; + if (_releaseInfo is EqualUnmodifiableMapView) return _releaseInfo; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); +} - @override - final RsiGameLibraryData? libraryData; - @override - final String? installPath; - @override - final bool? isDeviceSupportWinHello; +@override final RsiGameLibraryData? libraryData; +@override final String? installPath; +@override final bool? isDeviceSupportWinHello; - /// Create a copy of HomeGameLoginState - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$LoginStatusCopyWith<_LoginStatus> get copyWith => - __$LoginStatusCopyWithImpl<_LoginStatus>(this, _$identity); +/// Create a copy of HomeGameLoginState +/// with the given fields replaced by the non-null parameter values. +@override @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 _LoginStatus && - (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)'; - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _LoginStatus&&(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 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}); -} +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> { +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. - @override - @pragma('vm:prefer-inline') - $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?, - )); - } +/// Create a copy of HomeGameLoginState +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $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?, + )); +} + + } // dart format on diff --git a/lib/ui/home/dialogs/home_game_login_dialog_ui_model.g.dart b/lib/ui/home/dialogs/home_game_login_dialog_ui_model.g.dart index 5b61602..618e426 100644 --- a/lib/ui/home/dialogs/home_game_login_dialog_ui_model.g.dart +++ b/lib/ui/home/dialogs/home_game_login_dialog_ui_model.g.dart @@ -7,20 +7,23 @@ part of 'home_game_login_dialog_ui_model.dart'; // ************************************************************************** String _$homeGameLoginUIModelHash() => - r'85533839693681a697ea7e0b5de9ac766a46d41e'; + r'3cd0f87f1c71ce8a3731d4cfe69cbaf5b295ca9e'; /// See also [HomeGameLoginUIModel]. @ProviderFor(HomeGameLoginUIModel) -final homeGameLoginUIModelProvider = AutoDisposeNotifierProvider< - HomeGameLoginUIModel, HomeGameLoginState>.internal( - HomeGameLoginUIModel.new, - name: r'homeGameLoginUIModelProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$homeGameLoginUIModelHash, - dependencies: null, - allTransitiveDependencies: null, -); +final homeGameLoginUIModelProvider = + AutoDisposeNotifierProvider< + HomeGameLoginUIModel, + HomeGameLoginState + >.internal( + HomeGameLoginUIModel.new, + name: r'homeGameLoginUIModelProvider', + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') + ? null + : _$homeGameLoginUIModelHash, + dependencies: null, + allTransitiveDependencies: null, + ); typedef _$HomeGameLoginUIModel = AutoDisposeNotifier; // ignore_for_file: type=lint 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 5a2f1a3..d0d38bf 100644 --- a/lib/ui/home/downloader/home_downloader_ui_model.freezed.dart +++ b/lib/ui/home/downloader/home_downloader_ui_model.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,63 +11,47 @@ part of 'home_downloader_ui_model.dart'; // dart format off T _$identity(T value) => value; - /// @nodoc mixin _$HomeDownloaderUIState { - 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) - @pragma('vm:prefer-inline') - $HomeDownloaderUIStateCopyWith get copyWith => - _$HomeDownloaderUIStateCopyWithImpl( - this as HomeDownloaderUIState, _$identity); + 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) +@pragma('vm:prefer-inline') +$HomeDownloaderUIStateCopyWith get copyWith => _$HomeDownloaderUIStateCopyWithImpl(this as HomeDownloaderUIState, _$identity); - @override - 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)'; - } +@override +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 mixin class $HomeDownloaderUIStateCopyWith<$Res> { - factory $HomeDownloaderUIStateCopyWith(HomeDownloaderUIState value, - $Res Function(HomeDownloaderUIState) _then) = - _$HomeDownloaderUIStateCopyWithImpl; - @useResult - $Res call( - {List tasks, - List waitingTasks, - List stoppedTasks, - Aria2GlobalStat? globalStat}); -} +abstract mixin class $HomeDownloaderUIStateCopyWith<$Res> { + factory $HomeDownloaderUIStateCopyWith(HomeDownloaderUIState value, $Res Function(HomeDownloaderUIState) _then) = _$HomeDownloaderUIStateCopyWithImpl; +@useResult +$Res call({ + List tasks, List waitingTasks, List stoppedTasks, Aria2GlobalStat? globalStat +}); + + + +} /// @nodoc class _$HomeDownloaderUIStateCopyWithImpl<$Res> implements $HomeDownloaderUIStateCopyWith<$Res> { @@ -77,131 +60,218 @@ class _$HomeDownloaderUIStateCopyWithImpl<$Res> final HomeDownloaderUIState _self; final $Res Function(HomeDownloaderUIState) _then; - /// Create a copy of HomeDownloaderUIState - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? tasks = null, - Object? waitingTasks = null, - Object? stoppedTasks = null, - Object? globalStat = freezed, - }) { - return _then(_self.copyWith( - 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?, - )); - } +/// Create a copy of HomeDownloaderUIState +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? tasks = null,Object? waitingTasks = null,Object? stoppedTasks = null,Object? globalStat = freezed,}) { + return _then(_self.copyWith( +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?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [HomeDownloaderUIState]. +extension HomeDownloaderUIStatePatterns on HomeDownloaderUIState { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _HomeDownloaderUIState value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _HomeDownloaderUIState() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _HomeDownloaderUIState value) $default,){ +final _that = this; +switch (_that) { +case _HomeDownloaderUIState(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _HomeDownloaderUIState value)? $default,){ +final _that = this; +switch (_that) { +case _HomeDownloaderUIState() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( List tasks, List waitingTasks, List stoppedTasks, Aria2GlobalStat? globalStat)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _HomeDownloaderUIState() when $default != null: +return $default(_that.tasks,_that.waitingTasks,_that.stoppedTasks,_that.globalStat);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( List tasks, List waitingTasks, List stoppedTasks, Aria2GlobalStat? globalStat) $default,) {final _that = this; +switch (_that) { +case _HomeDownloaderUIState(): +return $default(_that.tasks,_that.waitingTasks,_that.stoppedTasks,_that.globalStat);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( List tasks, List waitingTasks, List stoppedTasks, Aria2GlobalStat? globalStat)? $default,) {final _that = this; +switch (_that) { +case _HomeDownloaderUIState() when $default != null: +return $default(_that.tasks,_that.waitingTasks,_that.stoppedTasks,_that.globalStat);case _: + return null; + +} +} + } /// @nodoc + class _HomeDownloaderUIState implements HomeDownloaderUIState { - _HomeDownloaderUIState( - {final List tasks = const [], - final List waitingTasks = const [], - final List stoppedTasks = const [], - this.globalStat}) - : _tasks = tasks, - _waitingTasks = waitingTasks, - _stoppedTasks = stoppedTasks; + _HomeDownloaderUIState({final List tasks = const [], final List waitingTasks = const [], final List stoppedTasks = const [], this.globalStat}): _tasks = tasks,_waitingTasks = waitingTasks,_stoppedTasks = stoppedTasks; + - final List _tasks; - @override - @JsonKey() - List get tasks { - if (_tasks is EqualUnmodifiableListView) return _tasks; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_tasks); - } + final List _tasks; +@override@JsonKey() List get tasks { + if (_tasks is EqualUnmodifiableListView) return _tasks; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_tasks); +} - final List _waitingTasks; - @override - @JsonKey() - List get waitingTasks { - if (_waitingTasks is EqualUnmodifiableListView) return _waitingTasks; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_waitingTasks); - } + final List _waitingTasks; +@override@JsonKey() List get waitingTasks { + if (_waitingTasks is EqualUnmodifiableListView) return _waitingTasks; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_waitingTasks); +} - final List _stoppedTasks; - @override - @JsonKey() - List get stoppedTasks { - if (_stoppedTasks is EqualUnmodifiableListView) return _stoppedTasks; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_stoppedTasks); - } + final List _stoppedTasks; +@override@JsonKey() List get stoppedTasks { + if (_stoppedTasks is EqualUnmodifiableListView) return _stoppedTasks; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_stoppedTasks); +} - @override - final Aria2GlobalStat? globalStat; +@override final Aria2GlobalStat? globalStat; - /// Create a copy of HomeDownloaderUIState - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$HomeDownloaderUIStateCopyWith<_HomeDownloaderUIState> get copyWith => - __$HomeDownloaderUIStateCopyWithImpl<_HomeDownloaderUIState>( - this, _$identity); +/// Create a copy of HomeDownloaderUIState +/// with the given fields replaced by the non-null parameter values. +@override @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 _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)'; - } +@override +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 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}); -} +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> { @@ -210,35 +280,19 @@ class __$HomeDownloaderUIStateCopyWithImpl<$Res> final _HomeDownloaderUIState _self; final $Res Function(_HomeDownloaderUIState) _then; - /// Create a copy of HomeDownloaderUIState - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $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?, - )); - } +/// Create a copy of HomeDownloaderUIState +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $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?, + )); +} + + } // dart format on diff --git a/lib/ui/home/downloader/home_downloader_ui_model.g.dart b/lib/ui/home/downloader/home_downloader_ui_model.g.dart index 463dd0e..1c1f3b1 100644 --- a/lib/ui/home/downloader/home_downloader_ui_model.g.dart +++ b/lib/ui/home/downloader/home_downloader_ui_model.g.dart @@ -11,16 +11,19 @@ String _$homeDownloaderUIModelHash() => /// See also [HomeDownloaderUIModel]. @ProviderFor(HomeDownloaderUIModel) -final homeDownloaderUIModelProvider = AutoDisposeNotifierProvider< - HomeDownloaderUIModel, HomeDownloaderUIState>.internal( - HomeDownloaderUIModel.new, - name: r'homeDownloaderUIModelProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$homeDownloaderUIModelHash, - dependencies: null, - allTransitiveDependencies: null, -); +final homeDownloaderUIModelProvider = + AutoDisposeNotifierProvider< + HomeDownloaderUIModel, + HomeDownloaderUIState + >.internal( + HomeDownloaderUIModel.new, + name: r'homeDownloaderUIModelProvider', + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') + ? null + : _$homeDownloaderUIModelHash, + dependencies: null, + allTransitiveDependencies: null, + ); typedef _$HomeDownloaderUIModel = AutoDisposeNotifier; // ignore_for_file: type=lint 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 3633ec5..2217959 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,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,69 +11,47 @@ part of 'game_doctor_ui_model.dart'; // dart format off T _$identity(T value) => value; - /// @nodoc mixin _$HomeGameDoctorState { - 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) - @pragma('vm:prefer-inline') - $HomeGameDoctorStateCopyWith get copyWith => - _$HomeGameDoctorStateCopyWithImpl( - this as HomeGameDoctorState, _$identity); + 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) +@pragma('vm:prefer-inline') +$HomeGameDoctorStateCopyWith get copyWith => _$HomeGameDoctorStateCopyWithImpl(this as HomeGameDoctorState, _$identity); - @override - 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)'; - } +@override +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 mixin class $HomeGameDoctorStateCopyWith<$Res> { - factory $HomeGameDoctorStateCopyWith( - HomeGameDoctorState value, $Res Function(HomeGameDoctorState) _then) = - _$HomeGameDoctorStateCopyWithImpl; - @useResult - $Res call( - {bool isChecking, - bool isFixing, - String lastScreenInfo, - String isFixingString, - List>? checkResult}); -} +abstract mixin class $HomeGameDoctorStateCopyWith<$Res> { + factory $HomeGameDoctorStateCopyWith(HomeGameDoctorState value, $Res Function(HomeGameDoctorState) _then) = _$HomeGameDoctorStateCopyWithImpl; +@useResult +$Res call({ + bool isChecking, bool isFixing, String lastScreenInfo, String isFixingString, List>? checkResult +}); + + + +} /// @nodoc class _$HomeGameDoctorStateCopyWithImpl<$Res> implements $HomeGameDoctorStateCopyWith<$Res> { @@ -83,132 +60,210 @@ class _$HomeGameDoctorStateCopyWithImpl<$Res> final HomeGameDoctorState _self; final $Res Function(HomeGameDoctorState) _then; - /// Create a copy of HomeGameDoctorState - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? isChecking = null, - Object? isFixing = null, - Object? lastScreenInfo = null, - Object? isFixingString = null, - Object? checkResult = freezed, - }) { - return _then(_self.copyWith( - 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>?, - )); - } +/// Create a copy of HomeGameDoctorState +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? isChecking = null,Object? isFixing = null,Object? lastScreenInfo = null,Object? isFixingString = null,Object? checkResult = freezed,}) { + return _then(_self.copyWith( +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>?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [HomeGameDoctorState]. +extension HomeGameDoctorStatePatterns on HomeGameDoctorState { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _HomeGameDoctorState value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _HomeGameDoctorState() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _HomeGameDoctorState value) $default,){ +final _that = this; +switch (_that) { +case _HomeGameDoctorState(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _HomeGameDoctorState value)? $default,){ +final _that = this; +switch (_that) { +case _HomeGameDoctorState() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool isChecking, bool isFixing, String lastScreenInfo, String isFixingString, List>? checkResult)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _HomeGameDoctorState() when $default != null: +return $default(_that.isChecking,_that.isFixing,_that.lastScreenInfo,_that.isFixingString,_that.checkResult);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool isChecking, bool isFixing, String lastScreenInfo, String isFixingString, List>? checkResult) $default,) {final _that = this; +switch (_that) { +case _HomeGameDoctorState(): +return $default(_that.isChecking,_that.isFixing,_that.lastScreenInfo,_that.isFixingString,_that.checkResult);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool isChecking, bool isFixing, String lastScreenInfo, String isFixingString, List>? checkResult)? $default,) {final _that = this; +switch (_that) { +case _HomeGameDoctorState() when $default != null: +return $default(_that.isChecking,_that.isFixing,_that.lastScreenInfo,_that.isFixingString,_that.checkResult);case _: + return null; + +} +} + } /// @nodoc + class _HomeGameDoctorState implements HomeGameDoctorState { - _HomeGameDoctorState( - {this.isChecking = false, - this.isFixing = false, - this.lastScreenInfo = "", - this.isFixingString = "", - final List>? checkResult}) - : _checkResult = checkResult; + _HomeGameDoctorState({this.isChecking = false, this.isFixing = false, this.lastScreenInfo = "", this.isFixingString = "", final List>? checkResult}): _checkResult = checkResult; + - @override - @JsonKey() - final bool isChecking; - @override - @JsonKey() - final bool isFixing; - @override - @JsonKey() - final String lastScreenInfo; - @override - @JsonKey() - final String isFixingString; - final List>? _checkResult; - @override - List>? get checkResult { - final value = _checkResult; - if (value == null) return null; - if (_checkResult is EqualUnmodifiableListView) return _checkResult; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } +@override@JsonKey() final bool isChecking; +@override@JsonKey() final bool isFixing; +@override@JsonKey() final String lastScreenInfo; +@override@JsonKey() final String isFixingString; + final List>? _checkResult; +@override List>? get checkResult { + final value = _checkResult; + if (value == null) return null; + if (_checkResult is EqualUnmodifiableListView) return _checkResult; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); +} - /// Create a copy of HomeGameDoctorState - /// with the given fields replaced by the non-null parameter values. - @override - @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 _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)); - } +/// Create a copy of HomeGameDoctorState +/// with the given fields replaced by the non-null parameter values. +@override @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 _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)'; +} - @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 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}); -} +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> { @@ -217,40 +272,20 @@ class __$HomeGameDoctorStateCopyWithImpl<$Res> final _HomeGameDoctorState _self; final $Res Function(_HomeGameDoctorState) _then; - /// Create a copy of HomeGameDoctorState - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $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>?, - )); - } +/// Create a copy of HomeGameDoctorState +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $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>?, + )); +} + + } // dart format on diff --git a/lib/ui/home/game_doctor/game_doctor_ui_model.g.dart b/lib/ui/home/game_doctor/game_doctor_ui_model.g.dart index 9ed1e86..0ebe535 100644 --- a/lib/ui/home/game_doctor/game_doctor_ui_model.g.dart +++ b/lib/ui/home/game_doctor/game_doctor_ui_model.g.dart @@ -11,16 +11,19 @@ String _$homeGameDoctorUIModelHash() => /// See also [HomeGameDoctorUIModel]. @ProviderFor(HomeGameDoctorUIModel) -final homeGameDoctorUIModelProvider = AutoDisposeNotifierProvider< - HomeGameDoctorUIModel, HomeGameDoctorState>.internal( - HomeGameDoctorUIModel.new, - name: r'homeGameDoctorUIModelProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$homeGameDoctorUIModelHash, - dependencies: null, - allTransitiveDependencies: null, -); +final homeGameDoctorUIModelProvider = + AutoDisposeNotifierProvider< + HomeGameDoctorUIModel, + HomeGameDoctorState + >.internal( + HomeGameDoctorUIModel.new, + name: r'homeGameDoctorUIModelProvider', + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') + ? null + : _$homeGameDoctorUIModelHash, + dependencies: null, + allTransitiveDependencies: null, + ); typedef _$HomeGameDoctorUIModel = AutoDisposeNotifier; // ignore_for_file: type=lint diff --git a/lib/ui/home/home_ui_model.freezed.dart b/lib/ui/home/home_ui_model.freezed.dart index 099f9f5..0377b31 100644 --- a/lib/ui/home/home_ui_model.freezed.dart +++ b/lib/ui/home/home_ui_model.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,111 +11,47 @@ part of 'home_ui_model.dart'; // dart format off T _$identity(T value) => value; - /// @nodoc mixin _$HomeUIModelState { - 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) - @pragma('vm:prefer-inline') - $HomeUIModelStateCopyWith get copyWith => - _$HomeUIModelStateCopyWithImpl( - this as HomeUIModelState, _$identity); + 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) +@pragma('vm:prefer-inline') +$HomeUIModelStateCopyWith get copyWith => _$HomeUIModelStateCopyWithImpl(this as HomeUIModelState, _$identity); - @override - 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)'; - } +@override +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 mixin class $HomeUIModelStateCopyWith<$Res> { - factory $HomeUIModelStateCopyWith( - HomeUIModelState value, $Res Function(HomeUIModelState) _then) = - _$HomeUIModelStateCopyWithImpl; - @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}); -} +abstract mixin class $HomeUIModelStateCopyWith<$Res> { + factory $HomeUIModelStateCopyWith(HomeUIModelState value, $Res Function(HomeUIModelState) _then) = _$HomeUIModelStateCopyWithImpl; +@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> { @@ -125,272 +60,262 @@ class _$HomeUIModelStateCopyWithImpl<$Res> final HomeUIModelState _self; final $Res Function(HomeUIModelState) _then; - /// Create a copy of HomeUIModelState - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @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(_self.copyWith( - 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, - )); - } +/// Create a copy of HomeUIModelState +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @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(_self.copyWith( +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, + )); +} + +} + + +/// Adds pattern-matching-related methods to [HomeUIModelState]. +extension HomeUIModelStatePatterns on HomeUIModelState { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _HomeUIModelState value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _HomeUIModelState() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _HomeUIModelState value) $default,){ +final _that = this; +switch (_that) { +case _HomeUIModelState(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _HomeUIModelState value)? $default,){ +final _that = this; +switch (_that) { +case _HomeUIModelState() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( 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)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _HomeUIModelState() when $default != null: +return $default(_that.appPlacardData,_that.isFixing,_that.isFixingString,_that.scInstalledPath,_that.scInstallPaths,_that.webLocalizationVersionsData,_that.lastScreenInfo,_that.rssVideoItems,_that.rssTextItems,_that.localizationUpdateInfo,_that.scServerStatus,_that.countdownFestivalListData,_that.isGameRunning);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( 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) $default,) {final _that = this; +switch (_that) { +case _HomeUIModelState(): +return $default(_that.appPlacardData,_that.isFixing,_that.isFixingString,_that.scInstalledPath,_that.scInstallPaths,_that.webLocalizationVersionsData,_that.lastScreenInfo,_that.rssVideoItems,_that.rssTextItems,_that.localizationUpdateInfo,_that.scServerStatus,_that.countdownFestivalListData,_that.isGameRunning);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( 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)? $default,) {final _that = this; +switch (_that) { +case _HomeUIModelState() when $default != null: +return $default(_that.appPlacardData,_that.isFixing,_that.isFixingString,_that.scInstalledPath,_that.scInstallPaths,_that.webLocalizationVersionsData,_that.lastScreenInfo,_that.rssVideoItems,_that.rssTextItems,_that.localizationUpdateInfo,_that.scServerStatus,_that.countdownFestivalListData,_that.isGameRunning);case _: + return null; + +} +} + } /// @nodoc + class _HomeUIModelState implements HomeUIModelState { - _HomeUIModelState( - {this.appPlacardData, - this.isFixing = false, - this.isFixingString = "", - this.scInstalledPath, - final List scInstallPaths = const [], - this.webLocalizationVersionsData, - this.lastScreenInfo = "", - final List? rssVideoItems, - final List? rssTextItems, - this.localizationUpdateInfo, - final List? scServerStatus, - final List? countdownFestivalListData, - final Map isGameRunning = const {}}) - : _scInstallPaths = scInstallPaths, - _rssVideoItems = rssVideoItems, - _rssTextItems = rssTextItems, - _scServerStatus = scServerStatus, - _countdownFestivalListData = countdownFestivalListData, - _isGameRunning = isGameRunning; + _HomeUIModelState({this.appPlacardData, this.isFixing = false, this.isFixingString = "", this.scInstalledPath, final List scInstallPaths = const [], this.webLocalizationVersionsData, this.lastScreenInfo = "", final List? rssVideoItems, final List? rssTextItems, this.localizationUpdateInfo, final List? scServerStatus, final List? countdownFestivalListData, final Map isGameRunning = const {}}): _scInstallPaths = scInstallPaths,_rssVideoItems = rssVideoItems,_rssTextItems = rssTextItems,_scServerStatus = scServerStatus,_countdownFestivalListData = countdownFestivalListData,_isGameRunning = isGameRunning; + - @override - final AppPlacardData? appPlacardData; - @override - @JsonKey() - final bool isFixing; - @override - @JsonKey() - final String isFixingString; - @override - final String? scInstalledPath; - final List _scInstallPaths; - @override - @JsonKey() - List get scInstallPaths { - if (_scInstallPaths is EqualUnmodifiableListView) return _scInstallPaths; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_scInstallPaths); - } +@override final AppPlacardData? appPlacardData; +@override@JsonKey() final bool isFixing; +@override@JsonKey() final String isFixingString; +@override final String? scInstalledPath; + final List _scInstallPaths; +@override@JsonKey() List get scInstallPaths { + if (_scInstallPaths is EqualUnmodifiableListView) return _scInstallPaths; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_scInstallPaths); +} - @override - final AppWebLocalizationVersionsData? webLocalizationVersionsData; - @override - @JsonKey() - final String lastScreenInfo; - final List? _rssVideoItems; - @override - List? get rssVideoItems { - final value = _rssVideoItems; - if (value == null) return null; - if (_rssVideoItems is EqualUnmodifiableListView) return _rssVideoItems; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } +@override final AppWebLocalizationVersionsData? webLocalizationVersionsData; +@override@JsonKey() final String lastScreenInfo; + final List? _rssVideoItems; +@override List? get rssVideoItems { + final value = _rssVideoItems; + if (value == null) return null; + if (_rssVideoItems is EqualUnmodifiableListView) return _rssVideoItems; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); +} - final List? _rssTextItems; - @override - List? get rssTextItems { - final value = _rssTextItems; - if (value == null) return null; - if (_rssTextItems is EqualUnmodifiableListView) return _rssTextItems; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } + final List? _rssTextItems; +@override List? get rssTextItems { + final value = _rssTextItems; + if (value == null) return null; + if (_rssTextItems is EqualUnmodifiableListView) return _rssTextItems; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); +} - @override - final MapEntry? localizationUpdateInfo; - final List? _scServerStatus; - @override - List? get scServerStatus { - final value = _scServerStatus; - if (value == null) return null; - if (_scServerStatus is EqualUnmodifiableListView) return _scServerStatus; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } +@override final MapEntry? localizationUpdateInfo; + final List? _scServerStatus; +@override List? get scServerStatus { + final value = _scServerStatus; + if (value == null) return null; + if (_scServerStatus is EqualUnmodifiableListView) return _scServerStatus; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); +} - final List? _countdownFestivalListData; - @override - List? get countdownFestivalListData { - final value = _countdownFestivalListData; - if (value == null) return null; - if (_countdownFestivalListData is EqualUnmodifiableListView) - return _countdownFestivalListData; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } + final List? _countdownFestivalListData; +@override List? get countdownFestivalListData { + final value = _countdownFestivalListData; + if (value == null) return null; + if (_countdownFestivalListData is EqualUnmodifiableListView) return _countdownFestivalListData; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); +} - final Map _isGameRunning; - @override - @JsonKey() - Map get isGameRunning { - if (_isGameRunning is EqualUnmodifiableMapView) return _isGameRunning; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(_isGameRunning); - } + final Map _isGameRunning; +@override@JsonKey() Map get isGameRunning { + if (_isGameRunning is EqualUnmodifiableMapView) return _isGameRunning; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(_isGameRunning); +} - /// Create a copy of HomeUIModelState - /// with the given fields replaced by the non-null parameter values. - @override - @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 _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)); - } +/// Create a copy of HomeUIModelState +/// with the given fields replaced by the non-null parameter values. +@override @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 _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)'; +} - @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 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}); -} +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> { @@ -399,80 +324,28 @@ class __$HomeUIModelStateCopyWithImpl<$Res> final _HomeUIModelState _self; final $Res Function(_HomeUIModelState) _then; - /// Create a copy of HomeUIModelState - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $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, - )); - } +/// Create a copy of HomeUIModelState +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $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, + )); +} + + } // dart format on diff --git a/lib/ui/home/home_ui_model.g.dart b/lib/ui/home/home_ui_model.g.dart index ae8141f..9bd7adf 100644 --- a/lib/ui/home/home_ui_model.g.dart +++ b/lib/ui/home/home_ui_model.g.dart @@ -12,13 +12,14 @@ String _$homeUIModelHash() => r'8bde330ebc2cd73f76d2d49df8b328f301d42e44'; @ProviderFor(HomeUIModel) final homeUIModelProvider = AutoDisposeNotifierProvider.internal( - HomeUIModel.new, - name: r'homeUIModelProvider', - debugGetCreateSourceHash: - const bool.fromEnvironment('dart.vm.product') ? null : _$homeUIModelHash, - dependencies: null, - allTransitiveDependencies: null, -); + HomeUIModel.new, + name: r'homeUIModelProvider', + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') + ? null + : _$homeUIModelHash, + dependencies: null, + allTransitiveDependencies: null, + ); typedef _$HomeUIModel = AutoDisposeNotifier; // ignore_for_file: type=lint 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 3606802..6c35b62 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,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,67 +11,47 @@ part of 'input_method_dialog_ui_model.dart'; // dart format off T _$identity(T value) => value; - /// @nodoc mixin _$InputMethodDialogUIState { - 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) - @pragma('vm:prefer-inline') - $InputMethodDialogUIStateCopyWith get copyWith => - _$InputMethodDialogUIStateCopyWithImpl( - this as InputMethodDialogUIState, _$identity); + 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) +@pragma('vm:prefer-inline') +$InputMethodDialogUIStateCopyWith get copyWith => _$InputMethodDialogUIStateCopyWithImpl(this as InputMethodDialogUIState, _$identity); - @override - 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)'; - } +@override +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 mixin class $InputMethodDialogUIStateCopyWith<$Res> { - factory $InputMethodDialogUIStateCopyWith(InputMethodDialogUIState value, - $Res Function(InputMethodDialogUIState) _then) = - _$InputMethodDialogUIStateCopyWithImpl; - @useResult - $Res call( - {Map? keyMaps, - Map? worldMaps, - bool enableAutoCopy, - bool isEnableAutoTranslate, - bool isAutoTranslateWorking}); -} +abstract mixin class $InputMethodDialogUIStateCopyWith<$Res> { + factory $InputMethodDialogUIStateCopyWith(InputMethodDialogUIState value, $Res Function(InputMethodDialogUIState) _then) = _$InputMethodDialogUIStateCopyWithImpl; +@useResult +$Res call({ + Map? keyMaps, Map? worldMaps, bool enableAutoCopy, bool isEnableAutoTranslate, bool isAutoTranslateWorking +}); + + + +} /// @nodoc class _$InputMethodDialogUIStateCopyWithImpl<$Res> implements $InputMethodDialogUIStateCopyWith<$Res> { @@ -81,139 +60,218 @@ class _$InputMethodDialogUIStateCopyWithImpl<$Res> final InputMethodDialogUIState _self; final $Res Function(InputMethodDialogUIState) _then; - /// Create a copy of InputMethodDialogUIState - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? keyMaps = freezed, - Object? worldMaps = freezed, - Object? enableAutoCopy = null, - Object? isEnableAutoTranslate = null, - Object? isAutoTranslateWorking = null, - }) { - return _then(_self.copyWith( - keyMaps: freezed == keyMaps - ? _self.keyMaps - : keyMaps // ignore: cast_nullable_to_non_nullable - as Map?, - worldMaps: 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, - )); - } +/// Create a copy of InputMethodDialogUIState +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? keyMaps = freezed,Object? worldMaps = freezed,Object? enableAutoCopy = null,Object? isEnableAutoTranslate = null,Object? isAutoTranslateWorking = null,}) { + return _then(_self.copyWith( +keyMaps: freezed == keyMaps ? _self.keyMaps : keyMaps // ignore: cast_nullable_to_non_nullable +as Map?,worldMaps: 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, + )); +} + +} + + +/// Adds pattern-matching-related methods to [InputMethodDialogUIState]. +extension InputMethodDialogUIStatePatterns on InputMethodDialogUIState { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _InputMethodDialogUIState value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _InputMethodDialogUIState() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _InputMethodDialogUIState value) $default,){ +final _that = this; +switch (_that) { +case _InputMethodDialogUIState(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _InputMethodDialogUIState value)? $default,){ +final _that = this; +switch (_that) { +case _InputMethodDialogUIState() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( Map? keyMaps, Map? worldMaps, bool enableAutoCopy, bool isEnableAutoTranslate, bool isAutoTranslateWorking)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _InputMethodDialogUIState() when $default != null: +return $default(_that.keyMaps,_that.worldMaps,_that.enableAutoCopy,_that.isEnableAutoTranslate,_that.isAutoTranslateWorking);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( Map? keyMaps, Map? worldMaps, bool enableAutoCopy, bool isEnableAutoTranslate, bool isAutoTranslateWorking) $default,) {final _that = this; +switch (_that) { +case _InputMethodDialogUIState(): +return $default(_that.keyMaps,_that.worldMaps,_that.enableAutoCopy,_that.isEnableAutoTranslate,_that.isAutoTranslateWorking);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( Map? keyMaps, Map? worldMaps, bool enableAutoCopy, bool isEnableAutoTranslate, bool isAutoTranslateWorking)? $default,) {final _that = this; +switch (_that) { +case _InputMethodDialogUIState() when $default != null: +return $default(_that.keyMaps,_that.worldMaps,_that.enableAutoCopy,_that.isEnableAutoTranslate,_that.isAutoTranslateWorking);case _: + return null; + +} +} + } /// @nodoc + class _InputMethodDialogUIState implements InputMethodDialogUIState { - _InputMethodDialogUIState( - final Map? keyMaps, final Map? worldMaps, - {this.enableAutoCopy = false, - this.isEnableAutoTranslate = false, - this.isAutoTranslateWorking = false}) - : _keyMaps = keyMaps, - _worldMaps = worldMaps; + _InputMethodDialogUIState(final Map? keyMaps, final Map? worldMaps, {this.enableAutoCopy = false, this.isEnableAutoTranslate = false, this.isAutoTranslateWorking = false}): _keyMaps = keyMaps,_worldMaps = worldMaps; + - final Map? _keyMaps; - @override - Map? get keyMaps { - final value = _keyMaps; - if (value == null) return null; - if (_keyMaps is EqualUnmodifiableMapView) return _keyMaps; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(value); - } + final Map? _keyMaps; +@override Map? get keyMaps { + final value = _keyMaps; + if (value == null) return null; + if (_keyMaps is EqualUnmodifiableMapView) return _keyMaps; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); +} - final Map? _worldMaps; - @override - Map? get worldMaps { - final value = _worldMaps; - if (value == null) return null; - if (_worldMaps is EqualUnmodifiableMapView) return _worldMaps; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(value); - } + final Map? _worldMaps; +@override Map? get worldMaps { + final value = _worldMaps; + if (value == null) return null; + if (_worldMaps is EqualUnmodifiableMapView) return _worldMaps; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); +} - @override - @JsonKey() - final bool enableAutoCopy; - @override - @JsonKey() - final bool isEnableAutoTranslate; - @override - @JsonKey() - final bool isAutoTranslateWorking; +@override@JsonKey() final bool enableAutoCopy; +@override@JsonKey() final bool isEnableAutoTranslate; +@override@JsonKey() final bool isAutoTranslateWorking; - /// Create a copy of InputMethodDialogUIState - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$InputMethodDialogUIStateCopyWith<_InputMethodDialogUIState> get copyWith => - __$InputMethodDialogUIStateCopyWithImpl<_InputMethodDialogUIState>( - this, _$identity); +/// Create a copy of InputMethodDialogUIState +/// with the given fields replaced by the non-null parameter values. +@override @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 _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)'; - } +@override +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 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}); -} +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> { @@ -222,40 +280,20 @@ class __$InputMethodDialogUIStateCopyWithImpl<$Res> final _InputMethodDialogUIState _self; final $Res Function(_InputMethodDialogUIState) _then; - /// Create a copy of InputMethodDialogUIState - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $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, - )); - } +/// Create a copy of InputMethodDialogUIState +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $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, + )); +} + + } // dart format on diff --git a/lib/ui/home/input_method/input_method_dialog_ui_model.g.dart b/lib/ui/home/input_method/input_method_dialog_ui_model.g.dart index 918ba65..52972c4 100644 --- a/lib/ui/home/input_method/input_method_dialog_ui_model.g.dart +++ b/lib/ui/home/input_method/input_method_dialog_ui_model.g.dart @@ -11,18 +11,21 @@ String _$inputMethodDialogUIModelHash() => /// See also [InputMethodDialogUIModel]. @ProviderFor(InputMethodDialogUIModel) -final inputMethodDialogUIModelProvider = AutoDisposeNotifierProvider< - InputMethodDialogUIModel, InputMethodDialogUIState>.internal( - InputMethodDialogUIModel.new, - name: r'inputMethodDialogUIModelProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$inputMethodDialogUIModelHash, - dependencies: null, - allTransitiveDependencies: null, -); +final inputMethodDialogUIModelProvider = + AutoDisposeNotifierProvider< + InputMethodDialogUIModel, + InputMethodDialogUIState + >.internal( + InputMethodDialogUIModel.new, + name: r'inputMethodDialogUIModelProvider', + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') + ? null + : _$inputMethodDialogUIModelHash, + dependencies: null, + allTransitiveDependencies: null, + ); -typedef _$InputMethodDialogUIModel - = AutoDisposeNotifier; +typedef _$InputMethodDialogUIModel = + AutoDisposeNotifier; // ignore_for_file: type=lint // ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package diff --git a/lib/ui/home/input_method/server.freezed.dart b/lib/ui/home/input_method/server.freezed.dart index 7d15345..c263c95 100644 --- a/lib/ui/home/input_method/server.freezed.dart +++ b/lib/ui/home/input_method/server.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,50 +11,47 @@ part of 'server.dart'; // dart format off T _$identity(T value) => value; - /// @nodoc mixin _$InputMethodServerState { - 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 => - _$InputMethodServerStateCopyWithImpl( - this as InputMethodServerState, _$identity); + 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 => _$InputMethodServerStateCopyWithImpl(this as InputMethodServerState, _$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)'; - } +@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> { - factory $InputMethodServerStateCopyWith(InputMethodServerState value, - $Res Function(InputMethodServerState) _then) = - _$InputMethodServerStateCopyWithImpl; - @useResult - $Res call({bool isServerStartup, String? serverAddressText}); -} +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> { @@ -64,80 +60,196 @@ class _$InputMethodServerStateCopyWithImpl<$Res> 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?, - )); - } +/// 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?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [InputMethodServerState]. +extension InputMethodServerStatePatterns on InputMethodServerState { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _InputMethodServerState value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _InputMethodServerState() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _InputMethodServerState value) $default,){ +final _that = this; +switch (_that) { +case _InputMethodServerState(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _InputMethodServerState value)? $default,){ +final _that = this; +switch (_that) { +case _InputMethodServerState() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool isServerStartup, String? serverAddressText)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _InputMethodServerState() when $default != null: +return $default(_that.isServerStartup,_that.serverAddressText);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool isServerStartup, String? serverAddressText) $default,) {final _that = this; +switch (_that) { +case _InputMethodServerState(): +return $default(_that.isServerStartup,_that.serverAddressText);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool isServerStartup, String? serverAddressText)? $default,) {final _that = this; +switch (_that) { +case _InputMethodServerState() when $default != null: +return $default(_that.isServerStartup,_that.serverAddressText);case _: + return null; + +} +} + } /// @nodoc + class _InputMethodServerState implements InputMethodServerState { - const _InputMethodServerState( - {this.isServerStartup = false, this.serverAddressText}); + const _InputMethodServerState({this.isServerStartup = false, this.serverAddressText}); + - @override - @JsonKey() - final bool isServerStartup; - @override - final String? 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); +/// 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)'; - } +@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}); -} +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> { @@ -146,25 +258,17 @@ class __$InputMethodServerStateCopyWithImpl<$Res> 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') - $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?, - )); - } +/// Create a copy of InputMethodServerState +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $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?, + )); +} + + } // dart format on diff --git a/lib/ui/home/input_method/server.g.dart b/lib/ui/home/input_method/server.g.dart index eb65455..0fbfe02 100644 --- a/lib/ui/home/input_method/server.g.dart +++ b/lib/ui/home/input_method/server.g.dart @@ -10,16 +10,19 @@ String _$inputMethodServerHash() => r'58ff318c051f16c76f620258520aadedbdd5057c'; /// See also [InputMethodServer]. @ProviderFor(InputMethodServer) -final inputMethodServerProvider = AutoDisposeNotifierProvider.internal( - InputMethodServer.new, - name: r'inputMethodServerProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$inputMethodServerHash, - dependencies: null, - allTransitiveDependencies: null, -); +final inputMethodServerProvider = + AutoDisposeNotifierProvider< + InputMethodServer, + InputMethodServerState + >.internal( + InputMethodServer.new, + name: r'inputMethodServerProvider', + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') + ? null + : _$inputMethodServerHash, + dependencies: null, + allTransitiveDependencies: null, + ); typedef _$InputMethodServer = AutoDisposeNotifier; // ignore_for_file: type=lint diff --git a/lib/ui/home/input_method/server_qr_dialog_ui.g.dart b/lib/ui/home/input_method/server_qr_dialog_ui.g.dart index 6de2f99..40aef76 100644 --- a/lib/ui/home/input_method/server_qr_dialog_ui.g.dart +++ b/lib/ui/home/input_method/server_qr_dialog_ui.g.dart @@ -12,14 +12,14 @@ String _$serverQrStateHash() => r'06f5ab53e1d6718f2a6eb0078a1adc3778787ed0'; @ProviderFor(ServerQrState) final serverQrStateProvider = AutoDisposeNotifierProvider.internal( - ServerQrState.new, - name: r'serverQrStateProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$serverQrStateHash, - dependencies: null, - allTransitiveDependencies: null, -); + ServerQrState.new, + name: r'serverQrStateProvider', + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') + ? null + : _$serverQrStateHash, + dependencies: null, + allTransitiveDependencies: null, + ); typedef _$ServerQrState = AutoDisposeNotifier; // ignore_for_file: type=lint 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 cc9c39b..6f406a4 100644 --- a/lib/ui/home/localization/advanced_localization_ui_model.freezed.dart +++ b/lib/ui/home/localization/advanced_localization_ui_model.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,90 +11,47 @@ part of 'advanced_localization_ui_model.dart'; // dart format off T _$identity(T value) => value; - /// @nodoc mixin _$AdvancedLocalizationUIState { - 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) - @pragma('vm:prefer-inline') - $AdvancedLocalizationUIStateCopyWith - get copyWith => _$AdvancedLocalizationUIStateCopyWithImpl< - AdvancedLocalizationUIState>( - this as AdvancedLocalizationUIState, _$identity); + 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) +@pragma('vm:prefer-inline') +$AdvancedLocalizationUIStateCopyWith get copyWith => _$AdvancedLocalizationUIStateCopyWithImpl(this as AdvancedLocalizationUIState, _$identity); - @override - 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)'; - } +@override +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 mixin class $AdvancedLocalizationUIStateCopyWith<$Res> { - factory $AdvancedLocalizationUIStateCopyWith( - AdvancedLocalizationUIState value, - $Res Function(AdvancedLocalizationUIState) _then) = - _$AdvancedLocalizationUIStateCopyWithImpl; - @useResult - $Res call( - {String workingText, - Map? classMap, - String? p4kGlobalIni, - String? serverGlobalIni, - String? customizeGlobalIni, - ScLocalizationData? apiLocalizationData, - int p4kGlobalIniLines, - int serverGlobalIniLines, - String errorMessage}); -} +abstract mixin class $AdvancedLocalizationUIStateCopyWith<$Res> { + factory $AdvancedLocalizationUIStateCopyWith(AdvancedLocalizationUIState value, $Res Function(AdvancedLocalizationUIState) _then) = _$AdvancedLocalizationUIStateCopyWithImpl; +@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> { @@ -104,181 +60,218 @@ class _$AdvancedLocalizationUIStateCopyWithImpl<$Res> final AdvancedLocalizationUIState _self; final $Res Function(AdvancedLocalizationUIState) _then; - /// Create a copy of AdvancedLocalizationUIState - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @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(_self.copyWith( - 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, - )); - } +/// Create a copy of AdvancedLocalizationUIState +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @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(_self.copyWith( +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, + )); +} + +} + + +/// Adds pattern-matching-related methods to [AdvancedLocalizationUIState]. +extension AdvancedLocalizationUIStatePatterns on AdvancedLocalizationUIState { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _AdvancedLocalizationUIState value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _AdvancedLocalizationUIState() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _AdvancedLocalizationUIState value) $default,){ +final _that = this; +switch (_that) { +case _AdvancedLocalizationUIState(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _AdvancedLocalizationUIState value)? $default,){ +final _that = this; +switch (_that) { +case _AdvancedLocalizationUIState() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String workingText, Map? classMap, String? p4kGlobalIni, String? serverGlobalIni, String? customizeGlobalIni, ScLocalizationData? apiLocalizationData, int p4kGlobalIniLines, int serverGlobalIniLines, String errorMessage)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _AdvancedLocalizationUIState() when $default != null: +return $default(_that.workingText,_that.classMap,_that.p4kGlobalIni,_that.serverGlobalIni,_that.customizeGlobalIni,_that.apiLocalizationData,_that.p4kGlobalIniLines,_that.serverGlobalIniLines,_that.errorMessage);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String workingText, Map? classMap, String? p4kGlobalIni, String? serverGlobalIni, String? customizeGlobalIni, ScLocalizationData? apiLocalizationData, int p4kGlobalIniLines, int serverGlobalIniLines, String errorMessage) $default,) {final _that = this; +switch (_that) { +case _AdvancedLocalizationUIState(): +return $default(_that.workingText,_that.classMap,_that.p4kGlobalIni,_that.serverGlobalIni,_that.customizeGlobalIni,_that.apiLocalizationData,_that.p4kGlobalIniLines,_that.serverGlobalIniLines,_that.errorMessage);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String workingText, Map? classMap, String? p4kGlobalIni, String? serverGlobalIni, String? customizeGlobalIni, ScLocalizationData? apiLocalizationData, int p4kGlobalIniLines, int serverGlobalIniLines, String errorMessage)? $default,) {final _that = this; +switch (_that) { +case _AdvancedLocalizationUIState() when $default != null: +return $default(_that.workingText,_that.classMap,_that.p4kGlobalIni,_that.serverGlobalIni,_that.customizeGlobalIni,_that.apiLocalizationData,_that.p4kGlobalIniLines,_that.serverGlobalIniLines,_that.errorMessage);case _: + return null; + +} +} + } /// @nodoc + class _AdvancedLocalizationUIState implements AdvancedLocalizationUIState { - _AdvancedLocalizationUIState( - {this.workingText = "", - final Map? classMap, - this.p4kGlobalIni, - this.serverGlobalIni, - this.customizeGlobalIni, - this.apiLocalizationData, - this.p4kGlobalIniLines = 0, - this.serverGlobalIniLines = 0, - this.errorMessage = ""}) - : _classMap = classMap; + _AdvancedLocalizationUIState({this.workingText = "", final Map? classMap, this.p4kGlobalIni, this.serverGlobalIni, this.customizeGlobalIni, this.apiLocalizationData, this.p4kGlobalIniLines = 0, this.serverGlobalIniLines = 0, this.errorMessage = ""}): _classMap = classMap; + - @override - @JsonKey() - final String workingText; - final Map? _classMap; - @override - Map? get classMap { - final value = _classMap; - if (value == null) return null; - if (_classMap is EqualUnmodifiableMapView) return _classMap; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(value); - } +@override@JsonKey() final String workingText; + final Map? _classMap; +@override Map? get classMap { + final value = _classMap; + if (value == null) return null; + if (_classMap is EqualUnmodifiableMapView) return _classMap; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); +} - @override - final String? p4kGlobalIni; - @override - final String? serverGlobalIni; - @override - final String? customizeGlobalIni; - @override - final ScLocalizationData? apiLocalizationData; - @override - @JsonKey() - final int p4kGlobalIniLines; - @override - @JsonKey() - final int serverGlobalIniLines; - @override - @JsonKey() - final String errorMessage; +@override final String? p4kGlobalIni; +@override final String? serverGlobalIni; +@override final String? customizeGlobalIni; +@override final ScLocalizationData? apiLocalizationData; +@override@JsonKey() final int p4kGlobalIniLines; +@override@JsonKey() final int serverGlobalIniLines; +@override@JsonKey() final String errorMessage; - /// Create a copy of AdvancedLocalizationUIState - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$AdvancedLocalizationUIStateCopyWith<_AdvancedLocalizationUIState> - get copyWith => __$AdvancedLocalizationUIStateCopyWithImpl< - _AdvancedLocalizationUIState>(this, _$identity); +/// Create a copy of AdvancedLocalizationUIState +/// with the given fields replaced by the non-null parameter values. +@override @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 _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)'; - } +@override +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 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}); -} +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> { @@ -287,60 +280,24 @@ class __$AdvancedLocalizationUIStateCopyWithImpl<$Res> final _AdvancedLocalizationUIState _self; final $Res Function(_AdvancedLocalizationUIState) _then; - /// Create a copy of AdvancedLocalizationUIState - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $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, - )); - } +/// Create a copy of AdvancedLocalizationUIState +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $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, + )); +} + + } // dart format on diff --git a/lib/ui/home/localization/advanced_localization_ui_model.g.dart b/lib/ui/home/localization/advanced_localization_ui_model.g.dart index b03eb0e..8bf8166 100644 --- a/lib/ui/home/localization/advanced_localization_ui_model.g.dart +++ b/lib/ui/home/localization/advanced_localization_ui_model.g.dart @@ -11,18 +11,21 @@ String _$advancedLocalizationUIModelHash() => /// See also [AdvancedLocalizationUIModel]. @ProviderFor(AdvancedLocalizationUIModel) -final advancedLocalizationUIModelProvider = AutoDisposeNotifierProvider< - AdvancedLocalizationUIModel, AdvancedLocalizationUIState>.internal( - AdvancedLocalizationUIModel.new, - name: r'advancedLocalizationUIModelProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$advancedLocalizationUIModelHash, - dependencies: null, - allTransitiveDependencies: null, -); +final advancedLocalizationUIModelProvider = + AutoDisposeNotifierProvider< + AdvancedLocalizationUIModel, + AdvancedLocalizationUIState + >.internal( + AdvancedLocalizationUIModel.new, + name: r'advancedLocalizationUIModelProvider', + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') + ? null + : _$advancedLocalizationUIModelHash, + dependencies: null, + allTransitiveDependencies: null, + ); -typedef _$AdvancedLocalizationUIModel - = AutoDisposeNotifier; +typedef _$AdvancedLocalizationUIModel = + AutoDisposeNotifier; // ignore_for_file: type=lint // ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package diff --git a/lib/ui/home/localization/localization_ui_model.freezed.dart b/lib/ui/home/localization/localization_ui_model.freezed.dart index e012f71..d6925d3 100644 --- a/lib/ui/home/localization/localization_ui_model.freezed.dart +++ b/lib/ui/home/localization/localization_ui_model.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,88 +11,47 @@ part of 'localization_ui_model.dart'; // dart format off T _$identity(T value) => value; - /// @nodoc mixin _$LocalizationUIState { - 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) - @pragma('vm:prefer-inline') - $LocalizationUIStateCopyWith get copyWith => - _$LocalizationUIStateCopyWithImpl( - this as LocalizationUIState, _$identity); + 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) +@pragma('vm:prefer-inline') +$LocalizationUIStateCopyWith get copyWith => _$LocalizationUIStateCopyWithImpl(this as LocalizationUIState, _$identity); - @override - 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)'; - } +@override +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 mixin class $LocalizationUIStateCopyWith<$Res> { - factory $LocalizationUIStateCopyWith( - LocalizationUIState value, $Res Function(LocalizationUIState) _then) = - _$LocalizationUIStateCopyWithImpl; - @useResult - $Res call( - {String? selectedLanguage, - String? installedCommunityInputMethodSupportVersion, - InputMethodApiLanguageData? communityInputMethodLanguageData, - Map? apiLocalizationData, - String workingVersion, - MapEntry? patchStatus, - bool? isInstalledAdvanced, - List? customizeList}); -} +abstract mixin class $LocalizationUIStateCopyWith<$Res> { + factory $LocalizationUIStateCopyWith(LocalizationUIState value, $Res Function(LocalizationUIState) _then) = _$LocalizationUIStateCopyWithImpl; +@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> { @@ -102,181 +60,224 @@ class _$LocalizationUIStateCopyWithImpl<$Res> final LocalizationUIState _self; final $Res Function(LocalizationUIState) _then; - /// Create a copy of LocalizationUIState - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @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(_self.copyWith( - 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?, - )); - } +/// Create a copy of LocalizationUIState +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @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(_self.copyWith( +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?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [LocalizationUIState]. +extension LocalizationUIStatePatterns on LocalizationUIState { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _LocalizationUIState value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _LocalizationUIState() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _LocalizationUIState value) $default,){ +final _that = this; +switch (_that) { +case _LocalizationUIState(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _LocalizationUIState value)? $default,){ +final _that = this; +switch (_that) { +case _LocalizationUIState() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String? selectedLanguage, String? installedCommunityInputMethodSupportVersion, InputMethodApiLanguageData? communityInputMethodLanguageData, Map? apiLocalizationData, String workingVersion, MapEntry? patchStatus, bool? isInstalledAdvanced, List? customizeList)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _LocalizationUIState() when $default != null: +return $default(_that.selectedLanguage,_that.installedCommunityInputMethodSupportVersion,_that.communityInputMethodLanguageData,_that.apiLocalizationData,_that.workingVersion,_that.patchStatus,_that.isInstalledAdvanced,_that.customizeList);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String? selectedLanguage, String? installedCommunityInputMethodSupportVersion, InputMethodApiLanguageData? communityInputMethodLanguageData, Map? apiLocalizationData, String workingVersion, MapEntry? patchStatus, bool? isInstalledAdvanced, List? customizeList) $default,) {final _that = this; +switch (_that) { +case _LocalizationUIState(): +return $default(_that.selectedLanguage,_that.installedCommunityInputMethodSupportVersion,_that.communityInputMethodLanguageData,_that.apiLocalizationData,_that.workingVersion,_that.patchStatus,_that.isInstalledAdvanced,_that.customizeList);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String? selectedLanguage, String? installedCommunityInputMethodSupportVersion, InputMethodApiLanguageData? communityInputMethodLanguageData, Map? apiLocalizationData, String workingVersion, MapEntry? patchStatus, bool? isInstalledAdvanced, List? customizeList)? $default,) {final _that = this; +switch (_that) { +case _LocalizationUIState() when $default != null: +return $default(_that.selectedLanguage,_that.installedCommunityInputMethodSupportVersion,_that.communityInputMethodLanguageData,_that.apiLocalizationData,_that.workingVersion,_that.patchStatus,_that.isInstalledAdvanced,_that.customizeList);case _: + return null; + +} +} + } /// @nodoc + class _LocalizationUIState implements LocalizationUIState { - _LocalizationUIState( - {this.selectedLanguage, - this.installedCommunityInputMethodSupportVersion, - this.communityInputMethodLanguageData, - final Map? apiLocalizationData, - this.workingVersion = "", - this.patchStatus, - this.isInstalledAdvanced, - final List? customizeList}) - : _apiLocalizationData = apiLocalizationData, - _customizeList = customizeList; + _LocalizationUIState({this.selectedLanguage, this.installedCommunityInputMethodSupportVersion, this.communityInputMethodLanguageData, final Map? apiLocalizationData, this.workingVersion = "", this.patchStatus, this.isInstalledAdvanced, final List? customizeList}): _apiLocalizationData = apiLocalizationData,_customizeList = customizeList; + - @override - final String? selectedLanguage; - @override - final String? installedCommunityInputMethodSupportVersion; - @override - final InputMethodApiLanguageData? communityInputMethodLanguageData; - final Map? _apiLocalizationData; - @override - Map? get apiLocalizationData { - final value = _apiLocalizationData; - if (value == null) return null; - if (_apiLocalizationData is EqualUnmodifiableMapView) - return _apiLocalizationData; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(value); - } +@override final String? selectedLanguage; +@override final String? installedCommunityInputMethodSupportVersion; +@override final InputMethodApiLanguageData? communityInputMethodLanguageData; + final Map? _apiLocalizationData; +@override Map? get apiLocalizationData { + final value = _apiLocalizationData; + if (value == null) return null; + if (_apiLocalizationData is EqualUnmodifiableMapView) return _apiLocalizationData; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); +} - @override - @JsonKey() - final String workingVersion; - @override - final MapEntry? patchStatus; - @override - final bool? isInstalledAdvanced; - final List? _customizeList; - @override - List? get customizeList { - final value = _customizeList; - if (value == null) return null; - if (_customizeList is EqualUnmodifiableListView) return _customizeList; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } +@override@JsonKey() final String workingVersion; +@override final MapEntry? patchStatus; +@override final bool? isInstalledAdvanced; + final List? _customizeList; +@override List? get customizeList { + final value = _customizeList; + if (value == null) return null; + if (_customizeList is EqualUnmodifiableListView) return _customizeList; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); +} - /// Create a copy of LocalizationUIState - /// with the given fields replaced by the non-null parameter values. - @override - @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 _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)); - } +/// Create a copy of LocalizationUIState +/// with the given fields replaced by the non-null parameter values. +@override @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 _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)'; +} - @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 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}); -} +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> { @@ -285,57 +286,23 @@ class __$LocalizationUIStateCopyWithImpl<$Res> final _LocalizationUIState _self; final $Res Function(_LocalizationUIState) _then; - /// Create a copy of LocalizationUIState - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $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?, - )); - } +/// Create a copy of LocalizationUIState +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $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?, + )); +} + + } // dart format on diff --git a/lib/ui/home/localization/localization_ui_model.g.dart b/lib/ui/home/localization/localization_ui_model.g.dart index 3b35e07..a96aa4b 100644 --- a/lib/ui/home/localization/localization_ui_model.g.dart +++ b/lib/ui/home/localization/localization_ui_model.g.dart @@ -7,20 +7,23 @@ part of 'localization_ui_model.dart'; // ************************************************************************** String _$localizationUIModelHash() => - r'640a129e8ecf7854d7668278046e808925d7f9d2'; + r'd114577031b7d62ac5c395f0ced314721b852ee9'; /// See also [LocalizationUIModel]. @ProviderFor(LocalizationUIModel) -final localizationUIModelProvider = AutoDisposeNotifierProvider< - LocalizationUIModel, LocalizationUIState>.internal( - LocalizationUIModel.new, - name: r'localizationUIModelProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$localizationUIModelHash, - dependencies: null, - allTransitiveDependencies: null, -); +final localizationUIModelProvider = + AutoDisposeNotifierProvider< + LocalizationUIModel, + LocalizationUIState + >.internal( + LocalizationUIModel.new, + name: r'localizationUIModelProvider', + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') + ? null + : _$localizationUIModelHash, + dependencies: null, + allTransitiveDependencies: null, + ); typedef _$LocalizationUIModel = AutoDisposeNotifier; // ignore_for_file: type=lint diff --git a/lib/ui/home/performance/performance_ui_model.freezed.dart b/lib/ui/home/performance/performance_ui_model.freezed.dart index 679d5e7..63d7930 100644 --- a/lib/ui/home/performance/performance_ui_model.freezed.dart +++ b/lib/ui/home/performance/performance_ui_model.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,65 +11,47 @@ part of 'performance_ui_model.dart'; // dart format off T _$identity(T value) => value; - /// @nodoc mixin _$HomePerformanceUIState { - 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) - @pragma('vm:prefer-inline') - $HomePerformanceUIStateCopyWith get copyWith => - _$HomePerformanceUIStateCopyWithImpl( - this as HomePerformanceUIState, _$identity); + 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) +@pragma('vm:prefer-inline') +$HomePerformanceUIStateCopyWith get copyWith => _$HomePerformanceUIStateCopyWithImpl(this as HomePerformanceUIState, _$identity); - @override - 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)'; - } +@override +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 mixin class $HomePerformanceUIStateCopyWith<$Res> { - factory $HomePerformanceUIStateCopyWith(HomePerformanceUIState value, - $Res Function(HomePerformanceUIState) _then) = - _$HomePerformanceUIStateCopyWithImpl; - @useResult - $Res call( - {bool showGraphicsPerformanceTip, - bool enabled, - Map>? performanceMap, - String workingString}); -} +abstract mixin class $HomePerformanceUIStateCopyWith<$Res> { + factory $HomePerformanceUIStateCopyWith(HomePerformanceUIState value, $Res Function(HomePerformanceUIState) _then) = _$HomePerformanceUIStateCopyWithImpl; +@useResult +$Res call({ + bool showGraphicsPerformanceTip, bool enabled, Map>? performanceMap, String workingString +}); + + + +} /// @nodoc class _$HomePerformanceUIStateCopyWithImpl<$Res> implements $HomePerformanceUIStateCopyWith<$Res> { @@ -79,121 +60,208 @@ class _$HomePerformanceUIStateCopyWithImpl<$Res> final HomePerformanceUIState _self; final $Res Function(HomePerformanceUIState) _then; - /// Create a copy of HomePerformanceUIState - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? showGraphicsPerformanceTip = null, - Object? enabled = null, - Object? performanceMap = freezed, - Object? workingString = null, - }) { - return _then(_self.copyWith( - 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, - )); - } +/// Create a copy of HomePerformanceUIState +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? showGraphicsPerformanceTip = null,Object? enabled = null,Object? performanceMap = freezed,Object? workingString = null,}) { + return _then(_self.copyWith( +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, + )); +} + +} + + +/// Adds pattern-matching-related methods to [HomePerformanceUIState]. +extension HomePerformanceUIStatePatterns on HomePerformanceUIState { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _HomePerformanceUIState value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _HomePerformanceUIState() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _HomePerformanceUIState value) $default,){ +final _that = this; +switch (_that) { +case _HomePerformanceUIState(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _HomePerformanceUIState value)? $default,){ +final _that = this; +switch (_that) { +case _HomePerformanceUIState() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool showGraphicsPerformanceTip, bool enabled, Map>? performanceMap, String workingString)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _HomePerformanceUIState() when $default != null: +return $default(_that.showGraphicsPerformanceTip,_that.enabled,_that.performanceMap,_that.workingString);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool showGraphicsPerformanceTip, bool enabled, Map>? performanceMap, String workingString) $default,) {final _that = this; +switch (_that) { +case _HomePerformanceUIState(): +return $default(_that.showGraphicsPerformanceTip,_that.enabled,_that.performanceMap,_that.workingString);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool showGraphicsPerformanceTip, bool enabled, Map>? performanceMap, String workingString)? $default,) {final _that = this; +switch (_that) { +case _HomePerformanceUIState() when $default != null: +return $default(_that.showGraphicsPerformanceTip,_that.enabled,_that.performanceMap,_that.workingString);case _: + return null; + +} +} + } /// @nodoc + class _HomePerformanceUIState implements HomePerformanceUIState { - _HomePerformanceUIState( - {this.showGraphicsPerformanceTip = true, - this.enabled = false, - final Map>? performanceMap, - this.workingString = ""}) - : _performanceMap = performanceMap; + _HomePerformanceUIState({this.showGraphicsPerformanceTip = true, this.enabled = false, final Map>? performanceMap, this.workingString = ""}): _performanceMap = performanceMap; + - @override - @JsonKey() - final bool showGraphicsPerformanceTip; - @override - @JsonKey() - final bool enabled; - final Map>? _performanceMap; - @override - Map>? get performanceMap { - final value = _performanceMap; - if (value == null) return null; - if (_performanceMap is EqualUnmodifiableMapView) return _performanceMap; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(value); - } +@override@JsonKey() final bool showGraphicsPerformanceTip; +@override@JsonKey() final bool enabled; + final Map>? _performanceMap; +@override Map>? get performanceMap { + final value = _performanceMap; + if (value == null) return null; + if (_performanceMap is EqualUnmodifiableMapView) return _performanceMap; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); +} - @override - @JsonKey() - final String workingString; +@override@JsonKey() final String workingString; - /// Create a copy of HomePerformanceUIState - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$HomePerformanceUIStateCopyWith<_HomePerformanceUIState> get copyWith => - __$HomePerformanceUIStateCopyWithImpl<_HomePerformanceUIState>( - this, _$identity); +/// Create a copy of HomePerformanceUIState +/// with the given fields replaced by the non-null parameter values. +@override @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 _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)'; - } +@override +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 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}); -} +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> { @@ -202,35 +270,19 @@ class __$HomePerformanceUIStateCopyWithImpl<$Res> final _HomePerformanceUIState _self; final $Res Function(_HomePerformanceUIState) _then; - /// Create a copy of HomePerformanceUIState - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $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, - )); - } +/// Create a copy of HomePerformanceUIState +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $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, + )); +} + + } // dart format on diff --git a/lib/ui/home/performance/performance_ui_model.g.dart b/lib/ui/home/performance/performance_ui_model.g.dart index 7a5adeb..579d83c 100644 --- a/lib/ui/home/performance/performance_ui_model.g.dart +++ b/lib/ui/home/performance/performance_ui_model.g.dart @@ -11,16 +11,19 @@ String _$homePerformanceUIModelHash() => /// See also [HomePerformanceUIModel]. @ProviderFor(HomePerformanceUIModel) -final homePerformanceUIModelProvider = AutoDisposeNotifierProvider< - HomePerformanceUIModel, HomePerformanceUIState>.internal( - HomePerformanceUIModel.new, - name: r'homePerformanceUIModelProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$homePerformanceUIModelHash, - dependencies: null, - allTransitiveDependencies: null, -); +final homePerformanceUIModelProvider = + AutoDisposeNotifierProvider< + HomePerformanceUIModel, + HomePerformanceUIState + >.internal( + HomePerformanceUIModel.new, + name: r'homePerformanceUIModelProvider', + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') + ? null + : _$homePerformanceUIModelHash, + dependencies: null, + allTransitiveDependencies: null, + ); typedef _$HomePerformanceUIModel = AutoDisposeNotifier; // ignore_for_file: type=lint diff --git a/lib/ui/nav/nav_state.freezed.dart b/lib/ui/nav/nav_state.freezed.dart index 01480eb..3317d0c 100644 --- a/lib/ui/nav/nav_state.freezed.dart +++ b/lib/ui/nav/nav_state.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,159 +11,272 @@ part of 'nav_state.dart'; // dart format off T _$identity(T value) => value; - /// @nodoc mixin _$NavState { - 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) - @pragma('vm:prefer-inline') - $NavStateCopyWith get copyWith => - _$NavStateCopyWithImpl(this as NavState, _$identity); + 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) +@pragma('vm:prefer-inline') +$NavStateCopyWith get copyWith => _$NavStateCopyWithImpl(this as NavState, _$identity); - @override - 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)'; - } +@override +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 mixin class $NavStateCopyWith<$Res> { - factory $NavStateCopyWith(NavState value, $Res Function(NavState) _then) = - _$NavStateCopyWithImpl; - @useResult - $Res call({List? items, String errorInfo}); -} +abstract mixin class $NavStateCopyWith<$Res> { + factory $NavStateCopyWith(NavState value, $Res Function(NavState) _then) = _$NavStateCopyWithImpl; +@useResult +$Res call({ + List? items, String errorInfo +}); + + + +} /// @nodoc -class _$NavStateCopyWithImpl<$Res> implements $NavStateCopyWith<$Res> { +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. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? items = freezed, - Object? errorInfo = null, - }) { - return _then(_self.copyWith( - 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, - )); - } +/// Create a copy of NavState +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? items = freezed,Object? errorInfo = null,}) { + return _then(_self.copyWith( +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, + )); +} + +} + + +/// Adds pattern-matching-related methods to [NavState]. +extension NavStatePatterns on NavState { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _NavState value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _NavState() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _NavState value) $default,){ +final _that = this; +switch (_that) { +case _NavState(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _NavState value)? $default,){ +final _that = this; +switch (_that) { +case _NavState() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( List? items, String errorInfo)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _NavState() when $default != null: +return $default(_that.items,_that.errorInfo);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( List? items, String errorInfo) $default,) {final _that = this; +switch (_that) { +case _NavState(): +return $default(_that.items,_that.errorInfo);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( List? items, String errorInfo)? $default,) {final _that = this; +switch (_that) { +case _NavState() when $default != null: +return $default(_that.items,_that.errorInfo);case _: + return null; + +} +} + } /// @nodoc + class _NavState implements NavState { - const _NavState({final List? items, this.errorInfo = ""}) - : _items = items; + const _NavState({final List? items, this.errorInfo = ""}): _items = items; + - final List? _items; - @override - List? get items { - final value = _items; - if (value == null) return null; - if (_items is EqualUnmodifiableListView) return _items; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } + final List? _items; +@override List? get items { + final value = _items; + if (value == null) return null; + if (_items is EqualUnmodifiableListView) return _items; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); +} - @override - @JsonKey() - final String errorInfo; +@override@JsonKey() final String errorInfo; - /// Create a copy of NavState - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$NavStateCopyWith<_NavState> get copyWith => - __$NavStateCopyWithImpl<_NavState>(this, _$identity); +/// Create a copy of NavState +/// with the given fields replaced by the non-null parameter values. +@override @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 _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)'; - } +@override +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 mixin class _$NavStateCopyWith<$Res> - implements $NavStateCopyWith<$Res> { - factory _$NavStateCopyWith(_NavState value, $Res Function(_NavState) _then) = - __$NavStateCopyWithImpl; - @override - @useResult - $Res call({List? items, String errorInfo}); -} +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> { +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. - @override - @pragma('vm:prefer-inline') - $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, - )); - } +/// Create a copy of NavState +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $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, + )); +} + + } // dart format on diff --git a/lib/ui/nav/nav_state.g.dart b/lib/ui/nav/nav_state.g.dart index 5ae1bc3..01fd9a5 100644 --- a/lib/ui/nav/nav_state.g.dart +++ b/lib/ui/nav/nav_state.g.dart @@ -13,8 +13,9 @@ String _$navHash() => r'00c4da8fdd37214cda179a81ece3676add7aab53'; final navProvider = AutoDisposeNotifierProvider.internal( Nav.new, name: r'navProvider', - debugGetCreateSourceHash: - const bool.fromEnvironment('dart.vm.product') ? null : _$navHash, + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') + ? null + : _$navHash, dependencies: null, allTransitiveDependencies: null, ); diff --git a/lib/ui/settings/settings_ui_model.freezed.dart b/lib/ui/settings/settings_ui_model.freezed.dart index fc84675..bc29b65 100644 --- a/lib/ui/settings/settings_ui_model.freezed.dart +++ b/lib/ui/settings/settings_ui_model.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,75 +11,47 @@ part of 'settings_ui_model.dart'; // dart format off T _$identity(T value) => value; - /// @nodoc mixin _$SettingsUIState { - 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 => - _$SettingsUIStateCopyWithImpl( - this as SettingsUIState, _$identity); + 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 => _$SettingsUIStateCopyWithImpl(this as SettingsUIState, _$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)'; - } +@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> { - factory $SettingsUIStateCopyWith( - SettingsUIState value, $Res Function(SettingsUIState) _then) = - _$SettingsUIStateCopyWithImpl; - @useResult - $Res call( - {bool isEnableToolSiteMirrors, - String inputGameLaunchECore, - String? customLauncherPath, - String? customGamePath, - int locationCacheSize, - bool isUseInternalDNS}); -} +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> { @@ -89,136 +60,204 @@ class _$SettingsUIStateCopyWithImpl<$Res> 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, - )); - } +/// 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, + )); +} + +} + + +/// Adds pattern-matching-related methods to [SettingsUIState]. +extension SettingsUIStatePatterns on SettingsUIState { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _SettingsUIState value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _SettingsUIState() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _SettingsUIState value) $default,){ +final _that = this; +switch (_that) { +case _SettingsUIState(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _SettingsUIState value)? $default,){ +final _that = this; +switch (_that) { +case _SettingsUIState() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool isEnableToolSiteMirrors, String inputGameLaunchECore, String? customLauncherPath, String? customGamePath, int locationCacheSize, bool isUseInternalDNS)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _SettingsUIState() when $default != null: +return $default(_that.isEnableToolSiteMirrors,_that.inputGameLaunchECore,_that.customLauncherPath,_that.customGamePath,_that.locationCacheSize,_that.isUseInternalDNS);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool isEnableToolSiteMirrors, String inputGameLaunchECore, String? customLauncherPath, String? customGamePath, int locationCacheSize, bool isUseInternalDNS) $default,) {final _that = this; +switch (_that) { +case _SettingsUIState(): +return $default(_that.isEnableToolSiteMirrors,_that.inputGameLaunchECore,_that.customLauncherPath,_that.customGamePath,_that.locationCacheSize,_that.isUseInternalDNS);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool isEnableToolSiteMirrors, String inputGameLaunchECore, String? customLauncherPath, String? customGamePath, int locationCacheSize, bool isUseInternalDNS)? $default,) {final _that = this; +switch (_that) { +case _SettingsUIState() when $default != null: +return $default(_that.isEnableToolSiteMirrors,_that.inputGameLaunchECore,_that.customLauncherPath,_that.customGamePath,_that.locationCacheSize,_that.isUseInternalDNS);case _: + return null; + +} +} + } /// @nodoc + class _SettingsUIState implements SettingsUIState { - _SettingsUIState( - {this.isEnableToolSiteMirrors = false, - this.inputGameLaunchECore = "0", - this.customLauncherPath, - this.customGamePath, - this.locationCacheSize = 0, - this.isUseInternalDNS = false}); + _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; +@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); +/// 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)'; - } +@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}); -} +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> { @@ -227,45 +266,21 @@ class __$SettingsUIStateCopyWithImpl<$Res> 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') - $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, - )); - } +/// Create a copy of SettingsUIState +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $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, + )); +} + + } // dart format on diff --git a/lib/ui/settings/settings_ui_model.g.dart b/lib/ui/settings/settings_ui_model.g.dart index 759f19f..124261b 100644 --- a/lib/ui/settings/settings_ui_model.g.dart +++ b/lib/ui/settings/settings_ui_model.g.dart @@ -12,14 +12,14 @@ String _$settingsUIModelHash() => r'4b7900c3f77f4d5ff1836cbf700af374b62c943f'; @ProviderFor(SettingsUIModel) final settingsUIModelProvider = AutoDisposeNotifierProvider.internal( - SettingsUIModel.new, - name: r'settingsUIModelProvider', - debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') - ? null - : _$settingsUIModelHash, - dependencies: null, - allTransitiveDependencies: null, -); + SettingsUIModel.new, + name: r'settingsUIModelProvider', + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') + ? null + : _$settingsUIModelHash, + dependencies: null, + allTransitiveDependencies: null, + ); typedef _$SettingsUIModel = AutoDisposeNotifier; // ignore_for_file: type=lint 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 a3d5cd8..44d11a5 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,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,66 +11,47 @@ part of 'rsi_launcher_enhance_dialog_ui.dart'; // dart format off T _$identity(T value) => value; - /// @nodoc mixin _$RSILauncherStateData { - 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) - @pragma('vm:prefer-inline') - $RSILauncherStateDataCopyWith get copyWith => - _$RSILauncherStateDataCopyWithImpl( - this as RSILauncherStateData, _$identity); + 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) +@pragma('vm:prefer-inline') +$RSILauncherStateDataCopyWith get copyWith => _$RSILauncherStateDataCopyWithImpl(this as RSILauncherStateData, _$identity); - @override - 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)'; - } +@override +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 mixin class $RSILauncherStateDataCopyWith<$Res> { - factory $RSILauncherStateDataCopyWith(RSILauncherStateData value, - $Res Function(RSILauncherStateData) _then) = - _$RSILauncherStateDataCopyWithImpl; - @useResult - $Res call( - {String version, - asar_api.RsiLauncherAsarData data, - String serverData, - bool isPatchInstalled, - String? enabledLocalization, - bool? enableDownloaderBoost}); -} +abstract mixin class $RSILauncherStateDataCopyWith<$Res> { + factory $RSILauncherStateDataCopyWith(RSILauncherStateData value, $Res Function(RSILauncherStateData) _then) = _$RSILauncherStateDataCopyWithImpl; +@useResult +$Res call({ + String version, asar_api.RsiLauncherAsarData data, String serverData, bool isPatchInstalled, String? enabledLocalization, bool? enableDownloaderBoost +}); + + + +} /// @nodoc class _$RSILauncherStateDataCopyWithImpl<$Res> implements $RSILauncherStateDataCopyWith<$Res> { @@ -80,125 +60,204 @@ class _$RSILauncherStateDataCopyWithImpl<$Res> final RSILauncherStateData _self; final $Res Function(RSILauncherStateData) _then; - /// Create a copy of RSILauncherStateData - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? version = null, - Object? data = null, - Object? serverData = null, - Object? isPatchInstalled = null, - Object? enabledLocalization = freezed, - Object? enableDownloaderBoost = freezed, - }) { - return _then(_self.copyWith( - 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?, - )); - } +/// Create a copy of RSILauncherStateData +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? version = null,Object? data = null,Object? serverData = null,Object? isPatchInstalled = null,Object? enabledLocalization = freezed,Object? enableDownloaderBoost = freezed,}) { + return _then(_self.copyWith( +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?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [RSILauncherStateData]. +extension RSILauncherStateDataPatterns on RSILauncherStateData { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _RSILauncherStateData value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _RSILauncherStateData() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _RSILauncherStateData value) $default,){ +final _that = this; +switch (_that) { +case _RSILauncherStateData(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _RSILauncherStateData value)? $default,){ +final _that = this; +switch (_that) { +case _RSILauncherStateData() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String version, asar_api.RsiLauncherAsarData data, String serverData, bool isPatchInstalled, String? enabledLocalization, bool? enableDownloaderBoost)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _RSILauncherStateData() when $default != null: +return $default(_that.version,_that.data,_that.serverData,_that.isPatchInstalled,_that.enabledLocalization,_that.enableDownloaderBoost);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String version, asar_api.RsiLauncherAsarData data, String serverData, bool isPatchInstalled, String? enabledLocalization, bool? enableDownloaderBoost) $default,) {final _that = this; +switch (_that) { +case _RSILauncherStateData(): +return $default(_that.version,_that.data,_that.serverData,_that.isPatchInstalled,_that.enabledLocalization,_that.enableDownloaderBoost);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String version, asar_api.RsiLauncherAsarData data, String serverData, bool isPatchInstalled, String? enabledLocalization, bool? enableDownloaderBoost)? $default,) {final _that = this; +switch (_that) { +case _RSILauncherStateData() when $default != null: +return $default(_that.version,_that.data,_that.serverData,_that.isPatchInstalled,_that.enabledLocalization,_that.enableDownloaderBoost);case _: + return null; + +} +} + } /// @nodoc + class _RSILauncherStateData implements RSILauncherStateData { - const _RSILauncherStateData( - {required this.version, - required this.data, - required this.serverData, - this.isPatchInstalled = false, - this.enabledLocalization, - this.enableDownloaderBoost}); + const _RSILauncherStateData({required this.version, required this.data, required this.serverData, this.isPatchInstalled = false, this.enabledLocalization, this.enableDownloaderBoost}); + - @override - final String version; - @override - final asar_api.RsiLauncherAsarData data; - @override - final String serverData; - @override - @JsonKey() - final bool isPatchInstalled; - @override - final String? enabledLocalization; - @override - final bool? enableDownloaderBoost; +@override final String version; +@override final asar_api.RsiLauncherAsarData data; +@override final String serverData; +@override@JsonKey() final bool isPatchInstalled; +@override final String? enabledLocalization; +@override final bool? enableDownloaderBoost; - /// Create a copy of RSILauncherStateData - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$RSILauncherStateDataCopyWith<_RSILauncherStateData> get copyWith => - __$RSILauncherStateDataCopyWithImpl<_RSILauncherStateData>( - this, _$identity); +/// Create a copy of RSILauncherStateData +/// with the given fields replaced by the non-null parameter values. +@override @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 _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)'; - } +@override +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 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}); -} +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> { @@ -207,45 +266,21 @@ class __$RSILauncherStateDataCopyWithImpl<$Res> final _RSILauncherStateData _self; final $Res Function(_RSILauncherStateData) _then; - /// Create a copy of RSILauncherStateData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $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?, - )); - } +/// Create a copy of RSILauncherStateData +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $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?, + )); +} + + } // dart format on 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 89554fd..7815d63 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,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,52 +11,47 @@ part of 'log_analyze_provider.dart'; // dart format off T _$identity(T value) => value; - /// @nodoc mixin _$LogAnalyzeLineData { - 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) - @pragma('vm:prefer-inline') - $LogAnalyzeLineDataCopyWith get copyWith => - _$LogAnalyzeLineDataCopyWithImpl( - this as LogAnalyzeLineData, _$identity); + 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) +@pragma('vm:prefer-inline') +$LogAnalyzeLineDataCopyWith get copyWith => _$LogAnalyzeLineDataCopyWithImpl(this as LogAnalyzeLineData, _$identity); - @override - 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)'; - } +@override +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 mixin class $LogAnalyzeLineDataCopyWith<$Res> { - factory $LogAnalyzeLineDataCopyWith( - LogAnalyzeLineData value, $Res Function(LogAnalyzeLineData) _then) = - _$LogAnalyzeLineDataCopyWithImpl; - @useResult - $Res call({String type, String title, String? data, String? dateTime}); -} +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 _$LogAnalyzeLineDataCopyWithImpl<$Res> implements $LogAnalyzeLineDataCopyWith<$Res> { @@ -66,92 +60,200 @@ class _$LogAnalyzeLineDataCopyWithImpl<$Res> final LogAnalyzeLineData _self; final $Res Function(LogAnalyzeLineData) _then; - /// Create a copy of LogAnalyzeLineData - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? type = null, - Object? title = null, - Object? data = freezed, - Object? dateTime = freezed, - }) { - return _then(_self.copyWith( - 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?, - )); - } +/// Create a copy of LogAnalyzeLineData +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? type = null,Object? title = null,Object? data = freezed,Object? dateTime = freezed,}) { + return _then(_self.copyWith( +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?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [LogAnalyzeLineData]. +extension LogAnalyzeLineDataPatterns on LogAnalyzeLineData { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _LogAnalyzeLineData value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _LogAnalyzeLineData() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _LogAnalyzeLineData value) $default,){ +final _that = this; +switch (_that) { +case _LogAnalyzeLineData(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _LogAnalyzeLineData value)? $default,){ +final _that = this; +switch (_that) { +case _LogAnalyzeLineData() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String type, String title, String? data, String? dateTime)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _LogAnalyzeLineData() when $default != null: +return $default(_that.type,_that.title,_that.data,_that.dateTime);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String type, String title, String? data, String? dateTime) $default,) {final _that = this; +switch (_that) { +case _LogAnalyzeLineData(): +return $default(_that.type,_that.title,_that.data,_that.dateTime);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String type, String title, String? data, String? dateTime)? $default,) {final _that = this; +switch (_that) { +case _LogAnalyzeLineData() when $default != null: +return $default(_that.type,_that.title,_that.data,_that.dateTime);case _: + return null; + +} +} + } /// @nodoc + class _LogAnalyzeLineData implements LogAnalyzeLineData { - const _LogAnalyzeLineData( - {required this.type, required this.title, this.data, this.dateTime}); + const _LogAnalyzeLineData({required this.type, required this.title, this.data, this.dateTime}); + - @override - final String type; - @override - final String title; - @override - final String? data; - @override - final String? dateTime; +@override final String type; +@override final String title; +@override final String? data; +@override final String? dateTime; - /// Create a copy of LogAnalyzeLineData - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$LogAnalyzeLineDataCopyWith<_LogAnalyzeLineData> get copyWith => - __$LogAnalyzeLineDataCopyWithImpl<_LogAnalyzeLineData>(this, _$identity); +/// Create a copy of LogAnalyzeLineData +/// with the given fields replaced by the non-null parameter values. +@override @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 _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)'; - } +@override +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 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}); -} +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> { @@ -160,35 +262,19 @@ class __$LogAnalyzeLineDataCopyWithImpl<$Res> final _LogAnalyzeLineData _self; final $Res Function(_LogAnalyzeLineData) _then; - /// Create a copy of LogAnalyzeLineData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $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?, - )); - } +/// Create a copy of LogAnalyzeLineData +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $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?, + )); +} + + } // dart format on diff --git a/lib/ui/tools/log_analyze_ui/log_analyze_provider.g.dart b/lib/ui/tools/log_analyze_ui/log_analyze_provider.g.dart index d71bfd5..1507f4c 100644 --- a/lib/ui/tools/log_analyze_ui/log_analyze_provider.g.dart +++ b/lib/ui/tools/log_analyze_ui/log_analyze_provider.g.dart @@ -51,24 +51,15 @@ class ToolsLogAnalyzeFamily const ToolsLogAnalyzeFamily(); /// See also [ToolsLogAnalyze]. - ToolsLogAnalyzeProvider call( - String gameInstallPath, - bool listSortReverse, - ) { - return ToolsLogAnalyzeProvider( - gameInstallPath, - listSortReverse, - ); + ToolsLogAnalyzeProvider call(String gameInstallPath, bool listSortReverse) { + return ToolsLogAnalyzeProvider(gameInstallPath, listSortReverse); } @override ToolsLogAnalyzeProvider getProviderOverride( covariant ToolsLogAnalyzeProvider provider, ) { - return call( - provider.gameInstallPath, - provider.listSortReverse, - ); + return call(provider.gameInstallPath, provider.listSortReverse); } static const Iterable? _dependencies = null; @@ -87,28 +78,29 @@ class ToolsLogAnalyzeFamily } /// See also [ToolsLogAnalyze]. -class ToolsLogAnalyzeProvider extends AutoDisposeAsyncNotifierProviderImpl< - ToolsLogAnalyze, List> { +class ToolsLogAnalyzeProvider + extends + AutoDisposeAsyncNotifierProviderImpl< + ToolsLogAnalyze, + List + > { /// See also [ToolsLogAnalyze]. - ToolsLogAnalyzeProvider( - String gameInstallPath, - bool listSortReverse, - ) : this._internal( - () => ToolsLogAnalyze() - ..gameInstallPath = gameInstallPath - ..listSortReverse = listSortReverse, - from: toolsLogAnalyzeProvider, - name: r'toolsLogAnalyzeProvider', - debugGetCreateSourceHash: - const bool.fromEnvironment('dart.vm.product') - ? null - : _$toolsLogAnalyzeHash, - dependencies: ToolsLogAnalyzeFamily._dependencies, - allTransitiveDependencies: - ToolsLogAnalyzeFamily._allTransitiveDependencies, - gameInstallPath: gameInstallPath, - listSortReverse: listSortReverse, - ); + ToolsLogAnalyzeProvider(String gameInstallPath, bool listSortReverse) + : this._internal( + () => ToolsLogAnalyze() + ..gameInstallPath = gameInstallPath + ..listSortReverse = listSortReverse, + from: toolsLogAnalyzeProvider, + name: r'toolsLogAnalyzeProvider', + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') + ? null + : _$toolsLogAnalyzeHash, + dependencies: ToolsLogAnalyzeFamily._dependencies, + allTransitiveDependencies: + ToolsLogAnalyzeFamily._allTransitiveDependencies, + gameInstallPath: gameInstallPath, + listSortReverse: listSortReverse, + ); ToolsLogAnalyzeProvider._internal( super._createNotifier, { @@ -128,10 +120,7 @@ class ToolsLogAnalyzeProvider extends AutoDisposeAsyncNotifierProviderImpl< FutureOr> runNotifierBuild( covariant ToolsLogAnalyze notifier, ) { - return notifier.build( - gameInstallPath, - listSortReverse, - ); + return notifier.build(gameInstallPath, listSortReverse); } @override @@ -154,8 +143,11 @@ class ToolsLogAnalyzeProvider extends AutoDisposeAsyncNotifierProviderImpl< } @override - AutoDisposeAsyncNotifierProviderElement> createElement() { + AutoDisposeAsyncNotifierProviderElement< + ToolsLogAnalyze, + List + > + createElement() { return _ToolsLogAnalyzeProviderElement(this); } @@ -188,8 +180,12 @@ mixin ToolsLogAnalyzeRef } class _ToolsLogAnalyzeProviderElement - extends AutoDisposeAsyncNotifierProviderElement> with ToolsLogAnalyzeRef { + extends + AutoDisposeAsyncNotifierProviderElement< + ToolsLogAnalyze, + List + > + with ToolsLogAnalyzeRef { _ToolsLogAnalyzeProviderElement(super.provider); @override @@ -199,5 +195,6 @@ class _ToolsLogAnalyzeProviderElement bool get listSortReverse => (origin as ToolsLogAnalyzeProvider).listSortReverse; } + // ignore_for_file: type=lint // ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package diff --git a/lib/ui/tools/tools_ui_model.freezed.dart b/lib/ui/tools/tools_ui_model.freezed.dart index 757251c..3124484 100644 --- a/lib/ui/tools/tools_ui_model.freezed.dart +++ b/lib/ui/tools/tools_ui_model.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark @@ -12,250 +11,273 @@ part of 'tools_ui_model.dart'; // dart format off T _$identity(T value) => value; - /// @nodoc mixin _$ToolsUIState { - 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) - @pragma('vm:prefer-inline') - $ToolsUIStateCopyWith get copyWith => - _$ToolsUIStateCopyWithImpl( - this as ToolsUIState, _$identity); + 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) +@pragma('vm:prefer-inline') +$ToolsUIStateCopyWith get copyWith => _$ToolsUIStateCopyWithImpl(this as ToolsUIState, _$identity); - @override - 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)'; - } +@override +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 mixin class $ToolsUIStateCopyWith<$Res> { - factory $ToolsUIStateCopyWith( - ToolsUIState value, $Res Function(ToolsUIState) _then) = - _$ToolsUIStateCopyWithImpl; - @useResult - $Res call( - {bool working, - String scInstalledPath, - String rsiLauncherInstalledPath, - List scInstallPaths, - List rsiLauncherInstallPaths, - List items, - bool isItemLoading}); -} +abstract mixin class $ToolsUIStateCopyWith<$Res> { + factory $ToolsUIStateCopyWith(ToolsUIState value, $Res Function(ToolsUIState) _then) = _$ToolsUIStateCopyWithImpl; +@useResult +$Res call({ + bool working, String scInstalledPath, String rsiLauncherInstalledPath, List scInstallPaths, List rsiLauncherInstallPaths, List items, bool isItemLoading +}); + + + +} /// @nodoc -class _$ToolsUIStateCopyWithImpl<$Res> implements $ToolsUIStateCopyWith<$Res> { +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. - @pragma('vm:prefer-inline') - @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(_self.copyWith( - 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, - )); - } +/// Create a copy of ToolsUIState +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @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(_self.copyWith( +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, + )); +} + +} + + +/// Adds pattern-matching-related methods to [ToolsUIState]. +extension ToolsUIStatePatterns on ToolsUIState { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _ToolsUIState value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _ToolsUIState() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _ToolsUIState value) $default,){ +final _that = this; +switch (_that) { +case _ToolsUIState(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _ToolsUIState value)? $default,){ +final _that = this; +switch (_that) { +case _ToolsUIState() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool working, String scInstalledPath, String rsiLauncherInstalledPath, List scInstallPaths, List rsiLauncherInstallPaths, List items, bool isItemLoading)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _ToolsUIState() when $default != null: +return $default(_that.working,_that.scInstalledPath,_that.rsiLauncherInstalledPath,_that.scInstallPaths,_that.rsiLauncherInstallPaths,_that.items,_that.isItemLoading);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool working, String scInstalledPath, String rsiLauncherInstalledPath, List scInstallPaths, List rsiLauncherInstallPaths, List items, bool isItemLoading) $default,) {final _that = this; +switch (_that) { +case _ToolsUIState(): +return $default(_that.working,_that.scInstalledPath,_that.rsiLauncherInstalledPath,_that.scInstallPaths,_that.rsiLauncherInstallPaths,_that.items,_that.isItemLoading);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool working, String scInstalledPath, String rsiLauncherInstalledPath, List scInstallPaths, List rsiLauncherInstallPaths, List items, bool isItemLoading)? $default,) {final _that = this; +switch (_that) { +case _ToolsUIState() when $default != null: +return $default(_that.working,_that.scInstalledPath,_that.rsiLauncherInstalledPath,_that.scInstallPaths,_that.rsiLauncherInstallPaths,_that.items,_that.isItemLoading);case _: + return null; + +} +} + } /// @nodoc + class _ToolsUIState implements ToolsUIState { - _ToolsUIState( - {this.working = false, - this.scInstalledPath = "", - this.rsiLauncherInstalledPath = "", - final List scInstallPaths = const [], - final List rsiLauncherInstallPaths = const [], - final List items = const [], - this.isItemLoading = false}) - : _scInstallPaths = scInstallPaths, - _rsiLauncherInstallPaths = rsiLauncherInstallPaths, - _items = items; + _ToolsUIState({this.working = false, this.scInstalledPath = "", this.rsiLauncherInstalledPath = "", final List scInstallPaths = const [], final List rsiLauncherInstallPaths = const [], final List items = const [], this.isItemLoading = false}): _scInstallPaths = scInstallPaths,_rsiLauncherInstallPaths = rsiLauncherInstallPaths,_items = items; + - @override - @JsonKey() - final bool working; - @override - @JsonKey() - final String scInstalledPath; - @override - @JsonKey() - final String rsiLauncherInstalledPath; - final List _scInstallPaths; - @override - @JsonKey() - List get scInstallPaths { - if (_scInstallPaths is EqualUnmodifiableListView) return _scInstallPaths; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_scInstallPaths); - } +@override@JsonKey() final bool working; +@override@JsonKey() final String scInstalledPath; +@override@JsonKey() final String rsiLauncherInstalledPath; + final List _scInstallPaths; +@override@JsonKey() List get scInstallPaths { + if (_scInstallPaths is EqualUnmodifiableListView) return _scInstallPaths; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_scInstallPaths); +} - final List _rsiLauncherInstallPaths; - @override - @JsonKey() - List get rsiLauncherInstallPaths { - if (_rsiLauncherInstallPaths is EqualUnmodifiableListView) - return _rsiLauncherInstallPaths; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_rsiLauncherInstallPaths); - } + final List _rsiLauncherInstallPaths; +@override@JsonKey() List get rsiLauncherInstallPaths { + if (_rsiLauncherInstallPaths is EqualUnmodifiableListView) return _rsiLauncherInstallPaths; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_rsiLauncherInstallPaths); +} - final List _items; - @override - @JsonKey() - List get items { - if (_items is EqualUnmodifiableListView) return _items; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_items); - } + final List _items; +@override@JsonKey() List get items { + if (_items is EqualUnmodifiableListView) return _items; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_items); +} - @override - @JsonKey() - final bool isItemLoading; +@override@JsonKey() final bool isItemLoading; - /// Create a copy of ToolsUIState - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$ToolsUIStateCopyWith<_ToolsUIState> get copyWith => - __$ToolsUIStateCopyWithImpl<_ToolsUIState>(this, _$identity); +/// Create a copy of ToolsUIState +/// with the given fields replaced by the non-null parameter values. +@override @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 _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)'; - } +@override +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 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}); -} +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> { @@ -264,50 +286,22 @@ class __$ToolsUIStateCopyWithImpl<$Res> final _ToolsUIState _self; final $Res Function(_ToolsUIState) _then; - /// Create a copy of ToolsUIState - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $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, - )); - } +/// Create a copy of ToolsUIState +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $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, + )); +} + + } // dart format on diff --git a/lib/ui/tools/tools_ui_model.g.dart b/lib/ui/tools/tools_ui_model.g.dart index c00a9b0..7a9d0e1 100644 --- a/lib/ui/tools/tools_ui_model.g.dart +++ b/lib/ui/tools/tools_ui_model.g.dart @@ -12,13 +12,14 @@ String _$toolsUIModelHash() => r'c8830e26df6c0ee572dd5e78c4ccef3317f8b4e6'; @ProviderFor(ToolsUIModel) final toolsUIModelProvider = AutoDisposeNotifierProvider.internal( - ToolsUIModel.new, - name: r'toolsUIModelProvider', - debugGetCreateSourceHash: - const bool.fromEnvironment('dart.vm.product') ? null : _$toolsUIModelHash, - dependencies: null, - allTransitiveDependencies: null, -); + ToolsUIModel.new, + name: r'toolsUIModelProvider', + debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') + ? null + : _$toolsUIModelHash, + dependencies: null, + allTransitiveDependencies: null, + ); typedef _$ToolsUIModel = AutoDisposeNotifier; // ignore_for_file: type=lint diff --git a/pubspec.lock b/pubspec.lock index 9f696e1..d9fd969 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,26 +5,26 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: e55636ed79578b9abca5fecf9437947798f5ef7456308b5cb85720b793eac92f + sha256: da0d9209ca76bde579f2da330aeb9df62b6319c834fa7baae052021b0462401f url: "https://pub.dev" source: hosted - version: "82.0.0" + version: "85.0.0" analyzer: dependency: transitive description: name: analyzer - sha256: "904ae5bb474d32c38fb9482e2d925d5454cda04ddd0e55d2e6826bc72f6ba8c0" + sha256: f4ad0fea5f102201015c9aae9d93bc02f75dd9491529a8c21f88d17a8523d44c url: "https://pub.dev" source: hosted - version: "7.4.5" + version: "7.6.0" analyzer_plugin: dependency: transitive description: name: analyzer_plugin - sha256: ee188b6df6c85f1441497c7171c84f1392affadc0384f71089cb10a3bc508cef + sha256: a5ab7590c27b779f3d4de67f31c4109dbe13dd7339f86461a6f2a8ab2594d8ce url: "https://pub.dev" source: hosted - version: "0.13.1" + version: "0.13.4" archive: dependency: "direct main" description: @@ -70,10 +70,10 @@ packages: dependency: transitive description: name: build - sha256: "74273591bd8b7f82eeb1f191c1b65a6576535bbfd5ca3722778b07d5702d33cc" + sha256: "51dc711996cbf609b90cbe5b335bbce83143875a9d58e4b5c6d3c4f684d3dda7" url: "https://pub.dev" source: hosted - version: "2.5.3" + version: "2.5.4" build_cli_annotations: dependency: transitive description: @@ -102,26 +102,26 @@ packages: dependency: transitive description: name: build_resolvers - sha256: badce70566085f2e87434531c4a6bc8e833672f755fc51146d612245947e91c9 + sha256: ee4257b3f20c0c90e72ed2b57ad637f694ccba48839a821e87db762548c22a62 url: "https://pub.dev" source: hosted - version: "2.5.3" + version: "2.5.4" build_runner: dependency: "direct dev" description: name: build_runner - sha256: b9070a4127033777c0e63195f6f117ed16a351ed676f6313b095cf4f328c0b82 + sha256: "382a4d649addbfb7ba71a3631df0ec6a45d5ab9b098638144faf27f02778eb53" url: "https://pub.dev" source: hosted - version: "2.5.3" + version: "2.5.4" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: "1cdfece3eeb3f1263f7dbf5bcc0cba697bd0c22d2c866cb4b578c954dbb09bcf" + sha256: "85fbbb1036d576d966332a3f5ce83f2ce66a40bea1a94ad2d5fc29a19a0d3792" url: "https://pub.dev" source: hosted - version: "9.1.1" + version: "9.1.2" built_collection: dependency: transitive description: @@ -134,10 +134,10 @@ packages: dependency: transitive description: name: built_value - sha256: "082001b5c3dc495d4a42f1d5789990505df20d8547d42507c29050af6933ee27" + sha256: ba95c961bafcd8686d1cf63be864eb59447e795e124d98d6a27d91fcd13602fb url: "https://pub.dev" source: hosted - version: "8.10.1" + version: "8.11.1" card_swiper: dependency: "direct main" description: @@ -254,18 +254,18 @@ packages: dependency: "direct dev" description: name: custom_lint - sha256: "409c485fd14f544af1da965d5a0d160ee57cd58b63eeaa7280a4f28cf5bda7f1" + sha256: "9656925637516c5cf0f5da018b33df94025af2088fe09c8ae2ca54c53f2d9a84" url: "https://pub.dev" source: hosted - version: "0.7.5" + version: "0.7.6" custom_lint_builder: dependency: transitive description: name: custom_lint_builder - sha256: "107e0a43606138015777590ee8ce32f26ba7415c25b722ff0908a6f5d7a4c228" + sha256: "6cdc8e87e51baaaba9c43e283ed8d28e59a0c4732279df62f66f7b5984655414" url: "https://pub.dev" source: hosted - version: "0.7.5" + version: "0.7.6" custom_lint_core: dependency: transitive description: @@ -278,10 +278,10 @@ packages: dependency: transitive description: name: custom_lint_visitor - sha256: cba5b6d7a6217312472bf4468cdf68c949488aed7ffb0eab792cd0b6c435054d + sha256: "4a86a0d8415a91fbb8298d6ef03e9034dc8e323a599ddc4120a0e36c433983a2" url: "https://pub.dev" source: hosted - version: "1.0.0+7.4.5" + version: "1.0.0+7.7.0" dart_rss: dependency: "direct main" description: @@ -294,10 +294,18 @@ packages: dependency: transitive description: name: dart_style - sha256: "5b236382b47ee411741447c1f1e111459c941ea1b3f2b540dde54c210a3662af" + sha256: "8a0e5fba27e8ee025d2ffb4ee820b4e6e2cf5e4246a6b1a477eb66866947e0bb" url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.1" + dbus: + dependency: transitive + description: + name: dbus + sha256: "79e0c23480ff85dc68de79e2cd6334add97e48f7f4865d17686dd6ea81a47e8c" + url: "https://pub.dev" + source: hosted + version: "0.7.11" desktop_multi_window: dependency: "direct main" description: @@ -334,10 +342,10 @@ packages: dependency: "direct main" description: name: dio - sha256: "253a18bbd4851fecba42f7343a1df3a9a4c1d31a2c1b37e221086b4fa8c8dbc9" + sha256: d90ee57923d1828ac14e492ca49440f65477f4bb1263575900be731a3dac66a9 url: "https://pub.dev" source: hosted - version: "5.8.0+1" + version: "5.9.0" dio_web_adapter: dependency: transitive description: @@ -382,10 +390,10 @@ packages: dependency: "direct dev" description: name: ffigen - sha256: cb3edbfb68ac5283102a2deb7057913d3a1fb16552dacda0c07eb144497e4891 + sha256: "2bd9a420ca42cb5ce8cff5d80f88547b547a042ae26807704b1698714e4464a2" url: "https://pub.dev" source: hosted - version: "19.0.0" + version: "19.1.0" file: dependency: "direct main" description: @@ -398,10 +406,10 @@ packages: dependency: "direct main" description: name: file_picker - sha256: ef9908739bdd9c476353d6adff72e88fd00c625f5b959ae23f7567bd5137db0a + sha256: ef7d2a085c1b1d69d17b6842d0734aad90156de08df6bd3c12496d0bd6ddf8e2 url: "https://pub.dev" source: hosted - version: "10.2.0" + version: "10.3.1" file_sizes: dependency: "direct main" description: @@ -451,10 +459,10 @@ packages: dependency: "direct main" description: name: flutter_hooks - sha256: b772e710d16d7a20c0740c4f855095026b31c7eb5ba3ab67d2bd52021cd9461d + sha256: c3df76c62bb3a9f9bee75c57cdab40abab6123b734c1cd7e9b26a5dbd436eceb url: "https://pub.dev" source: hosted - version: "0.21.2" + version: "0.21.3" flutter_lints: dependency: "direct dev" description: @@ -472,10 +480,10 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: f948e346c12f8d5480d2825e03de228d0eb8c3a737e4cdaa122267b89c022b5e + sha256: "6382ce712ff69b0f719640ce957559dde459e55ecd433c767e06d139ddf16cab" url: "https://pub.dev" source: hosted - version: "2.0.28" + version: "2.0.29" flutter_riverpod: dependency: "direct main" description: @@ -488,10 +496,10 @@ packages: dependency: "direct main" description: name: flutter_rust_bridge - sha256: b416ff56002789e636244fb4cc449f587656eff995e5a7169457eb0593fcaddb + sha256: "37ef40bc6f863652e865f0b2563ea07f0d3c58d8efad803cc01933a4b2ee067e" url: "https://pub.dev" source: hosted - version: "2.10.0" + version: "2.11.1" flutter_staggered_grid_view: dependency: "direct main" description: @@ -517,10 +525,10 @@ packages: dependency: "direct main" description: name: flutter_tilt - sha256: "2bfc76f9962a7706e9a50295098ffc0f53658d67085b1bdfcb20f63421136296" + sha256: "30ec9125ee626aadb0c8de61a21089eb6b84ecb259dc58b5fe22218533d252bf" url: "https://pub.dev" source: hosted - version: "3.2.1" + version: "3.2.3" flutter_web_plugins: dependency: transitive description: flutter @@ -530,26 +538,26 @@ packages: dependency: "direct main" description: name: font_awesome_flutter - sha256: d3a89184101baec7f4600d58840a764d2ef760fe1c5a20ef9e6b0e9b24a07a3a + sha256: f50ce90dbe26d977415b9540400d6778bef00894aced6358ae578abd92b14b10 url: "https://pub.dev" source: hosted - version: "10.8.0" + version: "10.9.0" freezed: dependency: "direct dev" description: name: freezed - sha256: "6022db4c7bfa626841b2a10f34dd1e1b68e8f8f9650db6112dcdeeca45ca793c" + sha256: "2d399f823b8849663744d2a9ddcce01c49268fb4170d0442a655bf6a2f47be22" url: "https://pub.dev" source: hosted - version: "3.0.6" + version: "3.1.0" freezed_annotation: dependency: "direct main" description: name: freezed_annotation - sha256: c87ff004c8aa6af2d531668b46a4ea379f7191dc6dfa066acd53d506da6e044b + sha256: "7294967ff0a6d98638e7acb774aac3af2550777accd8149c90af5b014e6d44d8" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.1.0" frontend_server_client: dependency: transitive description: @@ -562,10 +570,10 @@ packages: dependency: transitive description: name: get_it - sha256: d85128a5dae4ea777324730dc65edd9c9f43155c109d5cc0a69cab74139fbac1 + sha256: a4292e7cf67193f8e7c1258203104eb2a51ec8b3a04baa14695f4064c144297b url: "https://pub.dev" source: hosted - version: "7.7.0" + version: "8.2.0" glob: dependency: transitive description: @@ -578,10 +586,10 @@ packages: dependency: "direct main" description: name: go_router - sha256: "02ff498f6279470ff7f60c998a69b872f26696ceec237c8402e63a2133868ddf" + sha256: "8b1f37dfaf6e958c6b872322db06f946509433bec3de753c3491a42ae9ec2b48" url: "https://pub.dev" source: hosted - version: "15.2.3" + version: "16.1.0" google_identity_services_web: dependency: transitive description: @@ -666,10 +674,10 @@ packages: dependency: "direct overridden" description: name: http - sha256: "2c11f3f94c687ee9bad77c171151672986360b2b001d109814ee7140b2cf261b" + sha256: bb2ce4590bc2667c96f318d68cac1b5a7987ec819351d32b1c987239a815e007 url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.5.0" http2: dependency: transitive description: @@ -794,26 +802,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" + sha256: "8dcda04c3fc16c14f48a7bb586d4be1f0d1572731b6d81d51772ef47c02081e0" url: "https://pub.dev" source: hosted - version: "10.0.9" + version: "11.0.1" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" url: "https://pub.dev" source: hosted - version: "3.0.9" + version: "3.0.10" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" lints: dependency: transitive description: @@ -898,10 +906,10 @@ packages: dependency: "direct dev" description: name: msix - sha256: edde648a8133bf301883c869d19d127049683037c65ff64173ba526ac7a8af2f + sha256: f88033fcb9e0dd8de5b18897cbebbd28ea30596810f4a7c86b12b0c03ace87e5 url: "https://pub.dev" source: hosted - version: "3.16.9" + version: "3.16.12" package_config: dependency: transitive description: @@ -1010,18 +1018,18 @@ packages: dependency: transitive description: name: posix - sha256: f0d7856b6ca1887cfa6d1d394056a296ae33489db914e365e2044fdada449e62 + sha256: "6323a5b0fa688b6a010df4905a56b00181479e6d10534cecfecede2aa55add61" url: "https://pub.dev" source: hosted - version: "6.0.2" + version: "6.0.3" protobuf: dependency: "direct main" description: name: protobuf - sha256: "579fe5557eae58e3adca2e999e38f02441d8aa908703854a9e0a0f47fa857731" + sha256: de9c9eb2c33f8e933a42932fe1dc504800ca45ebc3d673e6ed7f39754ee4053e url: "https://pub.dev" source: hosted - version: "4.1.0" + version: "4.2.0" pub_semver: dependency: transitive description: @@ -1208,10 +1216,10 @@ packages: dependency: transitive description: name: sensors_plus - sha256: "905282c917c6bb731c242f928665c2ea15445aa491249dea9d98d7c79dc8fd39" + sha256: "89e2bfc3d883743539ce5774a2b93df61effde40ff958ecad78cd66b1a8b8d52" url: "https://pub.dev" source: hosted - version: "6.1.1" + version: "6.1.2" sensors_plus_platform_interface: dependency: transitive description: @@ -1253,10 +1261,10 @@ packages: dependency: transitive description: name: source_helper - sha256: "86d247119aedce8e63f4751bd9626fc9613255935558447569ad42f9f5b48b3c" + sha256: a447acb083d3a5ef17f983dd36201aeea33fedadb3228fa831f2f0c92f0f3aca url: "https://pub.dev" source: hosted - version: "1.3.5" + version: "1.3.7" source_span: dependency: transitive description: @@ -1325,10 +1333,10 @@ packages: dependency: "direct main" description: name: synchronized - sha256: "0669c70faae6270521ee4f05bffd2919892d42d1276e6c495be80174b6bc0ef6" + sha256: c254ade258ec8282947a0acbbc90b9575b4f19673533ee46f2f6e9b3aeefd7c0 url: "https://pub.dev" source: hosted - version: "3.3.1" + version: "3.4.0" term_glyph: dependency: transitive description: @@ -1341,10 +1349,10 @@ packages: dependency: transitive description: name: test_api - sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00" url: "https://pub.dev" source: hosted - version: "0.7.4" + version: "0.7.6" timing: dependency: transitive description: @@ -1373,18 +1381,18 @@ packages: dependency: "direct main" description: name: url_launcher - sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" + sha256: f6a7e5c4835bb4e3026a04793a4199ca2d14c739ec378fdfe23fc8075d0439f8 url: "https://pub.dev" source: hosted - version: "6.3.1" + version: "6.3.2" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: "8582d7f6fe14d2652b4c45c9b6c14c0b678c2af2d083a11b604caeba51930d79" + sha256: "0aedad096a85b49df2e4725fa32118f9fa580f3b14af7a2d2221896a02cd5656" url: "https://pub.dev" source: hosted - version: "6.3.16" + version: "6.3.17" url_launcher_ios: dependency: transitive description: @@ -1461,18 +1469,18 @@ packages: dependency: transitive description: name: vector_graphics_compiler - sha256: "557a315b7d2a6dbb0aaaff84d857967ce6bdc96a63dc6ee2a57ce5a6ee5d3331" + sha256: ca81fdfaf62a5ab45d7296614aea108d2c7d0efca8393e96174bf4d51e6725b0 url: "https://pub.dev" source: hosted - version: "1.1.17" + version: "1.1.18" vector_math: dependency: transitive description: name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.2.0" visibility_detector: dependency: transitive description: @@ -1485,10 +1493,10 @@ packages: dependency: transitive description: name: vm_service - sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02 + sha256: "45caa6c5917fa127b5dbcfbd1fa60b14e583afdc08bfc96dda38886ca252eb60" url: "https://pub.dev" source: hosted - version: "15.0.0" + version: "15.0.2" watcher: dependency: "direct main" description: @@ -1533,10 +1541,10 @@ packages: dependency: "direct main" description: name: window_manager - sha256: "51d50168ab267d344b975b15390426b1243600d436770d3f13de67e55b05ec16" + sha256: "7eb6d6c4164ec08e1bf978d6e733f3cebe792e2a23fb07cbca25c2872bfdbdcd" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.5.1" xdg_directories: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index f22edae..798c67f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -5,7 +5,7 @@ publish_to: 'none' version: 1.0.0+1 environment: - sdk: '>=3.0.0 <4.0.0' + sdk: ^3.8.0 dependencies: flutter: @@ -18,7 +18,7 @@ dependencies: flutter_hooks: ^0.21.2 hooks_riverpod: ^2.6.1 json_annotation: ^4.9.0 - go_router: ^15.1.2 + go_router: ^16.1.0 window_manager: ^0.5.0 fluent_ui: ^4.11.5 flutter_staggered_grid_view: ^0.7.0 @@ -43,7 +43,7 @@ dependencies: flutter_tilt: ^3.0.0 card_swiper: ^3.0.1 ffi: ^2.1.0 - flutter_rust_bridge: 2.10.0 + flutter_rust_bridge: ^2.11.1 freezed_annotation: ^3.0.0 meta: ^1.9.1 hexcolor: ^3.0.1 @@ -83,7 +83,7 @@ dev_dependencies: freezed: ^3.0.6 json_serializable: ^6.7.1 riverpod_generator: ^2.6.2 - custom_lint: ^0.7.0 + custom_lint: ^0.7.6 riverpod_lint: ^2.6.2 ffigen: ^19.0.0 sct_dev_tools: diff --git a/rust/Cargo.lock b/rust/Cargo.lock index cc1309e..924ee13 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -51,14 +51,13 @@ checksum = "84521a3cf562bc62942e294181d9eef17eb38ceb8c68677bc49f144e4c3d4f8d" [[package]] name = "android_logger" -version = "0.13.3" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c494134f746c14dc653a35a4ea5aca24ac368529da5370ecf41fe0341c35772f" +checksum = "dbb4e440d04be07da1f1bf44fb4495ebd58669372fe0cffa6e48595ac5bd88a3" dependencies = [ "android_log-sys", - "env_logger", + "env_filter", "log", - "once_cell", ] [[package]] @@ -693,12 +692,15 @@ dependencies = [ [[package]] name = "dashmap" -version = "4.0.2" +version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e77a43b28d0668df09411cb0bc9a8c2adc40f9a048afe863e05fd43251e8e39c" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", - "num_cpus", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", ] [[package]] @@ -823,10 +825,10 @@ dependencies = [ ] [[package]] -name = "env_logger" -version = "0.10.2" +name = "env_filter" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" +checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0" dependencies = [ "log", "regex", @@ -897,9 +899,9 @@ dependencies = [ [[package]] name = "flutter_rust_bridge" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff1d2ad18166cead8c1b92b1c00e64aacc32e6ebd1ac95f77089c276c9c6bd8c" +checksum = "dde126295b2acc5f0a712e265e91b6fdc0ed38767496483e592ae7134db83725" dependencies = [ "allo-isolate", "android_logger", @@ -926,9 +928,9 @@ dependencies = [ [[package]] name = "flutter_rust_bridge_macros" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36cf75fba54902e67db5eef4a520df1c9f604db6f71f106fbc012477e2d81542" +checksum = "d5f0420326b13675321b194928bb7830043b68cf8b810e1c651285c747abb080" dependencies = [ "hex", "md-5", @@ -1150,6 +1152,12 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + [[package]] name = "hashbrown" version = "0.15.3" @@ -1976,9 +1984,9 @@ dependencies = [ [[package]] name = "oslog" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8343ce955f18e7e68c0207dd0ea776ec453035685395ababd2ea651c569728b3" +checksum = "80d2043d1f61d77cb2f4b1f7b7b2295f40507f5f8e9d1c8bf10a1ca5f97a3969" dependencies = [ "cc", "dashmap", @@ -2087,9 +2095,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e" +checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" [[package]] name = "powerfmt" diff --git a/rust/Cargo.toml b/rust/Cargo.toml index d6041f9..86d90e0 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -11,11 +11,11 @@ strip = "debuginfo" crate-type = ["cdylib", "staticlib"] [dependencies] -flutter_rust_bridge = "=2.10.0" +flutter_rust_bridge = "=2.11.1" tokio = { version = "1", features = ["rt", "rt-multi-thread", "macros", "process"] } futures = { version = "0.3", default-features = false, features = ["executor"] } url = "2.5" -once_cell = "1.20" +once_cell = "1.21" reqwest = { version = "0.12", features = ["rustls-tls-webpki-roots", "cookies", "gzip", "json", "stream"] } hickory-resolver = { version = "0.25" } anyhow = "1.0" diff --git a/rust/src/frb_generated.rs b/rust/src/frb_generated.rs index fc48903..69a3d28 100644 --- a/rust/src/frb_generated.rs +++ b/rust/src/frb_generated.rs @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.10.0. +// @generated by `flutter_rust_bridge`@ 2.11.1. #![allow( non_camel_case_types, @@ -36,7 +36,7 @@ flutter_rust_bridge::frb_generated_boilerplate!( default_rust_opaque = RustOpaqueNom, default_rust_auto_opaque = RustAutoOpaqueNom, ); -pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.10.0"; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.11.1"; pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 1832496273; // Section: executor @@ -1144,7 +1144,7 @@ impl SseEncode for () { #[cfg(not(target_family = "wasm"))] mod io { // This file is automatically generated, so please do not edit it. - // @generated by `flutter_rust_bridge`@ 2.10.0. + // @generated by `flutter_rust_bridge`@ 2.11.1. // Section: imports