doc_bloc.freezed.dart 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765
  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. }
  23. /// @nodoc
  24. const $DocEvent = _$DocEventTearOff();
  25. /// @nodoc
  26. mixin _$DocEvent {
  27. @optionalTypeArgs
  28. TResult when<TResult extends Object?>({
  29. required TResult Function() initial,
  30. required TResult Function() deleted,
  31. required TResult Function() restore,
  32. }) =>
  33. throw _privateConstructorUsedError;
  34. @optionalTypeArgs
  35. TResult maybeWhen<TResult extends Object?>({
  36. TResult Function()? initial,
  37. TResult Function()? deleted,
  38. TResult Function()? restore,
  39. required TResult orElse(),
  40. }) =>
  41. throw _privateConstructorUsedError;
  42. @optionalTypeArgs
  43. TResult map<TResult extends Object?>({
  44. required TResult Function(Initial value) initial,
  45. required TResult Function(Deleted value) deleted,
  46. required TResult Function(Restore value) restore,
  47. }) =>
  48. throw _privateConstructorUsedError;
  49. @optionalTypeArgs
  50. TResult maybeMap<TResult extends Object?>({
  51. TResult Function(Initial value)? initial,
  52. TResult Function(Deleted value)? deleted,
  53. TResult Function(Restore value)? restore,
  54. required TResult orElse(),
  55. }) =>
  56. throw _privateConstructorUsedError;
  57. }
  58. /// @nodoc
  59. abstract class $DocEventCopyWith<$Res> {
  60. factory $DocEventCopyWith(DocEvent value, $Res Function(DocEvent) then) =
  61. _$DocEventCopyWithImpl<$Res>;
  62. }
  63. /// @nodoc
  64. class _$DocEventCopyWithImpl<$Res> implements $DocEventCopyWith<$Res> {
  65. _$DocEventCopyWithImpl(this._value, this._then);
  66. final DocEvent _value;
  67. // ignore: unused_field
  68. final $Res Function(DocEvent) _then;
  69. }
  70. /// @nodoc
  71. abstract class $InitialCopyWith<$Res> {
  72. factory $InitialCopyWith(Initial value, $Res Function(Initial) then) =
  73. _$InitialCopyWithImpl<$Res>;
  74. }
  75. /// @nodoc
  76. class _$InitialCopyWithImpl<$Res> extends _$DocEventCopyWithImpl<$Res>
  77. implements $InitialCopyWith<$Res> {
  78. _$InitialCopyWithImpl(Initial _value, $Res Function(Initial) _then)
  79. : super(_value, (v) => _then(v as Initial));
  80. @override
  81. Initial get _value => super._value as Initial;
  82. }
  83. /// @nodoc
  84. class _$Initial implements Initial {
  85. const _$Initial();
  86. @override
  87. String toString() {
  88. return 'DocEvent.initial()';
  89. }
  90. @override
  91. bool operator ==(dynamic other) {
  92. return identical(this, other) || (other is Initial);
  93. }
  94. @override
  95. int get hashCode => runtimeType.hashCode;
  96. @override
  97. @optionalTypeArgs
  98. TResult when<TResult extends Object?>({
  99. required TResult Function() initial,
  100. required TResult Function() deleted,
  101. required TResult Function() restore,
  102. }) {
  103. return initial();
  104. }
  105. @override
  106. @optionalTypeArgs
  107. TResult maybeWhen<TResult extends Object?>({
  108. TResult Function()? initial,
  109. TResult Function()? deleted,
  110. TResult Function()? restore,
  111. required TResult orElse(),
  112. }) {
  113. if (initial != null) {
  114. return initial();
  115. }
  116. return orElse();
  117. }
  118. @override
  119. @optionalTypeArgs
  120. TResult map<TResult extends Object?>({
  121. required TResult Function(Initial value) initial,
  122. required TResult Function(Deleted value) deleted,
  123. required TResult Function(Restore value) restore,
  124. }) {
  125. return initial(this);
  126. }
  127. @override
  128. @optionalTypeArgs
  129. TResult maybeMap<TResult extends Object?>({
  130. TResult Function(Initial value)? initial,
  131. TResult Function(Deleted value)? deleted,
  132. TResult Function(Restore value)? restore,
  133. required TResult orElse(),
  134. }) {
  135. if (initial != null) {
  136. return initial(this);
  137. }
  138. return orElse();
  139. }
  140. }
  141. abstract class Initial implements DocEvent {
  142. const factory Initial() = _$Initial;
  143. }
  144. /// @nodoc
  145. abstract class $DeletedCopyWith<$Res> {
  146. factory $DeletedCopyWith(Deleted value, $Res Function(Deleted) then) =
  147. _$DeletedCopyWithImpl<$Res>;
  148. }
  149. /// @nodoc
  150. class _$DeletedCopyWithImpl<$Res> extends _$DocEventCopyWithImpl<$Res>
  151. implements $DeletedCopyWith<$Res> {
  152. _$DeletedCopyWithImpl(Deleted _value, $Res Function(Deleted) _then)
  153. : super(_value, (v) => _then(v as Deleted));
  154. @override
  155. Deleted get _value => super._value as Deleted;
  156. }
  157. /// @nodoc
  158. class _$Deleted implements Deleted {
  159. const _$Deleted();
  160. @override
  161. String toString() {
  162. return 'DocEvent.deleted()';
  163. }
  164. @override
  165. bool operator ==(dynamic other) {
  166. return identical(this, other) || (other is Deleted);
  167. }
  168. @override
  169. int get hashCode => runtimeType.hashCode;
  170. @override
  171. @optionalTypeArgs
  172. TResult when<TResult extends Object?>({
  173. required TResult Function() initial,
  174. required TResult Function() deleted,
  175. required TResult Function() restore,
  176. }) {
  177. return deleted();
  178. }
  179. @override
  180. @optionalTypeArgs
  181. TResult maybeWhen<TResult extends Object?>({
  182. TResult Function()? initial,
  183. TResult Function()? deleted,
  184. TResult Function()? restore,
  185. required TResult orElse(),
  186. }) {
  187. if (deleted != null) {
  188. return deleted();
  189. }
  190. return orElse();
  191. }
  192. @override
  193. @optionalTypeArgs
  194. TResult map<TResult extends Object?>({
  195. required TResult Function(Initial value) initial,
  196. required TResult Function(Deleted value) deleted,
  197. required TResult Function(Restore value) restore,
  198. }) {
  199. return deleted(this);
  200. }
  201. @override
  202. @optionalTypeArgs
  203. TResult maybeMap<TResult extends Object?>({
  204. TResult Function(Initial value)? initial,
  205. TResult Function(Deleted value)? deleted,
  206. TResult Function(Restore value)? restore,
  207. required TResult orElse(),
  208. }) {
  209. if (deleted != null) {
  210. return deleted(this);
  211. }
  212. return orElse();
  213. }
  214. }
  215. abstract class Deleted implements DocEvent {
  216. const factory Deleted() = _$Deleted;
  217. }
  218. /// @nodoc
  219. abstract class $RestoreCopyWith<$Res> {
  220. factory $RestoreCopyWith(Restore value, $Res Function(Restore) then) =
  221. _$RestoreCopyWithImpl<$Res>;
  222. }
  223. /// @nodoc
  224. class _$RestoreCopyWithImpl<$Res> extends _$DocEventCopyWithImpl<$Res>
  225. implements $RestoreCopyWith<$Res> {
  226. _$RestoreCopyWithImpl(Restore _value, $Res Function(Restore) _then)
  227. : super(_value, (v) => _then(v as Restore));
  228. @override
  229. Restore get _value => super._value as Restore;
  230. }
  231. /// @nodoc
  232. class _$Restore implements Restore {
  233. const _$Restore();
  234. @override
  235. String toString() {
  236. return 'DocEvent.restore()';
  237. }
  238. @override
  239. bool operator ==(dynamic other) {
  240. return identical(this, other) || (other is Restore);
  241. }
  242. @override
  243. int get hashCode => runtimeType.hashCode;
  244. @override
  245. @optionalTypeArgs
  246. TResult when<TResult extends Object?>({
  247. required TResult Function() initial,
  248. required TResult Function() deleted,
  249. required TResult Function() restore,
  250. }) {
  251. return restore();
  252. }
  253. @override
  254. @optionalTypeArgs
  255. TResult maybeWhen<TResult extends Object?>({
  256. TResult Function()? initial,
  257. TResult Function()? deleted,
  258. TResult Function()? restore,
  259. required TResult orElse(),
  260. }) {
  261. if (restore != null) {
  262. return restore();
  263. }
  264. return orElse();
  265. }
  266. @override
  267. @optionalTypeArgs
  268. TResult map<TResult extends Object?>({
  269. required TResult Function(Initial value) initial,
  270. required TResult Function(Deleted value) deleted,
  271. required TResult Function(Restore value) restore,
  272. }) {
  273. return restore(this);
  274. }
  275. @override
  276. @optionalTypeArgs
  277. TResult maybeMap<TResult extends Object?>({
  278. TResult Function(Initial value)? initial,
  279. TResult Function(Deleted value)? deleted,
  280. TResult Function(Restore value)? restore,
  281. required TResult orElse(),
  282. }) {
  283. if (restore != null) {
  284. return restore(this);
  285. }
  286. return orElse();
  287. }
  288. }
  289. abstract class Restore implements DocEvent {
  290. const factory Restore() = _$Restore;
  291. }
  292. /// @nodoc
  293. class _$DocStateTearOff {
  294. const _$DocStateTearOff();
  295. _DocState call({required DocLoadState loadState, required bool isDeleted}) {
  296. return _DocState(
  297. loadState: loadState,
  298. isDeleted: isDeleted,
  299. );
  300. }
  301. }
  302. /// @nodoc
  303. const $DocState = _$DocStateTearOff();
  304. /// @nodoc
  305. mixin _$DocState {
  306. DocLoadState get loadState => throw _privateConstructorUsedError;
  307. bool get isDeleted => throw _privateConstructorUsedError;
  308. @JsonKey(ignore: true)
  309. $DocStateCopyWith<DocState> get copyWith =>
  310. throw _privateConstructorUsedError;
  311. }
  312. /// @nodoc
  313. abstract class $DocStateCopyWith<$Res> {
  314. factory $DocStateCopyWith(DocState value, $Res Function(DocState) then) =
  315. _$DocStateCopyWithImpl<$Res>;
  316. $Res call({DocLoadState loadState, bool isDeleted});
  317. $DocLoadStateCopyWith<$Res> get loadState;
  318. }
  319. /// @nodoc
  320. class _$DocStateCopyWithImpl<$Res> implements $DocStateCopyWith<$Res> {
  321. _$DocStateCopyWithImpl(this._value, this._then);
  322. final DocState _value;
  323. // ignore: unused_field
  324. final $Res Function(DocState) _then;
  325. @override
  326. $Res call({
  327. Object? loadState = freezed,
  328. Object? isDeleted = freezed,
  329. }) {
  330. return _then(_value.copyWith(
  331. loadState: loadState == freezed
  332. ? _value.loadState
  333. : loadState // ignore: cast_nullable_to_non_nullable
  334. as DocLoadState,
  335. isDeleted: isDeleted == freezed
  336. ? _value.isDeleted
  337. : isDeleted // ignore: cast_nullable_to_non_nullable
  338. as bool,
  339. ));
  340. }
  341. @override
  342. $DocLoadStateCopyWith<$Res> get loadState {
  343. return $DocLoadStateCopyWith<$Res>(_value.loadState, (value) {
  344. return _then(_value.copyWith(loadState: value));
  345. });
  346. }
  347. }
  348. /// @nodoc
  349. abstract class _$DocStateCopyWith<$Res> implements $DocStateCopyWith<$Res> {
  350. factory _$DocStateCopyWith(_DocState value, $Res Function(_DocState) then) =
  351. __$DocStateCopyWithImpl<$Res>;
  352. @override
  353. $Res call({DocLoadState loadState, bool isDeleted});
  354. @override
  355. $DocLoadStateCopyWith<$Res> get loadState;
  356. }
  357. /// @nodoc
  358. class __$DocStateCopyWithImpl<$Res> extends _$DocStateCopyWithImpl<$Res>
  359. implements _$DocStateCopyWith<$Res> {
  360. __$DocStateCopyWithImpl(_DocState _value, $Res Function(_DocState) _then)
  361. : super(_value, (v) => _then(v as _DocState));
  362. @override
  363. _DocState get _value => super._value as _DocState;
  364. @override
  365. $Res call({
  366. Object? loadState = freezed,
  367. Object? isDeleted = freezed,
  368. }) {
  369. return _then(_DocState(
  370. loadState: loadState == freezed
  371. ? _value.loadState
  372. : loadState // ignore: cast_nullable_to_non_nullable
  373. as DocLoadState,
  374. isDeleted: isDeleted == freezed
  375. ? _value.isDeleted
  376. : isDeleted // ignore: cast_nullable_to_non_nullable
  377. as bool,
  378. ));
  379. }
  380. }
  381. /// @nodoc
  382. class _$_DocState implements _DocState {
  383. const _$_DocState({required this.loadState, required this.isDeleted});
  384. @override
  385. final DocLoadState loadState;
  386. @override
  387. final bool isDeleted;
  388. @override
  389. String toString() {
  390. return 'DocState(loadState: $loadState, isDeleted: $isDeleted)';
  391. }
  392. @override
  393. bool operator ==(dynamic other) {
  394. return identical(this, other) ||
  395. (other is _DocState &&
  396. (identical(other.loadState, loadState) ||
  397. const DeepCollectionEquality()
  398. .equals(other.loadState, loadState)) &&
  399. (identical(other.isDeleted, isDeleted) ||
  400. const DeepCollectionEquality()
  401. .equals(other.isDeleted, isDeleted)));
  402. }
  403. @override
  404. int get hashCode =>
  405. runtimeType.hashCode ^
  406. const DeepCollectionEquality().hash(loadState) ^
  407. const DeepCollectionEquality().hash(isDeleted);
  408. @JsonKey(ignore: true)
  409. @override
  410. _$DocStateCopyWith<_DocState> get copyWith =>
  411. __$DocStateCopyWithImpl<_DocState>(this, _$identity);
  412. }
  413. abstract class _DocState implements DocState {
  414. const factory _DocState(
  415. {required DocLoadState loadState, required bool isDeleted}) = _$_DocState;
  416. @override
  417. DocLoadState get loadState => throw _privateConstructorUsedError;
  418. @override
  419. bool get isDeleted => throw _privateConstructorUsedError;
  420. @override
  421. @JsonKey(ignore: true)
  422. _$DocStateCopyWith<_DocState> get copyWith =>
  423. throw _privateConstructorUsedError;
  424. }
  425. /// @nodoc
  426. class _$DocLoadStateTearOff {
  427. const _$DocLoadStateTearOff();
  428. _Loading loading() {
  429. return const _Loading();
  430. }
  431. _Finish finish(Either<Unit, WorkspaceError> successOrFail) {
  432. return _Finish(
  433. successOrFail,
  434. );
  435. }
  436. }
  437. /// @nodoc
  438. const $DocLoadState = _$DocLoadStateTearOff();
  439. /// @nodoc
  440. mixin _$DocLoadState {
  441. @optionalTypeArgs
  442. TResult when<TResult extends Object?>({
  443. required TResult Function() loading,
  444. required TResult Function(Either<Unit, WorkspaceError> successOrFail)
  445. finish,
  446. }) =>
  447. throw _privateConstructorUsedError;
  448. @optionalTypeArgs
  449. TResult maybeWhen<TResult extends Object?>({
  450. TResult Function()? loading,
  451. TResult Function(Either<Unit, WorkspaceError> successOrFail)? finish,
  452. required TResult orElse(),
  453. }) =>
  454. throw _privateConstructorUsedError;
  455. @optionalTypeArgs
  456. TResult map<TResult extends Object?>({
  457. required TResult Function(_Loading value) loading,
  458. required TResult Function(_Finish value) finish,
  459. }) =>
  460. throw _privateConstructorUsedError;
  461. @optionalTypeArgs
  462. TResult maybeMap<TResult extends Object?>({
  463. TResult Function(_Loading value)? loading,
  464. TResult Function(_Finish value)? finish,
  465. required TResult orElse(),
  466. }) =>
  467. throw _privateConstructorUsedError;
  468. }
  469. /// @nodoc
  470. abstract class $DocLoadStateCopyWith<$Res> {
  471. factory $DocLoadStateCopyWith(
  472. DocLoadState value, $Res Function(DocLoadState) then) =
  473. _$DocLoadStateCopyWithImpl<$Res>;
  474. }
  475. /// @nodoc
  476. class _$DocLoadStateCopyWithImpl<$Res> implements $DocLoadStateCopyWith<$Res> {
  477. _$DocLoadStateCopyWithImpl(this._value, this._then);
  478. final DocLoadState _value;
  479. // ignore: unused_field
  480. final $Res Function(DocLoadState) _then;
  481. }
  482. /// @nodoc
  483. abstract class _$LoadingCopyWith<$Res> {
  484. factory _$LoadingCopyWith(_Loading value, $Res Function(_Loading) then) =
  485. __$LoadingCopyWithImpl<$Res>;
  486. }
  487. /// @nodoc
  488. class __$LoadingCopyWithImpl<$Res> extends _$DocLoadStateCopyWithImpl<$Res>
  489. implements _$LoadingCopyWith<$Res> {
  490. __$LoadingCopyWithImpl(_Loading _value, $Res Function(_Loading) _then)
  491. : super(_value, (v) => _then(v as _Loading));
  492. @override
  493. _Loading get _value => super._value as _Loading;
  494. }
  495. /// @nodoc
  496. class _$_Loading implements _Loading {
  497. const _$_Loading();
  498. @override
  499. String toString() {
  500. return 'DocLoadState.loading()';
  501. }
  502. @override
  503. bool operator ==(dynamic other) {
  504. return identical(this, other) || (other is _Loading);
  505. }
  506. @override
  507. int get hashCode => runtimeType.hashCode;
  508. @override
  509. @optionalTypeArgs
  510. TResult when<TResult extends Object?>({
  511. required TResult Function() loading,
  512. required TResult Function(Either<Unit, WorkspaceError> successOrFail)
  513. finish,
  514. }) {
  515. return loading();
  516. }
  517. @override
  518. @optionalTypeArgs
  519. TResult maybeWhen<TResult extends Object?>({
  520. TResult Function()? loading,
  521. TResult Function(Either<Unit, WorkspaceError> successOrFail)? finish,
  522. required TResult orElse(),
  523. }) {
  524. if (loading != null) {
  525. return loading();
  526. }
  527. return orElse();
  528. }
  529. @override
  530. @optionalTypeArgs
  531. TResult map<TResult extends Object?>({
  532. required TResult Function(_Loading value) loading,
  533. required TResult Function(_Finish value) finish,
  534. }) {
  535. return loading(this);
  536. }
  537. @override
  538. @optionalTypeArgs
  539. TResult maybeMap<TResult extends Object?>({
  540. TResult Function(_Loading value)? loading,
  541. TResult Function(_Finish value)? finish,
  542. required TResult orElse(),
  543. }) {
  544. if (loading != null) {
  545. return loading(this);
  546. }
  547. return orElse();
  548. }
  549. }
  550. abstract class _Loading implements DocLoadState {
  551. const factory _Loading() = _$_Loading;
  552. }
  553. /// @nodoc
  554. abstract class _$FinishCopyWith<$Res> {
  555. factory _$FinishCopyWith(_Finish value, $Res Function(_Finish) then) =
  556. __$FinishCopyWithImpl<$Res>;
  557. $Res call({Either<Unit, WorkspaceError> successOrFail});
  558. }
  559. /// @nodoc
  560. class __$FinishCopyWithImpl<$Res> extends _$DocLoadStateCopyWithImpl<$Res>
  561. implements _$FinishCopyWith<$Res> {
  562. __$FinishCopyWithImpl(_Finish _value, $Res Function(_Finish) _then)
  563. : super(_value, (v) => _then(v as _Finish));
  564. @override
  565. _Finish get _value => super._value as _Finish;
  566. @override
  567. $Res call({
  568. Object? successOrFail = freezed,
  569. }) {
  570. return _then(_Finish(
  571. successOrFail == freezed
  572. ? _value.successOrFail
  573. : successOrFail // ignore: cast_nullable_to_non_nullable
  574. as Either<Unit, WorkspaceError>,
  575. ));
  576. }
  577. }
  578. /// @nodoc
  579. class _$_Finish implements _Finish {
  580. const _$_Finish(this.successOrFail);
  581. @override
  582. final Either<Unit, WorkspaceError> successOrFail;
  583. @override
  584. String toString() {
  585. return 'DocLoadState.finish(successOrFail: $successOrFail)';
  586. }
  587. @override
  588. bool operator ==(dynamic other) {
  589. return identical(this, other) ||
  590. (other is _Finish &&
  591. (identical(other.successOrFail, successOrFail) ||
  592. const DeepCollectionEquality()
  593. .equals(other.successOrFail, successOrFail)));
  594. }
  595. @override
  596. int get hashCode =>
  597. runtimeType.hashCode ^ const DeepCollectionEquality().hash(successOrFail);
  598. @JsonKey(ignore: true)
  599. @override
  600. _$FinishCopyWith<_Finish> get copyWith =>
  601. __$FinishCopyWithImpl<_Finish>(this, _$identity);
  602. @override
  603. @optionalTypeArgs
  604. TResult when<TResult extends Object?>({
  605. required TResult Function() loading,
  606. required TResult Function(Either<Unit, WorkspaceError> successOrFail)
  607. finish,
  608. }) {
  609. return finish(successOrFail);
  610. }
  611. @override
  612. @optionalTypeArgs
  613. TResult maybeWhen<TResult extends Object?>({
  614. TResult Function()? loading,
  615. TResult Function(Either<Unit, WorkspaceError> successOrFail)? finish,
  616. required TResult orElse(),
  617. }) {
  618. if (finish != null) {
  619. return finish(successOrFail);
  620. }
  621. return orElse();
  622. }
  623. @override
  624. @optionalTypeArgs
  625. TResult map<TResult extends Object?>({
  626. required TResult Function(_Loading value) loading,
  627. required TResult Function(_Finish value) finish,
  628. }) {
  629. return finish(this);
  630. }
  631. @override
  632. @optionalTypeArgs
  633. TResult maybeMap<TResult extends Object?>({
  634. TResult Function(_Loading value)? loading,
  635. TResult Function(_Finish value)? finish,
  636. required TResult orElse(),
  637. }) {
  638. if (finish != null) {
  639. return finish(this);
  640. }
  641. return orElse();
  642. }
  643. }
  644. abstract class _Finish implements DocLoadState {
  645. const factory _Finish(Either<Unit, WorkspaceError> successOrFail) = _$_Finish;
  646. Either<Unit, WorkspaceError> get successOrFail =>
  647. throw _privateConstructorUsedError;
  648. @JsonKey(ignore: true)
  649. _$FinishCopyWith<_Finish> get copyWith => throw _privateConstructorUsedError;
  650. }