doc_bloc.freezed.dart 27 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027
  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 'doc_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 _$DocEventTearOff {
  12. const _$DocEventTearOff();
  13. Initial initial() {
  14. return const Initial();
  15. }
  16. Deleted deleted() {
  17. return const Deleted();
  18. }
  19. Restore restore() {
  20. return const Restore();
  21. }
  22. RestorePage restorePage() {
  23. return const RestorePage();
  24. }
  25. DeletePermanently deletePermanently() {
  26. return const DeletePermanently();
  27. }
  28. }
  29. /// @nodoc
  30. const $DocEvent = _$DocEventTearOff();
  31. /// @nodoc
  32. mixin _$DocEvent {
  33. @optionalTypeArgs
  34. TResult when<TResult extends Object?>({
  35. required TResult Function() initial,
  36. required TResult Function() deleted,
  37. required TResult Function() restore,
  38. required TResult Function() restorePage,
  39. required TResult Function() deletePermanently,
  40. }) =>
  41. throw _privateConstructorUsedError;
  42. @optionalTypeArgs
  43. TResult maybeWhen<TResult extends Object?>({
  44. TResult Function()? initial,
  45. TResult Function()? deleted,
  46. TResult Function()? restore,
  47. TResult Function()? restorePage,
  48. TResult Function()? deletePermanently,
  49. required TResult orElse(),
  50. }) =>
  51. throw _privateConstructorUsedError;
  52. @optionalTypeArgs
  53. TResult map<TResult extends Object?>({
  54. required TResult Function(Initial value) initial,
  55. required TResult Function(Deleted value) deleted,
  56. required TResult Function(Restore value) restore,
  57. required TResult Function(RestorePage value) restorePage,
  58. required TResult Function(DeletePermanently value) deletePermanently,
  59. }) =>
  60. throw _privateConstructorUsedError;
  61. @optionalTypeArgs
  62. TResult maybeMap<TResult extends Object?>({
  63. TResult Function(Initial value)? initial,
  64. TResult Function(Deleted value)? deleted,
  65. TResult Function(Restore value)? restore,
  66. TResult Function(RestorePage value)? restorePage,
  67. TResult Function(DeletePermanently value)? deletePermanently,
  68. required TResult orElse(),
  69. }) =>
  70. throw _privateConstructorUsedError;
  71. }
  72. /// @nodoc
  73. abstract class $DocEventCopyWith<$Res> {
  74. factory $DocEventCopyWith(DocEvent value, $Res Function(DocEvent) then) =
  75. _$DocEventCopyWithImpl<$Res>;
  76. }
  77. /// @nodoc
  78. class _$DocEventCopyWithImpl<$Res> implements $DocEventCopyWith<$Res> {
  79. _$DocEventCopyWithImpl(this._value, this._then);
  80. final DocEvent _value;
  81. // ignore: unused_field
  82. final $Res Function(DocEvent) _then;
  83. }
  84. /// @nodoc
  85. abstract class $InitialCopyWith<$Res> {
  86. factory $InitialCopyWith(Initial value, $Res Function(Initial) then) =
  87. _$InitialCopyWithImpl<$Res>;
  88. }
  89. /// @nodoc
  90. class _$InitialCopyWithImpl<$Res> extends _$DocEventCopyWithImpl<$Res>
  91. implements $InitialCopyWith<$Res> {
  92. _$InitialCopyWithImpl(Initial _value, $Res Function(Initial) _then)
  93. : super(_value, (v) => _then(v as Initial));
  94. @override
  95. Initial get _value => super._value as Initial;
  96. }
  97. /// @nodoc
  98. class _$Initial implements Initial {
  99. const _$Initial();
  100. @override
  101. String toString() {
  102. return 'DocEvent.initial()';
  103. }
  104. @override
  105. bool operator ==(dynamic other) {
  106. return identical(this, other) || (other is Initial);
  107. }
  108. @override
  109. int get hashCode => runtimeType.hashCode;
  110. @override
  111. @optionalTypeArgs
  112. TResult when<TResult extends Object?>({
  113. required TResult Function() initial,
  114. required TResult Function() deleted,
  115. required TResult Function() restore,
  116. required TResult Function() restorePage,
  117. required TResult Function() deletePermanently,
  118. }) {
  119. return initial();
  120. }
  121. @override
  122. @optionalTypeArgs
  123. TResult maybeWhen<TResult extends Object?>({
  124. TResult Function()? initial,
  125. TResult Function()? deleted,
  126. TResult Function()? restore,
  127. TResult Function()? restorePage,
  128. TResult Function()? deletePermanently,
  129. required TResult orElse(),
  130. }) {
  131. if (initial != null) {
  132. return initial();
  133. }
  134. return orElse();
  135. }
  136. @override
  137. @optionalTypeArgs
  138. TResult map<TResult extends Object?>({
  139. required TResult Function(Initial value) initial,
  140. required TResult Function(Deleted value) deleted,
  141. required TResult Function(Restore value) restore,
  142. required TResult Function(RestorePage value) restorePage,
  143. required TResult Function(DeletePermanently value) deletePermanently,
  144. }) {
  145. return initial(this);
  146. }
  147. @override
  148. @optionalTypeArgs
  149. TResult maybeMap<TResult extends Object?>({
  150. TResult Function(Initial value)? initial,
  151. TResult Function(Deleted value)? deleted,
  152. TResult Function(Restore value)? restore,
  153. TResult Function(RestorePage value)? restorePage,
  154. TResult Function(DeletePermanently value)? deletePermanently,
  155. required TResult orElse(),
  156. }) {
  157. if (initial != null) {
  158. return initial(this);
  159. }
  160. return orElse();
  161. }
  162. }
  163. abstract class Initial implements DocEvent {
  164. const factory Initial() = _$Initial;
  165. }
  166. /// @nodoc
  167. abstract class $DeletedCopyWith<$Res> {
  168. factory $DeletedCopyWith(Deleted value, $Res Function(Deleted) then) =
  169. _$DeletedCopyWithImpl<$Res>;
  170. }
  171. /// @nodoc
  172. class _$DeletedCopyWithImpl<$Res> extends _$DocEventCopyWithImpl<$Res>
  173. implements $DeletedCopyWith<$Res> {
  174. _$DeletedCopyWithImpl(Deleted _value, $Res Function(Deleted) _then)
  175. : super(_value, (v) => _then(v as Deleted));
  176. @override
  177. Deleted get _value => super._value as Deleted;
  178. }
  179. /// @nodoc
  180. class _$Deleted implements Deleted {
  181. const _$Deleted();
  182. @override
  183. String toString() {
  184. return 'DocEvent.deleted()';
  185. }
  186. @override
  187. bool operator ==(dynamic other) {
  188. return identical(this, other) || (other is Deleted);
  189. }
  190. @override
  191. int get hashCode => runtimeType.hashCode;
  192. @override
  193. @optionalTypeArgs
  194. TResult when<TResult extends Object?>({
  195. required TResult Function() initial,
  196. required TResult Function() deleted,
  197. required TResult Function() restore,
  198. required TResult Function() restorePage,
  199. required TResult Function() deletePermanently,
  200. }) {
  201. return deleted();
  202. }
  203. @override
  204. @optionalTypeArgs
  205. TResult maybeWhen<TResult extends Object?>({
  206. TResult Function()? initial,
  207. TResult Function()? deleted,
  208. TResult Function()? restore,
  209. TResult Function()? restorePage,
  210. TResult Function()? deletePermanently,
  211. required TResult orElse(),
  212. }) {
  213. if (deleted != null) {
  214. return deleted();
  215. }
  216. return orElse();
  217. }
  218. @override
  219. @optionalTypeArgs
  220. TResult map<TResult extends Object?>({
  221. required TResult Function(Initial value) initial,
  222. required TResult Function(Deleted value) deleted,
  223. required TResult Function(Restore value) restore,
  224. required TResult Function(RestorePage value) restorePage,
  225. required TResult Function(DeletePermanently value) deletePermanently,
  226. }) {
  227. return deleted(this);
  228. }
  229. @override
  230. @optionalTypeArgs
  231. TResult maybeMap<TResult extends Object?>({
  232. TResult Function(Initial value)? initial,
  233. TResult Function(Deleted value)? deleted,
  234. TResult Function(Restore value)? restore,
  235. TResult Function(RestorePage value)? restorePage,
  236. TResult Function(DeletePermanently value)? deletePermanently,
  237. required TResult orElse(),
  238. }) {
  239. if (deleted != null) {
  240. return deleted(this);
  241. }
  242. return orElse();
  243. }
  244. }
  245. abstract class Deleted implements DocEvent {
  246. const factory Deleted() = _$Deleted;
  247. }
  248. /// @nodoc
  249. abstract class $RestoreCopyWith<$Res> {
  250. factory $RestoreCopyWith(Restore value, $Res Function(Restore) then) =
  251. _$RestoreCopyWithImpl<$Res>;
  252. }
  253. /// @nodoc
  254. class _$RestoreCopyWithImpl<$Res> extends _$DocEventCopyWithImpl<$Res>
  255. implements $RestoreCopyWith<$Res> {
  256. _$RestoreCopyWithImpl(Restore _value, $Res Function(Restore) _then)
  257. : super(_value, (v) => _then(v as Restore));
  258. @override
  259. Restore get _value => super._value as Restore;
  260. }
  261. /// @nodoc
  262. class _$Restore implements Restore {
  263. const _$Restore();
  264. @override
  265. String toString() {
  266. return 'DocEvent.restore()';
  267. }
  268. @override
  269. bool operator ==(dynamic other) {
  270. return identical(this, other) || (other is Restore);
  271. }
  272. @override
  273. int get hashCode => runtimeType.hashCode;
  274. @override
  275. @optionalTypeArgs
  276. TResult when<TResult extends Object?>({
  277. required TResult Function() initial,
  278. required TResult Function() deleted,
  279. required TResult Function() restore,
  280. required TResult Function() restorePage,
  281. required TResult Function() deletePermanently,
  282. }) {
  283. return restore();
  284. }
  285. @override
  286. @optionalTypeArgs
  287. TResult maybeWhen<TResult extends Object?>({
  288. TResult Function()? initial,
  289. TResult Function()? deleted,
  290. TResult Function()? restore,
  291. TResult Function()? restorePage,
  292. TResult Function()? deletePermanently,
  293. required TResult orElse(),
  294. }) {
  295. if (restore != null) {
  296. return restore();
  297. }
  298. return orElse();
  299. }
  300. @override
  301. @optionalTypeArgs
  302. TResult map<TResult extends Object?>({
  303. required TResult Function(Initial value) initial,
  304. required TResult Function(Deleted value) deleted,
  305. required TResult Function(Restore value) restore,
  306. required TResult Function(RestorePage value) restorePage,
  307. required TResult Function(DeletePermanently value) deletePermanently,
  308. }) {
  309. return restore(this);
  310. }
  311. @override
  312. @optionalTypeArgs
  313. TResult maybeMap<TResult extends Object?>({
  314. TResult Function(Initial value)? initial,
  315. TResult Function(Deleted value)? deleted,
  316. TResult Function(Restore value)? restore,
  317. TResult Function(RestorePage value)? restorePage,
  318. TResult Function(DeletePermanently value)? deletePermanently,
  319. required TResult orElse(),
  320. }) {
  321. if (restore != null) {
  322. return restore(this);
  323. }
  324. return orElse();
  325. }
  326. }
  327. abstract class Restore implements DocEvent {
  328. const factory Restore() = _$Restore;
  329. }
  330. /// @nodoc
  331. abstract class $RestorePageCopyWith<$Res> {
  332. factory $RestorePageCopyWith(
  333. RestorePage value, $Res Function(RestorePage) then) =
  334. _$RestorePageCopyWithImpl<$Res>;
  335. }
  336. /// @nodoc
  337. class _$RestorePageCopyWithImpl<$Res> extends _$DocEventCopyWithImpl<$Res>
  338. implements $RestorePageCopyWith<$Res> {
  339. _$RestorePageCopyWithImpl(
  340. RestorePage _value, $Res Function(RestorePage) _then)
  341. : super(_value, (v) => _then(v as RestorePage));
  342. @override
  343. RestorePage get _value => super._value as RestorePage;
  344. }
  345. /// @nodoc
  346. class _$RestorePage implements RestorePage {
  347. const _$RestorePage();
  348. @override
  349. String toString() {
  350. return 'DocEvent.restorePage()';
  351. }
  352. @override
  353. bool operator ==(dynamic other) {
  354. return identical(this, other) || (other is RestorePage);
  355. }
  356. @override
  357. int get hashCode => runtimeType.hashCode;
  358. @override
  359. @optionalTypeArgs
  360. TResult when<TResult extends Object?>({
  361. required TResult Function() initial,
  362. required TResult Function() deleted,
  363. required TResult Function() restore,
  364. required TResult Function() restorePage,
  365. required TResult Function() deletePermanently,
  366. }) {
  367. return restorePage();
  368. }
  369. @override
  370. @optionalTypeArgs
  371. TResult maybeWhen<TResult extends Object?>({
  372. TResult Function()? initial,
  373. TResult Function()? deleted,
  374. TResult Function()? restore,
  375. TResult Function()? restorePage,
  376. TResult Function()? deletePermanently,
  377. required TResult orElse(),
  378. }) {
  379. if (restorePage != null) {
  380. return restorePage();
  381. }
  382. return orElse();
  383. }
  384. @override
  385. @optionalTypeArgs
  386. TResult map<TResult extends Object?>({
  387. required TResult Function(Initial value) initial,
  388. required TResult Function(Deleted value) deleted,
  389. required TResult Function(Restore value) restore,
  390. required TResult Function(RestorePage value) restorePage,
  391. required TResult Function(DeletePermanently value) deletePermanently,
  392. }) {
  393. return restorePage(this);
  394. }
  395. @override
  396. @optionalTypeArgs
  397. TResult maybeMap<TResult extends Object?>({
  398. TResult Function(Initial value)? initial,
  399. TResult Function(Deleted value)? deleted,
  400. TResult Function(Restore value)? restore,
  401. TResult Function(RestorePage value)? restorePage,
  402. TResult Function(DeletePermanently value)? deletePermanently,
  403. required TResult orElse(),
  404. }) {
  405. if (restorePage != null) {
  406. return restorePage(this);
  407. }
  408. return orElse();
  409. }
  410. }
  411. abstract class RestorePage implements DocEvent {
  412. const factory RestorePage() = _$RestorePage;
  413. }
  414. /// @nodoc
  415. abstract class $DeletePermanentlyCopyWith<$Res> {
  416. factory $DeletePermanentlyCopyWith(
  417. DeletePermanently value, $Res Function(DeletePermanently) then) =
  418. _$DeletePermanentlyCopyWithImpl<$Res>;
  419. }
  420. /// @nodoc
  421. class _$DeletePermanentlyCopyWithImpl<$Res> extends _$DocEventCopyWithImpl<$Res>
  422. implements $DeletePermanentlyCopyWith<$Res> {
  423. _$DeletePermanentlyCopyWithImpl(
  424. DeletePermanently _value, $Res Function(DeletePermanently) _then)
  425. : super(_value, (v) => _then(v as DeletePermanently));
  426. @override
  427. DeletePermanently get _value => super._value as DeletePermanently;
  428. }
  429. /// @nodoc
  430. class _$DeletePermanently implements DeletePermanently {
  431. const _$DeletePermanently();
  432. @override
  433. String toString() {
  434. return 'DocEvent.deletePermanently()';
  435. }
  436. @override
  437. bool operator ==(dynamic other) {
  438. return identical(this, other) || (other is DeletePermanently);
  439. }
  440. @override
  441. int get hashCode => runtimeType.hashCode;
  442. @override
  443. @optionalTypeArgs
  444. TResult when<TResult extends Object?>({
  445. required TResult Function() initial,
  446. required TResult Function() deleted,
  447. required TResult Function() restore,
  448. required TResult Function() restorePage,
  449. required TResult Function() deletePermanently,
  450. }) {
  451. return deletePermanently();
  452. }
  453. @override
  454. @optionalTypeArgs
  455. TResult maybeWhen<TResult extends Object?>({
  456. TResult Function()? initial,
  457. TResult Function()? deleted,
  458. TResult Function()? restore,
  459. TResult Function()? restorePage,
  460. TResult Function()? deletePermanently,
  461. required TResult orElse(),
  462. }) {
  463. if (deletePermanently != null) {
  464. return deletePermanently();
  465. }
  466. return orElse();
  467. }
  468. @override
  469. @optionalTypeArgs
  470. TResult map<TResult extends Object?>({
  471. required TResult Function(Initial value) initial,
  472. required TResult Function(Deleted value) deleted,
  473. required TResult Function(Restore value) restore,
  474. required TResult Function(RestorePage value) restorePage,
  475. required TResult Function(DeletePermanently value) deletePermanently,
  476. }) {
  477. return deletePermanently(this);
  478. }
  479. @override
  480. @optionalTypeArgs
  481. TResult maybeMap<TResult extends Object?>({
  482. TResult Function(Initial value)? initial,
  483. TResult Function(Deleted value)? deleted,
  484. TResult Function(Restore value)? restore,
  485. TResult Function(RestorePage value)? restorePage,
  486. TResult Function(DeletePermanently value)? deletePermanently,
  487. required TResult orElse(),
  488. }) {
  489. if (deletePermanently != null) {
  490. return deletePermanently(this);
  491. }
  492. return orElse();
  493. }
  494. }
  495. abstract class DeletePermanently implements DocEvent {
  496. const factory DeletePermanently() = _$DeletePermanently;
  497. }
  498. /// @nodoc
  499. class _$DocStateTearOff {
  500. const _$DocStateTearOff();
  501. _DocState call(
  502. {required DocLoadState loadState,
  503. required bool isDeleted,
  504. required bool forceClose}) {
  505. return _DocState(
  506. loadState: loadState,
  507. isDeleted: isDeleted,
  508. forceClose: forceClose,
  509. );
  510. }
  511. }
  512. /// @nodoc
  513. const $DocState = _$DocStateTearOff();
  514. /// @nodoc
  515. mixin _$DocState {
  516. DocLoadState get loadState => throw _privateConstructorUsedError;
  517. bool get isDeleted => throw _privateConstructorUsedError;
  518. bool get forceClose => throw _privateConstructorUsedError;
  519. @JsonKey(ignore: true)
  520. $DocStateCopyWith<DocState> get copyWith =>
  521. throw _privateConstructorUsedError;
  522. }
  523. /// @nodoc
  524. abstract class $DocStateCopyWith<$Res> {
  525. factory $DocStateCopyWith(DocState value, $Res Function(DocState) then) =
  526. _$DocStateCopyWithImpl<$Res>;
  527. $Res call({DocLoadState loadState, bool isDeleted, bool forceClose});
  528. $DocLoadStateCopyWith<$Res> get loadState;
  529. }
  530. /// @nodoc
  531. class _$DocStateCopyWithImpl<$Res> implements $DocStateCopyWith<$Res> {
  532. _$DocStateCopyWithImpl(this._value, this._then);
  533. final DocState _value;
  534. // ignore: unused_field
  535. final $Res Function(DocState) _then;
  536. @override
  537. $Res call({
  538. Object? loadState = freezed,
  539. Object? isDeleted = freezed,
  540. Object? forceClose = freezed,
  541. }) {
  542. return _then(_value.copyWith(
  543. loadState: loadState == freezed
  544. ? _value.loadState
  545. : loadState // ignore: cast_nullable_to_non_nullable
  546. as DocLoadState,
  547. isDeleted: isDeleted == freezed
  548. ? _value.isDeleted
  549. : isDeleted // ignore: cast_nullable_to_non_nullable
  550. as bool,
  551. forceClose: forceClose == freezed
  552. ? _value.forceClose
  553. : forceClose // ignore: cast_nullable_to_non_nullable
  554. as bool,
  555. ));
  556. }
  557. @override
  558. $DocLoadStateCopyWith<$Res> get loadState {
  559. return $DocLoadStateCopyWith<$Res>(_value.loadState, (value) {
  560. return _then(_value.copyWith(loadState: value));
  561. });
  562. }
  563. }
  564. /// @nodoc
  565. abstract class _$DocStateCopyWith<$Res> implements $DocStateCopyWith<$Res> {
  566. factory _$DocStateCopyWith(_DocState value, $Res Function(_DocState) then) =
  567. __$DocStateCopyWithImpl<$Res>;
  568. @override
  569. $Res call({DocLoadState loadState, bool isDeleted, bool forceClose});
  570. @override
  571. $DocLoadStateCopyWith<$Res> get loadState;
  572. }
  573. /// @nodoc
  574. class __$DocStateCopyWithImpl<$Res> extends _$DocStateCopyWithImpl<$Res>
  575. implements _$DocStateCopyWith<$Res> {
  576. __$DocStateCopyWithImpl(_DocState _value, $Res Function(_DocState) _then)
  577. : super(_value, (v) => _then(v as _DocState));
  578. @override
  579. _DocState get _value => super._value as _DocState;
  580. @override
  581. $Res call({
  582. Object? loadState = freezed,
  583. Object? isDeleted = freezed,
  584. Object? forceClose = freezed,
  585. }) {
  586. return _then(_DocState(
  587. loadState: loadState == freezed
  588. ? _value.loadState
  589. : loadState // ignore: cast_nullable_to_non_nullable
  590. as DocLoadState,
  591. isDeleted: isDeleted == freezed
  592. ? _value.isDeleted
  593. : isDeleted // ignore: cast_nullable_to_non_nullable
  594. as bool,
  595. forceClose: forceClose == freezed
  596. ? _value.forceClose
  597. : forceClose // ignore: cast_nullable_to_non_nullable
  598. as bool,
  599. ));
  600. }
  601. }
  602. /// @nodoc
  603. class _$_DocState implements _DocState {
  604. const _$_DocState(
  605. {required this.loadState,
  606. required this.isDeleted,
  607. required this.forceClose});
  608. @override
  609. final DocLoadState loadState;
  610. @override
  611. final bool isDeleted;
  612. @override
  613. final bool forceClose;
  614. @override
  615. String toString() {
  616. return 'DocState(loadState: $loadState, isDeleted: $isDeleted, forceClose: $forceClose)';
  617. }
  618. @override
  619. bool operator ==(dynamic other) {
  620. return identical(this, other) ||
  621. (other is _DocState &&
  622. (identical(other.loadState, loadState) ||
  623. const DeepCollectionEquality()
  624. .equals(other.loadState, loadState)) &&
  625. (identical(other.isDeleted, isDeleted) ||
  626. const DeepCollectionEquality()
  627. .equals(other.isDeleted, isDeleted)) &&
  628. (identical(other.forceClose, forceClose) ||
  629. const DeepCollectionEquality()
  630. .equals(other.forceClose, forceClose)));
  631. }
  632. @override
  633. int get hashCode =>
  634. runtimeType.hashCode ^
  635. const DeepCollectionEquality().hash(loadState) ^
  636. const DeepCollectionEquality().hash(isDeleted) ^
  637. const DeepCollectionEquality().hash(forceClose);
  638. @JsonKey(ignore: true)
  639. @override
  640. _$DocStateCopyWith<_DocState> get copyWith =>
  641. __$DocStateCopyWithImpl<_DocState>(this, _$identity);
  642. }
  643. abstract class _DocState implements DocState {
  644. const factory _DocState(
  645. {required DocLoadState loadState,
  646. required bool isDeleted,
  647. required bool forceClose}) = _$_DocState;
  648. @override
  649. DocLoadState get loadState => throw _privateConstructorUsedError;
  650. @override
  651. bool get isDeleted => throw _privateConstructorUsedError;
  652. @override
  653. bool get forceClose => throw _privateConstructorUsedError;
  654. @override
  655. @JsonKey(ignore: true)
  656. _$DocStateCopyWith<_DocState> get copyWith =>
  657. throw _privateConstructorUsedError;
  658. }
  659. /// @nodoc
  660. class _$DocLoadStateTearOff {
  661. const _$DocLoadStateTearOff();
  662. _Loading loading() {
  663. return const _Loading();
  664. }
  665. _Finish finish(Either<Unit, WorkspaceError> successOrFail) {
  666. return _Finish(
  667. successOrFail,
  668. );
  669. }
  670. }
  671. /// @nodoc
  672. const $DocLoadState = _$DocLoadStateTearOff();
  673. /// @nodoc
  674. mixin _$DocLoadState {
  675. @optionalTypeArgs
  676. TResult when<TResult extends Object?>({
  677. required TResult Function() loading,
  678. required TResult Function(Either<Unit, WorkspaceError> successOrFail)
  679. finish,
  680. }) =>
  681. throw _privateConstructorUsedError;
  682. @optionalTypeArgs
  683. TResult maybeWhen<TResult extends Object?>({
  684. TResult Function()? loading,
  685. TResult Function(Either<Unit, WorkspaceError> successOrFail)? finish,
  686. required TResult orElse(),
  687. }) =>
  688. throw _privateConstructorUsedError;
  689. @optionalTypeArgs
  690. TResult map<TResult extends Object?>({
  691. required TResult Function(_Loading value) loading,
  692. required TResult Function(_Finish value) finish,
  693. }) =>
  694. throw _privateConstructorUsedError;
  695. @optionalTypeArgs
  696. TResult maybeMap<TResult extends Object?>({
  697. TResult Function(_Loading value)? loading,
  698. TResult Function(_Finish value)? finish,
  699. required TResult orElse(),
  700. }) =>
  701. throw _privateConstructorUsedError;
  702. }
  703. /// @nodoc
  704. abstract class $DocLoadStateCopyWith<$Res> {
  705. factory $DocLoadStateCopyWith(
  706. DocLoadState value, $Res Function(DocLoadState) then) =
  707. _$DocLoadStateCopyWithImpl<$Res>;
  708. }
  709. /// @nodoc
  710. class _$DocLoadStateCopyWithImpl<$Res> implements $DocLoadStateCopyWith<$Res> {
  711. _$DocLoadStateCopyWithImpl(this._value, this._then);
  712. final DocLoadState _value;
  713. // ignore: unused_field
  714. final $Res Function(DocLoadState) _then;
  715. }
  716. /// @nodoc
  717. abstract class _$LoadingCopyWith<$Res> {
  718. factory _$LoadingCopyWith(_Loading value, $Res Function(_Loading) then) =
  719. __$LoadingCopyWithImpl<$Res>;
  720. }
  721. /// @nodoc
  722. class __$LoadingCopyWithImpl<$Res> extends _$DocLoadStateCopyWithImpl<$Res>
  723. implements _$LoadingCopyWith<$Res> {
  724. __$LoadingCopyWithImpl(_Loading _value, $Res Function(_Loading) _then)
  725. : super(_value, (v) => _then(v as _Loading));
  726. @override
  727. _Loading get _value => super._value as _Loading;
  728. }
  729. /// @nodoc
  730. class _$_Loading implements _Loading {
  731. const _$_Loading();
  732. @override
  733. String toString() {
  734. return 'DocLoadState.loading()';
  735. }
  736. @override
  737. bool operator ==(dynamic other) {
  738. return identical(this, other) || (other is _Loading);
  739. }
  740. @override
  741. int get hashCode => runtimeType.hashCode;
  742. @override
  743. @optionalTypeArgs
  744. TResult when<TResult extends Object?>({
  745. required TResult Function() loading,
  746. required TResult Function(Either<Unit, WorkspaceError> successOrFail)
  747. finish,
  748. }) {
  749. return loading();
  750. }
  751. @override
  752. @optionalTypeArgs
  753. TResult maybeWhen<TResult extends Object?>({
  754. TResult Function()? loading,
  755. TResult Function(Either<Unit, WorkspaceError> successOrFail)? finish,
  756. required TResult orElse(),
  757. }) {
  758. if (loading != null) {
  759. return loading();
  760. }
  761. return orElse();
  762. }
  763. @override
  764. @optionalTypeArgs
  765. TResult map<TResult extends Object?>({
  766. required TResult Function(_Loading value) loading,
  767. required TResult Function(_Finish value) finish,
  768. }) {
  769. return loading(this);
  770. }
  771. @override
  772. @optionalTypeArgs
  773. TResult maybeMap<TResult extends Object?>({
  774. TResult Function(_Loading value)? loading,
  775. TResult Function(_Finish value)? finish,
  776. required TResult orElse(),
  777. }) {
  778. if (loading != null) {
  779. return loading(this);
  780. }
  781. return orElse();
  782. }
  783. }
  784. abstract class _Loading implements DocLoadState {
  785. const factory _Loading() = _$_Loading;
  786. }
  787. /// @nodoc
  788. abstract class _$FinishCopyWith<$Res> {
  789. factory _$FinishCopyWith(_Finish value, $Res Function(_Finish) then) =
  790. __$FinishCopyWithImpl<$Res>;
  791. $Res call({Either<Unit, WorkspaceError> successOrFail});
  792. }
  793. /// @nodoc
  794. class __$FinishCopyWithImpl<$Res> extends _$DocLoadStateCopyWithImpl<$Res>
  795. implements _$FinishCopyWith<$Res> {
  796. __$FinishCopyWithImpl(_Finish _value, $Res Function(_Finish) _then)
  797. : super(_value, (v) => _then(v as _Finish));
  798. @override
  799. _Finish get _value => super._value as _Finish;
  800. @override
  801. $Res call({
  802. Object? successOrFail = freezed,
  803. }) {
  804. return _then(_Finish(
  805. successOrFail == freezed
  806. ? _value.successOrFail
  807. : successOrFail // ignore: cast_nullable_to_non_nullable
  808. as Either<Unit, WorkspaceError>,
  809. ));
  810. }
  811. }
  812. /// @nodoc
  813. class _$_Finish implements _Finish {
  814. const _$_Finish(this.successOrFail);
  815. @override
  816. final Either<Unit, WorkspaceError> successOrFail;
  817. @override
  818. String toString() {
  819. return 'DocLoadState.finish(successOrFail: $successOrFail)';
  820. }
  821. @override
  822. bool operator ==(dynamic other) {
  823. return identical(this, other) ||
  824. (other is _Finish &&
  825. (identical(other.successOrFail, successOrFail) ||
  826. const DeepCollectionEquality()
  827. .equals(other.successOrFail, successOrFail)));
  828. }
  829. @override
  830. int get hashCode =>
  831. runtimeType.hashCode ^ const DeepCollectionEquality().hash(successOrFail);
  832. @JsonKey(ignore: true)
  833. @override
  834. _$FinishCopyWith<_Finish> get copyWith =>
  835. __$FinishCopyWithImpl<_Finish>(this, _$identity);
  836. @override
  837. @optionalTypeArgs
  838. TResult when<TResult extends Object?>({
  839. required TResult Function() loading,
  840. required TResult Function(Either<Unit, WorkspaceError> successOrFail)
  841. finish,
  842. }) {
  843. return finish(successOrFail);
  844. }
  845. @override
  846. @optionalTypeArgs
  847. TResult maybeWhen<TResult extends Object?>({
  848. TResult Function()? loading,
  849. TResult Function(Either<Unit, WorkspaceError> successOrFail)? finish,
  850. required TResult orElse(),
  851. }) {
  852. if (finish != null) {
  853. return finish(successOrFail);
  854. }
  855. return orElse();
  856. }
  857. @override
  858. @optionalTypeArgs
  859. TResult map<TResult extends Object?>({
  860. required TResult Function(_Loading value) loading,
  861. required TResult Function(_Finish value) finish,
  862. }) {
  863. return finish(this);
  864. }
  865. @override
  866. @optionalTypeArgs
  867. TResult maybeMap<TResult extends Object?>({
  868. TResult Function(_Loading value)? loading,
  869. TResult Function(_Finish value)? finish,
  870. required TResult orElse(),
  871. }) {
  872. if (finish != null) {
  873. return finish(this);
  874. }
  875. return orElse();
  876. }
  877. }
  878. abstract class _Finish implements DocLoadState {
  879. const factory _Finish(Either<Unit, WorkspaceError> successOrFail) = _$_Finish;
  880. Either<Unit, WorkspaceError> get successOrFail =>
  881. throw _privateConstructorUsedError;
  882. @JsonKey(ignore: true)
  883. _$FinishCopyWith<_Finish> get copyWith => throw _privateConstructorUsedError;
  884. }