menu_watch.freezed.dart 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682
  1. // GENERATED CODE - DO NOT MODIFY BY HAND
  2. // 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
  3. part of 'menu_watch.dart';
  4. // **************************************************************************
  5. // FreezedGenerator
  6. // **************************************************************************
  7. T _$identity<T>(T value) => value;
  8. final _privateConstructorUsedError = UnsupportedError(
  9. 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more informations: https://github.com/rrousselGit/freezed#custom-getters-and-methods');
  10. /// @nodoc
  11. class _$MenuWatchEventTearOff {
  12. const _$MenuWatchEventTearOff();
  13. _Started started() {
  14. return const _Started();
  15. }
  16. AppsReceived appsReceived(Either<List<App>, WorkspaceError> appsOrFail) {
  17. return AppsReceived(
  18. appsOrFail,
  19. );
  20. }
  21. }
  22. /// @nodoc
  23. const $MenuWatchEvent = _$MenuWatchEventTearOff();
  24. /// @nodoc
  25. mixin _$MenuWatchEvent {
  26. @optionalTypeArgs
  27. TResult when<TResult extends Object?>({
  28. required TResult Function() started,
  29. required TResult Function(Either<List<App>, WorkspaceError> appsOrFail)
  30. appsReceived,
  31. }) =>
  32. throw _privateConstructorUsedError;
  33. @optionalTypeArgs
  34. TResult maybeWhen<TResult extends Object?>({
  35. TResult Function()? started,
  36. TResult Function(Either<List<App>, WorkspaceError> appsOrFail)?
  37. appsReceived,
  38. required TResult orElse(),
  39. }) =>
  40. throw _privateConstructorUsedError;
  41. @optionalTypeArgs
  42. TResult map<TResult extends Object?>({
  43. required TResult Function(_Started value) started,
  44. required TResult Function(AppsReceived value) appsReceived,
  45. }) =>
  46. throw _privateConstructorUsedError;
  47. @optionalTypeArgs
  48. TResult maybeMap<TResult extends Object?>({
  49. TResult Function(_Started value)? started,
  50. TResult Function(AppsReceived value)? appsReceived,
  51. required TResult orElse(),
  52. }) =>
  53. throw _privateConstructorUsedError;
  54. }
  55. /// @nodoc
  56. abstract class $MenuWatchEventCopyWith<$Res> {
  57. factory $MenuWatchEventCopyWith(
  58. MenuWatchEvent value, $Res Function(MenuWatchEvent) then) =
  59. _$MenuWatchEventCopyWithImpl<$Res>;
  60. }
  61. /// @nodoc
  62. class _$MenuWatchEventCopyWithImpl<$Res>
  63. implements $MenuWatchEventCopyWith<$Res> {
  64. _$MenuWatchEventCopyWithImpl(this._value, this._then);
  65. final MenuWatchEvent _value;
  66. // ignore: unused_field
  67. final $Res Function(MenuWatchEvent) _then;
  68. }
  69. /// @nodoc
  70. abstract class _$StartedCopyWith<$Res> {
  71. factory _$StartedCopyWith(_Started value, $Res Function(_Started) then) =
  72. __$StartedCopyWithImpl<$Res>;
  73. }
  74. /// @nodoc
  75. class __$StartedCopyWithImpl<$Res> extends _$MenuWatchEventCopyWithImpl<$Res>
  76. implements _$StartedCopyWith<$Res> {
  77. __$StartedCopyWithImpl(_Started _value, $Res Function(_Started) _then)
  78. : super(_value, (v) => _then(v as _Started));
  79. @override
  80. _Started get _value => super._value as _Started;
  81. }
  82. /// @nodoc
  83. class _$_Started implements _Started {
  84. const _$_Started();
  85. @override
  86. String toString() {
  87. return 'MenuWatchEvent.started()';
  88. }
  89. @override
  90. bool operator ==(dynamic other) {
  91. return identical(this, other) || (other is _Started);
  92. }
  93. @override
  94. int get hashCode => runtimeType.hashCode;
  95. @override
  96. @optionalTypeArgs
  97. TResult when<TResult extends Object?>({
  98. required TResult Function() started,
  99. required TResult Function(Either<List<App>, WorkspaceError> appsOrFail)
  100. appsReceived,
  101. }) {
  102. return started();
  103. }
  104. @override
  105. @optionalTypeArgs
  106. TResult maybeWhen<TResult extends Object?>({
  107. TResult Function()? started,
  108. TResult Function(Either<List<App>, WorkspaceError> appsOrFail)?
  109. appsReceived,
  110. required TResult orElse(),
  111. }) {
  112. if (started != null) {
  113. return started();
  114. }
  115. return orElse();
  116. }
  117. @override
  118. @optionalTypeArgs
  119. TResult map<TResult extends Object?>({
  120. required TResult Function(_Started value) started,
  121. required TResult Function(AppsReceived value) appsReceived,
  122. }) {
  123. return started(this);
  124. }
  125. @override
  126. @optionalTypeArgs
  127. TResult maybeMap<TResult extends Object?>({
  128. TResult Function(_Started value)? started,
  129. TResult Function(AppsReceived value)? appsReceived,
  130. required TResult orElse(),
  131. }) {
  132. if (started != null) {
  133. return started(this);
  134. }
  135. return orElse();
  136. }
  137. }
  138. abstract class _Started implements MenuWatchEvent {
  139. const factory _Started() = _$_Started;
  140. }
  141. /// @nodoc
  142. abstract class $AppsReceivedCopyWith<$Res> {
  143. factory $AppsReceivedCopyWith(
  144. AppsReceived value, $Res Function(AppsReceived) then) =
  145. _$AppsReceivedCopyWithImpl<$Res>;
  146. $Res call({Either<List<App>, WorkspaceError> appsOrFail});
  147. }
  148. /// @nodoc
  149. class _$AppsReceivedCopyWithImpl<$Res>
  150. extends _$MenuWatchEventCopyWithImpl<$Res>
  151. implements $AppsReceivedCopyWith<$Res> {
  152. _$AppsReceivedCopyWithImpl(
  153. AppsReceived _value, $Res Function(AppsReceived) _then)
  154. : super(_value, (v) => _then(v as AppsReceived));
  155. @override
  156. AppsReceived get _value => super._value as AppsReceived;
  157. @override
  158. $Res call({
  159. Object? appsOrFail = freezed,
  160. }) {
  161. return _then(AppsReceived(
  162. appsOrFail == freezed
  163. ? _value.appsOrFail
  164. : appsOrFail // ignore: cast_nullable_to_non_nullable
  165. as Either<List<App>, WorkspaceError>,
  166. ));
  167. }
  168. }
  169. /// @nodoc
  170. class _$AppsReceived implements AppsReceived {
  171. const _$AppsReceived(this.appsOrFail);
  172. @override
  173. final Either<List<App>, WorkspaceError> appsOrFail;
  174. @override
  175. String toString() {
  176. return 'MenuWatchEvent.appsReceived(appsOrFail: $appsOrFail)';
  177. }
  178. @override
  179. bool operator ==(dynamic other) {
  180. return identical(this, other) ||
  181. (other is AppsReceived &&
  182. (identical(other.appsOrFail, appsOrFail) ||
  183. const DeepCollectionEquality()
  184. .equals(other.appsOrFail, appsOrFail)));
  185. }
  186. @override
  187. int get hashCode =>
  188. runtimeType.hashCode ^ const DeepCollectionEquality().hash(appsOrFail);
  189. @JsonKey(ignore: true)
  190. @override
  191. $AppsReceivedCopyWith<AppsReceived> get copyWith =>
  192. _$AppsReceivedCopyWithImpl<AppsReceived>(this, _$identity);
  193. @override
  194. @optionalTypeArgs
  195. TResult when<TResult extends Object?>({
  196. required TResult Function() started,
  197. required TResult Function(Either<List<App>, WorkspaceError> appsOrFail)
  198. appsReceived,
  199. }) {
  200. return appsReceived(appsOrFail);
  201. }
  202. @override
  203. @optionalTypeArgs
  204. TResult maybeWhen<TResult extends Object?>({
  205. TResult Function()? started,
  206. TResult Function(Either<List<App>, WorkspaceError> appsOrFail)?
  207. appsReceived,
  208. required TResult orElse(),
  209. }) {
  210. if (appsReceived != null) {
  211. return appsReceived(appsOrFail);
  212. }
  213. return orElse();
  214. }
  215. @override
  216. @optionalTypeArgs
  217. TResult map<TResult extends Object?>({
  218. required TResult Function(_Started value) started,
  219. required TResult Function(AppsReceived value) appsReceived,
  220. }) {
  221. return appsReceived(this);
  222. }
  223. @override
  224. @optionalTypeArgs
  225. TResult maybeMap<TResult extends Object?>({
  226. TResult Function(_Started value)? started,
  227. TResult Function(AppsReceived value)? appsReceived,
  228. required TResult orElse(),
  229. }) {
  230. if (appsReceived != null) {
  231. return appsReceived(this);
  232. }
  233. return orElse();
  234. }
  235. }
  236. abstract class AppsReceived implements MenuWatchEvent {
  237. const factory AppsReceived(Either<List<App>, WorkspaceError> appsOrFail) =
  238. _$AppsReceived;
  239. Either<List<App>, WorkspaceError> get appsOrFail =>
  240. throw _privateConstructorUsedError;
  241. @JsonKey(ignore: true)
  242. $AppsReceivedCopyWith<AppsReceived> get copyWith =>
  243. throw _privateConstructorUsedError;
  244. }
  245. /// @nodoc
  246. class _$MenuWatchStateTearOff {
  247. const _$MenuWatchStateTearOff();
  248. _Initial initial() {
  249. return const _Initial();
  250. }
  251. _LoadApps loadApps(List<App> apps) {
  252. return _LoadApps(
  253. apps,
  254. );
  255. }
  256. _LoadFail loadFail(WorkspaceError error) {
  257. return _LoadFail(
  258. error,
  259. );
  260. }
  261. }
  262. /// @nodoc
  263. const $MenuWatchState = _$MenuWatchStateTearOff();
  264. /// @nodoc
  265. mixin _$MenuWatchState {
  266. @optionalTypeArgs
  267. TResult when<TResult extends Object?>({
  268. required TResult Function() initial,
  269. required TResult Function(List<App> apps) loadApps,
  270. required TResult Function(WorkspaceError error) loadFail,
  271. }) =>
  272. throw _privateConstructorUsedError;
  273. @optionalTypeArgs
  274. TResult maybeWhen<TResult extends Object?>({
  275. TResult Function()? initial,
  276. TResult Function(List<App> apps)? loadApps,
  277. TResult Function(WorkspaceError error)? loadFail,
  278. required TResult orElse(),
  279. }) =>
  280. throw _privateConstructorUsedError;
  281. @optionalTypeArgs
  282. TResult map<TResult extends Object?>({
  283. required TResult Function(_Initial value) initial,
  284. required TResult Function(_LoadApps value) loadApps,
  285. required TResult Function(_LoadFail value) loadFail,
  286. }) =>
  287. throw _privateConstructorUsedError;
  288. @optionalTypeArgs
  289. TResult maybeMap<TResult extends Object?>({
  290. TResult Function(_Initial value)? initial,
  291. TResult Function(_LoadApps value)? loadApps,
  292. TResult Function(_LoadFail value)? loadFail,
  293. required TResult orElse(),
  294. }) =>
  295. throw _privateConstructorUsedError;
  296. }
  297. /// @nodoc
  298. abstract class $MenuWatchStateCopyWith<$Res> {
  299. factory $MenuWatchStateCopyWith(
  300. MenuWatchState value, $Res Function(MenuWatchState) then) =
  301. _$MenuWatchStateCopyWithImpl<$Res>;
  302. }
  303. /// @nodoc
  304. class _$MenuWatchStateCopyWithImpl<$Res>
  305. implements $MenuWatchStateCopyWith<$Res> {
  306. _$MenuWatchStateCopyWithImpl(this._value, this._then);
  307. final MenuWatchState _value;
  308. // ignore: unused_field
  309. final $Res Function(MenuWatchState) _then;
  310. }
  311. /// @nodoc
  312. abstract class _$InitialCopyWith<$Res> {
  313. factory _$InitialCopyWith(_Initial value, $Res Function(_Initial) then) =
  314. __$InitialCopyWithImpl<$Res>;
  315. }
  316. /// @nodoc
  317. class __$InitialCopyWithImpl<$Res> extends _$MenuWatchStateCopyWithImpl<$Res>
  318. implements _$InitialCopyWith<$Res> {
  319. __$InitialCopyWithImpl(_Initial _value, $Res Function(_Initial) _then)
  320. : super(_value, (v) => _then(v as _Initial));
  321. @override
  322. _Initial get _value => super._value as _Initial;
  323. }
  324. /// @nodoc
  325. class _$_Initial implements _Initial {
  326. const _$_Initial();
  327. @override
  328. String toString() {
  329. return 'MenuWatchState.initial()';
  330. }
  331. @override
  332. bool operator ==(dynamic other) {
  333. return identical(this, other) || (other is _Initial);
  334. }
  335. @override
  336. int get hashCode => runtimeType.hashCode;
  337. @override
  338. @optionalTypeArgs
  339. TResult when<TResult extends Object?>({
  340. required TResult Function() initial,
  341. required TResult Function(List<App> apps) loadApps,
  342. required TResult Function(WorkspaceError error) loadFail,
  343. }) {
  344. return initial();
  345. }
  346. @override
  347. @optionalTypeArgs
  348. TResult maybeWhen<TResult extends Object?>({
  349. TResult Function()? initial,
  350. TResult Function(List<App> apps)? loadApps,
  351. TResult Function(WorkspaceError error)? loadFail,
  352. required TResult orElse(),
  353. }) {
  354. if (initial != null) {
  355. return initial();
  356. }
  357. return orElse();
  358. }
  359. @override
  360. @optionalTypeArgs
  361. TResult map<TResult extends Object?>({
  362. required TResult Function(_Initial value) initial,
  363. required TResult Function(_LoadApps value) loadApps,
  364. required TResult Function(_LoadFail value) loadFail,
  365. }) {
  366. return initial(this);
  367. }
  368. @override
  369. @optionalTypeArgs
  370. TResult maybeMap<TResult extends Object?>({
  371. TResult Function(_Initial value)? initial,
  372. TResult Function(_LoadApps value)? loadApps,
  373. TResult Function(_LoadFail value)? loadFail,
  374. required TResult orElse(),
  375. }) {
  376. if (initial != null) {
  377. return initial(this);
  378. }
  379. return orElse();
  380. }
  381. }
  382. abstract class _Initial implements MenuWatchState {
  383. const factory _Initial() = _$_Initial;
  384. }
  385. /// @nodoc
  386. abstract class _$LoadAppsCopyWith<$Res> {
  387. factory _$LoadAppsCopyWith(_LoadApps value, $Res Function(_LoadApps) then) =
  388. __$LoadAppsCopyWithImpl<$Res>;
  389. $Res call({List<App> apps});
  390. }
  391. /// @nodoc
  392. class __$LoadAppsCopyWithImpl<$Res> extends _$MenuWatchStateCopyWithImpl<$Res>
  393. implements _$LoadAppsCopyWith<$Res> {
  394. __$LoadAppsCopyWithImpl(_LoadApps _value, $Res Function(_LoadApps) _then)
  395. : super(_value, (v) => _then(v as _LoadApps));
  396. @override
  397. _LoadApps get _value => super._value as _LoadApps;
  398. @override
  399. $Res call({
  400. Object? apps = freezed,
  401. }) {
  402. return _then(_LoadApps(
  403. apps == freezed
  404. ? _value.apps
  405. : apps // ignore: cast_nullable_to_non_nullable
  406. as List<App>,
  407. ));
  408. }
  409. }
  410. /// @nodoc
  411. class _$_LoadApps implements _LoadApps {
  412. const _$_LoadApps(this.apps);
  413. @override
  414. final List<App> apps;
  415. @override
  416. String toString() {
  417. return 'MenuWatchState.loadApps(apps: $apps)';
  418. }
  419. @override
  420. bool operator ==(dynamic other) {
  421. return identical(this, other) ||
  422. (other is _LoadApps &&
  423. (identical(other.apps, apps) ||
  424. const DeepCollectionEquality().equals(other.apps, apps)));
  425. }
  426. @override
  427. int get hashCode =>
  428. runtimeType.hashCode ^ const DeepCollectionEquality().hash(apps);
  429. @JsonKey(ignore: true)
  430. @override
  431. _$LoadAppsCopyWith<_LoadApps> get copyWith =>
  432. __$LoadAppsCopyWithImpl<_LoadApps>(this, _$identity);
  433. @override
  434. @optionalTypeArgs
  435. TResult when<TResult extends Object?>({
  436. required TResult Function() initial,
  437. required TResult Function(List<App> apps) loadApps,
  438. required TResult Function(WorkspaceError error) loadFail,
  439. }) {
  440. return loadApps(apps);
  441. }
  442. @override
  443. @optionalTypeArgs
  444. TResult maybeWhen<TResult extends Object?>({
  445. TResult Function()? initial,
  446. TResult Function(List<App> apps)? loadApps,
  447. TResult Function(WorkspaceError error)? loadFail,
  448. required TResult orElse(),
  449. }) {
  450. if (loadApps != null) {
  451. return loadApps(apps);
  452. }
  453. return orElse();
  454. }
  455. @override
  456. @optionalTypeArgs
  457. TResult map<TResult extends Object?>({
  458. required TResult Function(_Initial value) initial,
  459. required TResult Function(_LoadApps value) loadApps,
  460. required TResult Function(_LoadFail value) loadFail,
  461. }) {
  462. return loadApps(this);
  463. }
  464. @override
  465. @optionalTypeArgs
  466. TResult maybeMap<TResult extends Object?>({
  467. TResult Function(_Initial value)? initial,
  468. TResult Function(_LoadApps value)? loadApps,
  469. TResult Function(_LoadFail value)? loadFail,
  470. required TResult orElse(),
  471. }) {
  472. if (loadApps != null) {
  473. return loadApps(this);
  474. }
  475. return orElse();
  476. }
  477. }
  478. abstract class _LoadApps implements MenuWatchState {
  479. const factory _LoadApps(List<App> apps) = _$_LoadApps;
  480. List<App> get apps => throw _privateConstructorUsedError;
  481. @JsonKey(ignore: true)
  482. _$LoadAppsCopyWith<_LoadApps> get copyWith =>
  483. throw _privateConstructorUsedError;
  484. }
  485. /// @nodoc
  486. abstract class _$LoadFailCopyWith<$Res> {
  487. factory _$LoadFailCopyWith(_LoadFail value, $Res Function(_LoadFail) then) =
  488. __$LoadFailCopyWithImpl<$Res>;
  489. $Res call({WorkspaceError error});
  490. }
  491. /// @nodoc
  492. class __$LoadFailCopyWithImpl<$Res> extends _$MenuWatchStateCopyWithImpl<$Res>
  493. implements _$LoadFailCopyWith<$Res> {
  494. __$LoadFailCopyWithImpl(_LoadFail _value, $Res Function(_LoadFail) _then)
  495. : super(_value, (v) => _then(v as _LoadFail));
  496. @override
  497. _LoadFail get _value => super._value as _LoadFail;
  498. @override
  499. $Res call({
  500. Object? error = freezed,
  501. }) {
  502. return _then(_LoadFail(
  503. error == freezed
  504. ? _value.error
  505. : error // ignore: cast_nullable_to_non_nullable
  506. as WorkspaceError,
  507. ));
  508. }
  509. }
  510. /// @nodoc
  511. class _$_LoadFail implements _LoadFail {
  512. const _$_LoadFail(this.error);
  513. @override
  514. final WorkspaceError error;
  515. @override
  516. String toString() {
  517. return 'MenuWatchState.loadFail(error: $error)';
  518. }
  519. @override
  520. bool operator ==(dynamic other) {
  521. return identical(this, other) ||
  522. (other is _LoadFail &&
  523. (identical(other.error, error) ||
  524. const DeepCollectionEquality().equals(other.error, error)));
  525. }
  526. @override
  527. int get hashCode =>
  528. runtimeType.hashCode ^ const DeepCollectionEquality().hash(error);
  529. @JsonKey(ignore: true)
  530. @override
  531. _$LoadFailCopyWith<_LoadFail> get copyWith =>
  532. __$LoadFailCopyWithImpl<_LoadFail>(this, _$identity);
  533. @override
  534. @optionalTypeArgs
  535. TResult when<TResult extends Object?>({
  536. required TResult Function() initial,
  537. required TResult Function(List<App> apps) loadApps,
  538. required TResult Function(WorkspaceError error) loadFail,
  539. }) {
  540. return loadFail(error);
  541. }
  542. @override
  543. @optionalTypeArgs
  544. TResult maybeWhen<TResult extends Object?>({
  545. TResult Function()? initial,
  546. TResult Function(List<App> apps)? loadApps,
  547. TResult Function(WorkspaceError error)? loadFail,
  548. required TResult orElse(),
  549. }) {
  550. if (loadFail != null) {
  551. return loadFail(error);
  552. }
  553. return orElse();
  554. }
  555. @override
  556. @optionalTypeArgs
  557. TResult map<TResult extends Object?>({
  558. required TResult Function(_Initial value) initial,
  559. required TResult Function(_LoadApps value) loadApps,
  560. required TResult Function(_LoadFail value) loadFail,
  561. }) {
  562. return loadFail(this);
  563. }
  564. @override
  565. @optionalTypeArgs
  566. TResult maybeMap<TResult extends Object?>({
  567. TResult Function(_Initial value)? initial,
  568. TResult Function(_LoadApps value)? loadApps,
  569. TResult Function(_LoadFail value)? loadFail,
  570. required TResult orElse(),
  571. }) {
  572. if (loadFail != null) {
  573. return loadFail(this);
  574. }
  575. return orElse();
  576. }
  577. }
  578. abstract class _LoadFail implements MenuWatchState {
  579. const factory _LoadFail(WorkspaceError error) = _$_LoadFail;
  580. WorkspaceError get error => throw _privateConstructorUsedError;
  581. @JsonKey(ignore: true)
  582. _$LoadFailCopyWith<_LoadFail> get copyWith =>
  583. throw _privateConstructorUsedError;
  584. }