app_watch_bloc.freezed.dart 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683
  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, invalid_annotation_target
  3. part of 'app_watch_bloc.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 _$AppWatchEventTearOff {
  12. const _$AppWatchEventTearOff();
  13. _Started started() {
  14. return const _Started();
  15. }
  16. ViewsReceived viewsReceived(Either<List<View>, WorkspaceError> viewsOrFail) {
  17. return ViewsReceived(
  18. viewsOrFail,
  19. );
  20. }
  21. }
  22. /// @nodoc
  23. const $AppWatchEvent = _$AppWatchEventTearOff();
  24. /// @nodoc
  25. mixin _$AppWatchEvent {
  26. @optionalTypeArgs
  27. TResult when<TResult extends Object?>({
  28. required TResult Function() started,
  29. required TResult Function(Either<List<View>, WorkspaceError> viewsOrFail)
  30. viewsReceived,
  31. }) =>
  32. throw _privateConstructorUsedError;
  33. @optionalTypeArgs
  34. TResult maybeWhen<TResult extends Object?>({
  35. TResult Function()? started,
  36. TResult Function(Either<List<View>, WorkspaceError> viewsOrFail)?
  37. viewsReceived,
  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(ViewsReceived value) viewsReceived,
  45. }) =>
  46. throw _privateConstructorUsedError;
  47. @optionalTypeArgs
  48. TResult maybeMap<TResult extends Object?>({
  49. TResult Function(_Started value)? started,
  50. TResult Function(ViewsReceived value)? viewsReceived,
  51. required TResult orElse(),
  52. }) =>
  53. throw _privateConstructorUsedError;
  54. }
  55. /// @nodoc
  56. abstract class $AppWatchEventCopyWith<$Res> {
  57. factory $AppWatchEventCopyWith(
  58. AppWatchEvent value, $Res Function(AppWatchEvent) then) =
  59. _$AppWatchEventCopyWithImpl<$Res>;
  60. }
  61. /// @nodoc
  62. class _$AppWatchEventCopyWithImpl<$Res>
  63. implements $AppWatchEventCopyWith<$Res> {
  64. _$AppWatchEventCopyWithImpl(this._value, this._then);
  65. final AppWatchEvent _value;
  66. // ignore: unused_field
  67. final $Res Function(AppWatchEvent) _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 _$AppWatchEventCopyWithImpl<$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 'AppWatchEvent.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<View>, WorkspaceError> viewsOrFail)
  100. viewsReceived,
  101. }) {
  102. return started();
  103. }
  104. @override
  105. @optionalTypeArgs
  106. TResult maybeWhen<TResult extends Object?>({
  107. TResult Function()? started,
  108. TResult Function(Either<List<View>, WorkspaceError> viewsOrFail)?
  109. viewsReceived,
  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(ViewsReceived value) viewsReceived,
  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(ViewsReceived value)? viewsReceived,
  130. required TResult orElse(),
  131. }) {
  132. if (started != null) {
  133. return started(this);
  134. }
  135. return orElse();
  136. }
  137. }
  138. abstract class _Started implements AppWatchEvent {
  139. const factory _Started() = _$_Started;
  140. }
  141. /// @nodoc
  142. abstract class $ViewsReceivedCopyWith<$Res> {
  143. factory $ViewsReceivedCopyWith(
  144. ViewsReceived value, $Res Function(ViewsReceived) then) =
  145. _$ViewsReceivedCopyWithImpl<$Res>;
  146. $Res call({Either<List<View>, WorkspaceError> viewsOrFail});
  147. }
  148. /// @nodoc
  149. class _$ViewsReceivedCopyWithImpl<$Res>
  150. extends _$AppWatchEventCopyWithImpl<$Res>
  151. implements $ViewsReceivedCopyWith<$Res> {
  152. _$ViewsReceivedCopyWithImpl(
  153. ViewsReceived _value, $Res Function(ViewsReceived) _then)
  154. : super(_value, (v) => _then(v as ViewsReceived));
  155. @override
  156. ViewsReceived get _value => super._value as ViewsReceived;
  157. @override
  158. $Res call({
  159. Object? viewsOrFail = freezed,
  160. }) {
  161. return _then(ViewsReceived(
  162. viewsOrFail == freezed
  163. ? _value.viewsOrFail
  164. : viewsOrFail // ignore: cast_nullable_to_non_nullable
  165. as Either<List<View>, WorkspaceError>,
  166. ));
  167. }
  168. }
  169. /// @nodoc
  170. class _$ViewsReceived implements ViewsReceived {
  171. const _$ViewsReceived(this.viewsOrFail);
  172. @override
  173. final Either<List<View>, WorkspaceError> viewsOrFail;
  174. @override
  175. String toString() {
  176. return 'AppWatchEvent.viewsReceived(viewsOrFail: $viewsOrFail)';
  177. }
  178. @override
  179. bool operator ==(dynamic other) {
  180. return identical(this, other) ||
  181. (other is ViewsReceived &&
  182. (identical(other.viewsOrFail, viewsOrFail) ||
  183. const DeepCollectionEquality()
  184. .equals(other.viewsOrFail, viewsOrFail)));
  185. }
  186. @override
  187. int get hashCode =>
  188. runtimeType.hashCode ^ const DeepCollectionEquality().hash(viewsOrFail);
  189. @JsonKey(ignore: true)
  190. @override
  191. $ViewsReceivedCopyWith<ViewsReceived> get copyWith =>
  192. _$ViewsReceivedCopyWithImpl<ViewsReceived>(this, _$identity);
  193. @override
  194. @optionalTypeArgs
  195. TResult when<TResult extends Object?>({
  196. required TResult Function() started,
  197. required TResult Function(Either<List<View>, WorkspaceError> viewsOrFail)
  198. viewsReceived,
  199. }) {
  200. return viewsReceived(viewsOrFail);
  201. }
  202. @override
  203. @optionalTypeArgs
  204. TResult maybeWhen<TResult extends Object?>({
  205. TResult Function()? started,
  206. TResult Function(Either<List<View>, WorkspaceError> viewsOrFail)?
  207. viewsReceived,
  208. required TResult orElse(),
  209. }) {
  210. if (viewsReceived != null) {
  211. return viewsReceived(viewsOrFail);
  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(ViewsReceived value) viewsReceived,
  220. }) {
  221. return viewsReceived(this);
  222. }
  223. @override
  224. @optionalTypeArgs
  225. TResult maybeMap<TResult extends Object?>({
  226. TResult Function(_Started value)? started,
  227. TResult Function(ViewsReceived value)? viewsReceived,
  228. required TResult orElse(),
  229. }) {
  230. if (viewsReceived != null) {
  231. return viewsReceived(this);
  232. }
  233. return orElse();
  234. }
  235. }
  236. abstract class ViewsReceived implements AppWatchEvent {
  237. const factory ViewsReceived(Either<List<View>, WorkspaceError> viewsOrFail) =
  238. _$ViewsReceived;
  239. Either<List<View>, WorkspaceError> get viewsOrFail =>
  240. throw _privateConstructorUsedError;
  241. @JsonKey(ignore: true)
  242. $ViewsReceivedCopyWith<ViewsReceived> get copyWith =>
  243. throw _privateConstructorUsedError;
  244. }
  245. /// @nodoc
  246. class _$AppWatchStateTearOff {
  247. const _$AppWatchStateTearOff();
  248. _Initial initial() {
  249. return const _Initial();
  250. }
  251. _LoadViews loadViews(List<View> views) {
  252. return _LoadViews(
  253. views,
  254. );
  255. }
  256. _LoadFail loadFail(WorkspaceError error) {
  257. return _LoadFail(
  258. error,
  259. );
  260. }
  261. }
  262. /// @nodoc
  263. const $AppWatchState = _$AppWatchStateTearOff();
  264. /// @nodoc
  265. mixin _$AppWatchState {
  266. @optionalTypeArgs
  267. TResult when<TResult extends Object?>({
  268. required TResult Function() initial,
  269. required TResult Function(List<View> views) loadViews,
  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<View> views)? loadViews,
  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(_LoadViews value) loadViews,
  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(_LoadViews value)? loadViews,
  292. TResult Function(_LoadFail value)? loadFail,
  293. required TResult orElse(),
  294. }) =>
  295. throw _privateConstructorUsedError;
  296. }
  297. /// @nodoc
  298. abstract class $AppWatchStateCopyWith<$Res> {
  299. factory $AppWatchStateCopyWith(
  300. AppWatchState value, $Res Function(AppWatchState) then) =
  301. _$AppWatchStateCopyWithImpl<$Res>;
  302. }
  303. /// @nodoc
  304. class _$AppWatchStateCopyWithImpl<$Res>
  305. implements $AppWatchStateCopyWith<$Res> {
  306. _$AppWatchStateCopyWithImpl(this._value, this._then);
  307. final AppWatchState _value;
  308. // ignore: unused_field
  309. final $Res Function(AppWatchState) _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 _$AppWatchStateCopyWithImpl<$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 'AppWatchState.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<View> views) loadViews,
  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<View> views)? loadViews,
  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(_LoadViews value) loadViews,
  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(_LoadViews value)? loadViews,
  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 AppWatchState {
  383. const factory _Initial() = _$_Initial;
  384. }
  385. /// @nodoc
  386. abstract class _$LoadViewsCopyWith<$Res> {
  387. factory _$LoadViewsCopyWith(
  388. _LoadViews value, $Res Function(_LoadViews) then) =
  389. __$LoadViewsCopyWithImpl<$Res>;
  390. $Res call({List<View> views});
  391. }
  392. /// @nodoc
  393. class __$LoadViewsCopyWithImpl<$Res> extends _$AppWatchStateCopyWithImpl<$Res>
  394. implements _$LoadViewsCopyWith<$Res> {
  395. __$LoadViewsCopyWithImpl(_LoadViews _value, $Res Function(_LoadViews) _then)
  396. : super(_value, (v) => _then(v as _LoadViews));
  397. @override
  398. _LoadViews get _value => super._value as _LoadViews;
  399. @override
  400. $Res call({
  401. Object? views = freezed,
  402. }) {
  403. return _then(_LoadViews(
  404. views == freezed
  405. ? _value.views
  406. : views // ignore: cast_nullable_to_non_nullable
  407. as List<View>,
  408. ));
  409. }
  410. }
  411. /// @nodoc
  412. class _$_LoadViews implements _LoadViews {
  413. const _$_LoadViews(this.views);
  414. @override
  415. final List<View> views;
  416. @override
  417. String toString() {
  418. return 'AppWatchState.loadViews(views: $views)';
  419. }
  420. @override
  421. bool operator ==(dynamic other) {
  422. return identical(this, other) ||
  423. (other is _LoadViews &&
  424. (identical(other.views, views) ||
  425. const DeepCollectionEquality().equals(other.views, views)));
  426. }
  427. @override
  428. int get hashCode =>
  429. runtimeType.hashCode ^ const DeepCollectionEquality().hash(views);
  430. @JsonKey(ignore: true)
  431. @override
  432. _$LoadViewsCopyWith<_LoadViews> get copyWith =>
  433. __$LoadViewsCopyWithImpl<_LoadViews>(this, _$identity);
  434. @override
  435. @optionalTypeArgs
  436. TResult when<TResult extends Object?>({
  437. required TResult Function() initial,
  438. required TResult Function(List<View> views) loadViews,
  439. required TResult Function(WorkspaceError error) loadFail,
  440. }) {
  441. return loadViews(views);
  442. }
  443. @override
  444. @optionalTypeArgs
  445. TResult maybeWhen<TResult extends Object?>({
  446. TResult Function()? initial,
  447. TResult Function(List<View> views)? loadViews,
  448. TResult Function(WorkspaceError error)? loadFail,
  449. required TResult orElse(),
  450. }) {
  451. if (loadViews != null) {
  452. return loadViews(views);
  453. }
  454. return orElse();
  455. }
  456. @override
  457. @optionalTypeArgs
  458. TResult map<TResult extends Object?>({
  459. required TResult Function(_Initial value) initial,
  460. required TResult Function(_LoadViews value) loadViews,
  461. required TResult Function(_LoadFail value) loadFail,
  462. }) {
  463. return loadViews(this);
  464. }
  465. @override
  466. @optionalTypeArgs
  467. TResult maybeMap<TResult extends Object?>({
  468. TResult Function(_Initial value)? initial,
  469. TResult Function(_LoadViews value)? loadViews,
  470. TResult Function(_LoadFail value)? loadFail,
  471. required TResult orElse(),
  472. }) {
  473. if (loadViews != null) {
  474. return loadViews(this);
  475. }
  476. return orElse();
  477. }
  478. }
  479. abstract class _LoadViews implements AppWatchState {
  480. const factory _LoadViews(List<View> views) = _$_LoadViews;
  481. List<View> get views => throw _privateConstructorUsedError;
  482. @JsonKey(ignore: true)
  483. _$LoadViewsCopyWith<_LoadViews> get copyWith =>
  484. throw _privateConstructorUsedError;
  485. }
  486. /// @nodoc
  487. abstract class _$LoadFailCopyWith<$Res> {
  488. factory _$LoadFailCopyWith(_LoadFail value, $Res Function(_LoadFail) then) =
  489. __$LoadFailCopyWithImpl<$Res>;
  490. $Res call({WorkspaceError error});
  491. }
  492. /// @nodoc
  493. class __$LoadFailCopyWithImpl<$Res> extends _$AppWatchStateCopyWithImpl<$Res>
  494. implements _$LoadFailCopyWith<$Res> {
  495. __$LoadFailCopyWithImpl(_LoadFail _value, $Res Function(_LoadFail) _then)
  496. : super(_value, (v) => _then(v as _LoadFail));
  497. @override
  498. _LoadFail get _value => super._value as _LoadFail;
  499. @override
  500. $Res call({
  501. Object? error = freezed,
  502. }) {
  503. return _then(_LoadFail(
  504. error == freezed
  505. ? _value.error
  506. : error // ignore: cast_nullable_to_non_nullable
  507. as WorkspaceError,
  508. ));
  509. }
  510. }
  511. /// @nodoc
  512. class _$_LoadFail implements _LoadFail {
  513. const _$_LoadFail(this.error);
  514. @override
  515. final WorkspaceError error;
  516. @override
  517. String toString() {
  518. return 'AppWatchState.loadFail(error: $error)';
  519. }
  520. @override
  521. bool operator ==(dynamic other) {
  522. return identical(this, other) ||
  523. (other is _LoadFail &&
  524. (identical(other.error, error) ||
  525. const DeepCollectionEquality().equals(other.error, error)));
  526. }
  527. @override
  528. int get hashCode =>
  529. runtimeType.hashCode ^ const DeepCollectionEquality().hash(error);
  530. @JsonKey(ignore: true)
  531. @override
  532. _$LoadFailCopyWith<_LoadFail> get copyWith =>
  533. __$LoadFailCopyWithImpl<_LoadFail>(this, _$identity);
  534. @override
  535. @optionalTypeArgs
  536. TResult when<TResult extends Object?>({
  537. required TResult Function() initial,
  538. required TResult Function(List<View> views) loadViews,
  539. required TResult Function(WorkspaceError error) loadFail,
  540. }) {
  541. return loadFail(error);
  542. }
  543. @override
  544. @optionalTypeArgs
  545. TResult maybeWhen<TResult extends Object?>({
  546. TResult Function()? initial,
  547. TResult Function(List<View> views)? loadViews,
  548. TResult Function(WorkspaceError error)? loadFail,
  549. required TResult orElse(),
  550. }) {
  551. if (loadFail != null) {
  552. return loadFail(error);
  553. }
  554. return orElse();
  555. }
  556. @override
  557. @optionalTypeArgs
  558. TResult map<TResult extends Object?>({
  559. required TResult Function(_Initial value) initial,
  560. required TResult Function(_LoadViews value) loadViews,
  561. required TResult Function(_LoadFail value) loadFail,
  562. }) {
  563. return loadFail(this);
  564. }
  565. @override
  566. @optionalTypeArgs
  567. TResult maybeMap<TResult extends Object?>({
  568. TResult Function(_Initial value)? initial,
  569. TResult Function(_LoadViews value)? loadViews,
  570. TResult Function(_LoadFail value)? loadFail,
  571. required TResult orElse(),
  572. }) {
  573. if (loadFail != null) {
  574. return loadFail(this);
  575. }
  576. return orElse();
  577. }
  578. }
  579. abstract class _LoadFail implements AppWatchState {
  580. const factory _LoadFail(WorkspaceError error) = _$_LoadFail;
  581. WorkspaceError get error => throw _privateConstructorUsedError;
  582. @JsonKey(ignore: true)
  583. _$LoadFailCopyWith<_LoadFail> get copyWith =>
  584. throw _privateConstructorUsedError;
  585. }