doc_bloc.freezed.dart 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545
  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. }
  17. /// @nodoc
  18. const $DocEvent = _$DocEventTearOff();
  19. /// @nodoc
  20. mixin _$DocEvent {
  21. @optionalTypeArgs
  22. TResult when<TResult extends Object?>({
  23. required TResult Function() initial,
  24. }) =>
  25. throw _privateConstructorUsedError;
  26. @optionalTypeArgs
  27. TResult maybeWhen<TResult extends Object?>({
  28. TResult Function()? initial,
  29. required TResult orElse(),
  30. }) =>
  31. throw _privateConstructorUsedError;
  32. @optionalTypeArgs
  33. TResult map<TResult extends Object?>({
  34. required TResult Function(Initial value) initial,
  35. }) =>
  36. throw _privateConstructorUsedError;
  37. @optionalTypeArgs
  38. TResult maybeMap<TResult extends Object?>({
  39. TResult Function(Initial value)? initial,
  40. required TResult orElse(),
  41. }) =>
  42. throw _privateConstructorUsedError;
  43. }
  44. /// @nodoc
  45. abstract class $DocEventCopyWith<$Res> {
  46. factory $DocEventCopyWith(DocEvent value, $Res Function(DocEvent) then) =
  47. _$DocEventCopyWithImpl<$Res>;
  48. }
  49. /// @nodoc
  50. class _$DocEventCopyWithImpl<$Res> implements $DocEventCopyWith<$Res> {
  51. _$DocEventCopyWithImpl(this._value, this._then);
  52. final DocEvent _value;
  53. // ignore: unused_field
  54. final $Res Function(DocEvent) _then;
  55. }
  56. /// @nodoc
  57. abstract class $InitialCopyWith<$Res> {
  58. factory $InitialCopyWith(Initial value, $Res Function(Initial) then) =
  59. _$InitialCopyWithImpl<$Res>;
  60. }
  61. /// @nodoc
  62. class _$InitialCopyWithImpl<$Res> extends _$DocEventCopyWithImpl<$Res>
  63. implements $InitialCopyWith<$Res> {
  64. _$InitialCopyWithImpl(Initial _value, $Res Function(Initial) _then)
  65. : super(_value, (v) => _then(v as Initial));
  66. @override
  67. Initial get _value => super._value as Initial;
  68. }
  69. /// @nodoc
  70. class _$Initial implements Initial {
  71. const _$Initial();
  72. @override
  73. String toString() {
  74. return 'DocEvent.initial()';
  75. }
  76. @override
  77. bool operator ==(dynamic other) {
  78. return identical(this, other) || (other is Initial);
  79. }
  80. @override
  81. int get hashCode => runtimeType.hashCode;
  82. @override
  83. @optionalTypeArgs
  84. TResult when<TResult extends Object?>({
  85. required TResult Function() initial,
  86. }) {
  87. return initial();
  88. }
  89. @override
  90. @optionalTypeArgs
  91. TResult maybeWhen<TResult extends Object?>({
  92. TResult Function()? initial,
  93. required TResult orElse(),
  94. }) {
  95. if (initial != null) {
  96. return initial();
  97. }
  98. return orElse();
  99. }
  100. @override
  101. @optionalTypeArgs
  102. TResult map<TResult extends Object?>({
  103. required TResult Function(Initial value) initial,
  104. }) {
  105. return initial(this);
  106. }
  107. @override
  108. @optionalTypeArgs
  109. TResult maybeMap<TResult extends Object?>({
  110. TResult Function(Initial value)? initial,
  111. required TResult orElse(),
  112. }) {
  113. if (initial != null) {
  114. return initial(this);
  115. }
  116. return orElse();
  117. }
  118. }
  119. abstract class Initial implements DocEvent {
  120. const factory Initial() = _$Initial;
  121. }
  122. /// @nodoc
  123. class _$DocStateTearOff {
  124. const _$DocStateTearOff();
  125. _DocState call({required DocLoadState loadState}) {
  126. return _DocState(
  127. loadState: loadState,
  128. );
  129. }
  130. }
  131. /// @nodoc
  132. const $DocState = _$DocStateTearOff();
  133. /// @nodoc
  134. mixin _$DocState {
  135. DocLoadState get loadState => throw _privateConstructorUsedError;
  136. @JsonKey(ignore: true)
  137. $DocStateCopyWith<DocState> get copyWith =>
  138. throw _privateConstructorUsedError;
  139. }
  140. /// @nodoc
  141. abstract class $DocStateCopyWith<$Res> {
  142. factory $DocStateCopyWith(DocState value, $Res Function(DocState) then) =
  143. _$DocStateCopyWithImpl<$Res>;
  144. $Res call({DocLoadState loadState});
  145. $DocLoadStateCopyWith<$Res> get loadState;
  146. }
  147. /// @nodoc
  148. class _$DocStateCopyWithImpl<$Res> implements $DocStateCopyWith<$Res> {
  149. _$DocStateCopyWithImpl(this._value, this._then);
  150. final DocState _value;
  151. // ignore: unused_field
  152. final $Res Function(DocState) _then;
  153. @override
  154. $Res call({
  155. Object? loadState = freezed,
  156. }) {
  157. return _then(_value.copyWith(
  158. loadState: loadState == freezed
  159. ? _value.loadState
  160. : loadState // ignore: cast_nullable_to_non_nullable
  161. as DocLoadState,
  162. ));
  163. }
  164. @override
  165. $DocLoadStateCopyWith<$Res> get loadState {
  166. return $DocLoadStateCopyWith<$Res>(_value.loadState, (value) {
  167. return _then(_value.copyWith(loadState: value));
  168. });
  169. }
  170. }
  171. /// @nodoc
  172. abstract class _$DocStateCopyWith<$Res> implements $DocStateCopyWith<$Res> {
  173. factory _$DocStateCopyWith(_DocState value, $Res Function(_DocState) then) =
  174. __$DocStateCopyWithImpl<$Res>;
  175. @override
  176. $Res call({DocLoadState loadState});
  177. @override
  178. $DocLoadStateCopyWith<$Res> get loadState;
  179. }
  180. /// @nodoc
  181. class __$DocStateCopyWithImpl<$Res> extends _$DocStateCopyWithImpl<$Res>
  182. implements _$DocStateCopyWith<$Res> {
  183. __$DocStateCopyWithImpl(_DocState _value, $Res Function(_DocState) _then)
  184. : super(_value, (v) => _then(v as _DocState));
  185. @override
  186. _DocState get _value => super._value as _DocState;
  187. @override
  188. $Res call({
  189. Object? loadState = freezed,
  190. }) {
  191. return _then(_DocState(
  192. loadState: loadState == freezed
  193. ? _value.loadState
  194. : loadState // ignore: cast_nullable_to_non_nullable
  195. as DocLoadState,
  196. ));
  197. }
  198. }
  199. /// @nodoc
  200. class _$_DocState implements _DocState {
  201. const _$_DocState({required this.loadState});
  202. @override
  203. final DocLoadState loadState;
  204. @override
  205. String toString() {
  206. return 'DocState(loadState: $loadState)';
  207. }
  208. @override
  209. bool operator ==(dynamic other) {
  210. return identical(this, other) ||
  211. (other is _DocState &&
  212. (identical(other.loadState, loadState) ||
  213. const DeepCollectionEquality()
  214. .equals(other.loadState, loadState)));
  215. }
  216. @override
  217. int get hashCode =>
  218. runtimeType.hashCode ^ const DeepCollectionEquality().hash(loadState);
  219. @JsonKey(ignore: true)
  220. @override
  221. _$DocStateCopyWith<_DocState> get copyWith =>
  222. __$DocStateCopyWithImpl<_DocState>(this, _$identity);
  223. }
  224. abstract class _DocState implements DocState {
  225. const factory _DocState({required DocLoadState loadState}) = _$_DocState;
  226. @override
  227. DocLoadState get loadState => throw _privateConstructorUsedError;
  228. @override
  229. @JsonKey(ignore: true)
  230. _$DocStateCopyWith<_DocState> get copyWith =>
  231. throw _privateConstructorUsedError;
  232. }
  233. /// @nodoc
  234. class _$DocLoadStateTearOff {
  235. const _$DocLoadStateTearOff();
  236. _Loading loading() {
  237. return const _Loading();
  238. }
  239. _Finish finish(Either<Unit, WorkspaceError> successOrFail) {
  240. return _Finish(
  241. successOrFail,
  242. );
  243. }
  244. }
  245. /// @nodoc
  246. const $DocLoadState = _$DocLoadStateTearOff();
  247. /// @nodoc
  248. mixin _$DocLoadState {
  249. @optionalTypeArgs
  250. TResult when<TResult extends Object?>({
  251. required TResult Function() loading,
  252. required TResult Function(Either<Unit, WorkspaceError> successOrFail)
  253. finish,
  254. }) =>
  255. throw _privateConstructorUsedError;
  256. @optionalTypeArgs
  257. TResult maybeWhen<TResult extends Object?>({
  258. TResult Function()? loading,
  259. TResult Function(Either<Unit, WorkspaceError> successOrFail)? finish,
  260. required TResult orElse(),
  261. }) =>
  262. throw _privateConstructorUsedError;
  263. @optionalTypeArgs
  264. TResult map<TResult extends Object?>({
  265. required TResult Function(_Loading value) loading,
  266. required TResult Function(_Finish value) finish,
  267. }) =>
  268. throw _privateConstructorUsedError;
  269. @optionalTypeArgs
  270. TResult maybeMap<TResult extends Object?>({
  271. TResult Function(_Loading value)? loading,
  272. TResult Function(_Finish value)? finish,
  273. required TResult orElse(),
  274. }) =>
  275. throw _privateConstructorUsedError;
  276. }
  277. /// @nodoc
  278. abstract class $DocLoadStateCopyWith<$Res> {
  279. factory $DocLoadStateCopyWith(
  280. DocLoadState value, $Res Function(DocLoadState) then) =
  281. _$DocLoadStateCopyWithImpl<$Res>;
  282. }
  283. /// @nodoc
  284. class _$DocLoadStateCopyWithImpl<$Res> implements $DocLoadStateCopyWith<$Res> {
  285. _$DocLoadStateCopyWithImpl(this._value, this._then);
  286. final DocLoadState _value;
  287. // ignore: unused_field
  288. final $Res Function(DocLoadState) _then;
  289. }
  290. /// @nodoc
  291. abstract class _$LoadingCopyWith<$Res> {
  292. factory _$LoadingCopyWith(_Loading value, $Res Function(_Loading) then) =
  293. __$LoadingCopyWithImpl<$Res>;
  294. }
  295. /// @nodoc
  296. class __$LoadingCopyWithImpl<$Res> extends _$DocLoadStateCopyWithImpl<$Res>
  297. implements _$LoadingCopyWith<$Res> {
  298. __$LoadingCopyWithImpl(_Loading _value, $Res Function(_Loading) _then)
  299. : super(_value, (v) => _then(v as _Loading));
  300. @override
  301. _Loading get _value => super._value as _Loading;
  302. }
  303. /// @nodoc
  304. class _$_Loading implements _Loading {
  305. const _$_Loading();
  306. @override
  307. String toString() {
  308. return 'DocLoadState.loading()';
  309. }
  310. @override
  311. bool operator ==(dynamic other) {
  312. return identical(this, other) || (other is _Loading);
  313. }
  314. @override
  315. int get hashCode => runtimeType.hashCode;
  316. @override
  317. @optionalTypeArgs
  318. TResult when<TResult extends Object?>({
  319. required TResult Function() loading,
  320. required TResult Function(Either<Unit, WorkspaceError> successOrFail)
  321. finish,
  322. }) {
  323. return loading();
  324. }
  325. @override
  326. @optionalTypeArgs
  327. TResult maybeWhen<TResult extends Object?>({
  328. TResult Function()? loading,
  329. TResult Function(Either<Unit, WorkspaceError> successOrFail)? finish,
  330. required TResult orElse(),
  331. }) {
  332. if (loading != null) {
  333. return loading();
  334. }
  335. return orElse();
  336. }
  337. @override
  338. @optionalTypeArgs
  339. TResult map<TResult extends Object?>({
  340. required TResult Function(_Loading value) loading,
  341. required TResult Function(_Finish value) finish,
  342. }) {
  343. return loading(this);
  344. }
  345. @override
  346. @optionalTypeArgs
  347. TResult maybeMap<TResult extends Object?>({
  348. TResult Function(_Loading value)? loading,
  349. TResult Function(_Finish value)? finish,
  350. required TResult orElse(),
  351. }) {
  352. if (loading != null) {
  353. return loading(this);
  354. }
  355. return orElse();
  356. }
  357. }
  358. abstract class _Loading implements DocLoadState {
  359. const factory _Loading() = _$_Loading;
  360. }
  361. /// @nodoc
  362. abstract class _$FinishCopyWith<$Res> {
  363. factory _$FinishCopyWith(_Finish value, $Res Function(_Finish) then) =
  364. __$FinishCopyWithImpl<$Res>;
  365. $Res call({Either<Unit, WorkspaceError> successOrFail});
  366. }
  367. /// @nodoc
  368. class __$FinishCopyWithImpl<$Res> extends _$DocLoadStateCopyWithImpl<$Res>
  369. implements _$FinishCopyWith<$Res> {
  370. __$FinishCopyWithImpl(_Finish _value, $Res Function(_Finish) _then)
  371. : super(_value, (v) => _then(v as _Finish));
  372. @override
  373. _Finish get _value => super._value as _Finish;
  374. @override
  375. $Res call({
  376. Object? successOrFail = freezed,
  377. }) {
  378. return _then(_Finish(
  379. successOrFail == freezed
  380. ? _value.successOrFail
  381. : successOrFail // ignore: cast_nullable_to_non_nullable
  382. as Either<Unit, WorkspaceError>,
  383. ));
  384. }
  385. }
  386. /// @nodoc
  387. class _$_Finish implements _Finish {
  388. const _$_Finish(this.successOrFail);
  389. @override
  390. final Either<Unit, WorkspaceError> successOrFail;
  391. @override
  392. String toString() {
  393. return 'DocLoadState.finish(successOrFail: $successOrFail)';
  394. }
  395. @override
  396. bool operator ==(dynamic other) {
  397. return identical(this, other) ||
  398. (other is _Finish &&
  399. (identical(other.successOrFail, successOrFail) ||
  400. const DeepCollectionEquality()
  401. .equals(other.successOrFail, successOrFail)));
  402. }
  403. @override
  404. int get hashCode =>
  405. runtimeType.hashCode ^ const DeepCollectionEquality().hash(successOrFail);
  406. @JsonKey(ignore: true)
  407. @override
  408. _$FinishCopyWith<_Finish> get copyWith =>
  409. __$FinishCopyWithImpl<_Finish>(this, _$identity);
  410. @override
  411. @optionalTypeArgs
  412. TResult when<TResult extends Object?>({
  413. required TResult Function() loading,
  414. required TResult Function(Either<Unit, WorkspaceError> successOrFail)
  415. finish,
  416. }) {
  417. return finish(successOrFail);
  418. }
  419. @override
  420. @optionalTypeArgs
  421. TResult maybeWhen<TResult extends Object?>({
  422. TResult Function()? loading,
  423. TResult Function(Either<Unit, WorkspaceError> successOrFail)? finish,
  424. required TResult orElse(),
  425. }) {
  426. if (finish != null) {
  427. return finish(successOrFail);
  428. }
  429. return orElse();
  430. }
  431. @override
  432. @optionalTypeArgs
  433. TResult map<TResult extends Object?>({
  434. required TResult Function(_Loading value) loading,
  435. required TResult Function(_Finish value) finish,
  436. }) {
  437. return finish(this);
  438. }
  439. @override
  440. @optionalTypeArgs
  441. TResult maybeMap<TResult extends Object?>({
  442. TResult Function(_Loading value)? loading,
  443. TResult Function(_Finish value)? finish,
  444. required TResult orElse(),
  445. }) {
  446. if (finish != null) {
  447. return finish(this);
  448. }
  449. return orElse();
  450. }
  451. }
  452. abstract class _Finish implements DocLoadState {
  453. const factory _Finish(Either<Unit, WorkspaceError> successOrFail) = _$_Finish;
  454. Either<Unit, WorkspaceError> get successOrFail =>
  455. throw _privateConstructorUsedError;
  456. @JsonKey(ignore: true)
  457. _$FinishCopyWith<_Finish> get copyWith => throw _privateConstructorUsedError;
  458. }