doc_bloc.freezed.dart 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
  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(
  126. {required Option<FlowyDoc> doc, required DocLoadState loadState}) {
  127. return _DocState(
  128. doc: doc,
  129. loadState: loadState,
  130. );
  131. }
  132. }
  133. /// @nodoc
  134. const $DocState = _$DocStateTearOff();
  135. /// @nodoc
  136. mixin _$DocState {
  137. Option<FlowyDoc> get doc => throw _privateConstructorUsedError;
  138. DocLoadState get loadState => throw _privateConstructorUsedError;
  139. @JsonKey(ignore: true)
  140. $DocStateCopyWith<DocState> get copyWith =>
  141. throw _privateConstructorUsedError;
  142. }
  143. /// @nodoc
  144. abstract class $DocStateCopyWith<$Res> {
  145. factory $DocStateCopyWith(DocState value, $Res Function(DocState) then) =
  146. _$DocStateCopyWithImpl<$Res>;
  147. $Res call({Option<FlowyDoc> doc, DocLoadState loadState});
  148. $DocLoadStateCopyWith<$Res> get loadState;
  149. }
  150. /// @nodoc
  151. class _$DocStateCopyWithImpl<$Res> implements $DocStateCopyWith<$Res> {
  152. _$DocStateCopyWithImpl(this._value, this._then);
  153. final DocState _value;
  154. // ignore: unused_field
  155. final $Res Function(DocState) _then;
  156. @override
  157. $Res call({
  158. Object? doc = freezed,
  159. Object? loadState = freezed,
  160. }) {
  161. return _then(_value.copyWith(
  162. doc: doc == freezed
  163. ? _value.doc
  164. : doc // ignore: cast_nullable_to_non_nullable
  165. as Option<FlowyDoc>,
  166. loadState: loadState == freezed
  167. ? _value.loadState
  168. : loadState // ignore: cast_nullable_to_non_nullable
  169. as DocLoadState,
  170. ));
  171. }
  172. @override
  173. $DocLoadStateCopyWith<$Res> get loadState {
  174. return $DocLoadStateCopyWith<$Res>(_value.loadState, (value) {
  175. return _then(_value.copyWith(loadState: value));
  176. });
  177. }
  178. }
  179. /// @nodoc
  180. abstract class _$DocStateCopyWith<$Res> implements $DocStateCopyWith<$Res> {
  181. factory _$DocStateCopyWith(_DocState value, $Res Function(_DocState) then) =
  182. __$DocStateCopyWithImpl<$Res>;
  183. @override
  184. $Res call({Option<FlowyDoc> doc, DocLoadState loadState});
  185. @override
  186. $DocLoadStateCopyWith<$Res> get loadState;
  187. }
  188. /// @nodoc
  189. class __$DocStateCopyWithImpl<$Res> extends _$DocStateCopyWithImpl<$Res>
  190. implements _$DocStateCopyWith<$Res> {
  191. __$DocStateCopyWithImpl(_DocState _value, $Res Function(_DocState) _then)
  192. : super(_value, (v) => _then(v as _DocState));
  193. @override
  194. _DocState get _value => super._value as _DocState;
  195. @override
  196. $Res call({
  197. Object? doc = freezed,
  198. Object? loadState = freezed,
  199. }) {
  200. return _then(_DocState(
  201. doc: doc == freezed
  202. ? _value.doc
  203. : doc // ignore: cast_nullable_to_non_nullable
  204. as Option<FlowyDoc>,
  205. loadState: loadState == freezed
  206. ? _value.loadState
  207. : loadState // ignore: cast_nullable_to_non_nullable
  208. as DocLoadState,
  209. ));
  210. }
  211. }
  212. /// @nodoc
  213. class _$_DocState implements _DocState {
  214. const _$_DocState({required this.doc, required this.loadState});
  215. @override
  216. final Option<FlowyDoc> doc;
  217. @override
  218. final DocLoadState loadState;
  219. @override
  220. String toString() {
  221. return 'DocState(doc: $doc, loadState: $loadState)';
  222. }
  223. @override
  224. bool operator ==(dynamic other) {
  225. return identical(this, other) ||
  226. (other is _DocState &&
  227. (identical(other.doc, doc) ||
  228. const DeepCollectionEquality().equals(other.doc, doc)) &&
  229. (identical(other.loadState, loadState) ||
  230. const DeepCollectionEquality()
  231. .equals(other.loadState, loadState)));
  232. }
  233. @override
  234. int get hashCode =>
  235. runtimeType.hashCode ^
  236. const DeepCollectionEquality().hash(doc) ^
  237. const DeepCollectionEquality().hash(loadState);
  238. @JsonKey(ignore: true)
  239. @override
  240. _$DocStateCopyWith<_DocState> get copyWith =>
  241. __$DocStateCopyWithImpl<_DocState>(this, _$identity);
  242. }
  243. abstract class _DocState implements DocState {
  244. const factory _DocState(
  245. {required Option<FlowyDoc> doc,
  246. required DocLoadState loadState}) = _$_DocState;
  247. @override
  248. Option<FlowyDoc> get doc => throw _privateConstructorUsedError;
  249. @override
  250. DocLoadState get loadState => throw _privateConstructorUsedError;
  251. @override
  252. @JsonKey(ignore: true)
  253. _$DocStateCopyWith<_DocState> get copyWith =>
  254. throw _privateConstructorUsedError;
  255. }
  256. /// @nodoc
  257. class _$DocLoadStateTearOff {
  258. const _$DocLoadStateTearOff();
  259. _Loading loading() {
  260. return const _Loading();
  261. }
  262. _Finish finish(Either<FlowyDoc, WorkspaceError> successOrFail) {
  263. return _Finish(
  264. successOrFail,
  265. );
  266. }
  267. }
  268. /// @nodoc
  269. const $DocLoadState = _$DocLoadStateTearOff();
  270. /// @nodoc
  271. mixin _$DocLoadState {
  272. @optionalTypeArgs
  273. TResult when<TResult extends Object?>({
  274. required TResult Function() loading,
  275. required TResult Function(Either<FlowyDoc, WorkspaceError> successOrFail)
  276. finish,
  277. }) =>
  278. throw _privateConstructorUsedError;
  279. @optionalTypeArgs
  280. TResult maybeWhen<TResult extends Object?>({
  281. TResult Function()? loading,
  282. TResult Function(Either<FlowyDoc, WorkspaceError> successOrFail)? finish,
  283. required TResult orElse(),
  284. }) =>
  285. throw _privateConstructorUsedError;
  286. @optionalTypeArgs
  287. TResult map<TResult extends Object?>({
  288. required TResult Function(_Loading value) loading,
  289. required TResult Function(_Finish value) finish,
  290. }) =>
  291. throw _privateConstructorUsedError;
  292. @optionalTypeArgs
  293. TResult maybeMap<TResult extends Object?>({
  294. TResult Function(_Loading value)? loading,
  295. TResult Function(_Finish value)? finish,
  296. required TResult orElse(),
  297. }) =>
  298. throw _privateConstructorUsedError;
  299. }
  300. /// @nodoc
  301. abstract class $DocLoadStateCopyWith<$Res> {
  302. factory $DocLoadStateCopyWith(
  303. DocLoadState value, $Res Function(DocLoadState) then) =
  304. _$DocLoadStateCopyWithImpl<$Res>;
  305. }
  306. /// @nodoc
  307. class _$DocLoadStateCopyWithImpl<$Res> implements $DocLoadStateCopyWith<$Res> {
  308. _$DocLoadStateCopyWithImpl(this._value, this._then);
  309. final DocLoadState _value;
  310. // ignore: unused_field
  311. final $Res Function(DocLoadState) _then;
  312. }
  313. /// @nodoc
  314. abstract class _$LoadingCopyWith<$Res> {
  315. factory _$LoadingCopyWith(_Loading value, $Res Function(_Loading) then) =
  316. __$LoadingCopyWithImpl<$Res>;
  317. }
  318. /// @nodoc
  319. class __$LoadingCopyWithImpl<$Res> extends _$DocLoadStateCopyWithImpl<$Res>
  320. implements _$LoadingCopyWith<$Res> {
  321. __$LoadingCopyWithImpl(_Loading _value, $Res Function(_Loading) _then)
  322. : super(_value, (v) => _then(v as _Loading));
  323. @override
  324. _Loading get _value => super._value as _Loading;
  325. }
  326. /// @nodoc
  327. class _$_Loading implements _Loading {
  328. const _$_Loading();
  329. @override
  330. String toString() {
  331. return 'DocLoadState.loading()';
  332. }
  333. @override
  334. bool operator ==(dynamic other) {
  335. return identical(this, other) || (other is _Loading);
  336. }
  337. @override
  338. int get hashCode => runtimeType.hashCode;
  339. @override
  340. @optionalTypeArgs
  341. TResult when<TResult extends Object?>({
  342. required TResult Function() loading,
  343. required TResult Function(Either<FlowyDoc, WorkspaceError> successOrFail)
  344. finish,
  345. }) {
  346. return loading();
  347. }
  348. @override
  349. @optionalTypeArgs
  350. TResult maybeWhen<TResult extends Object?>({
  351. TResult Function()? loading,
  352. TResult Function(Either<FlowyDoc, WorkspaceError> successOrFail)? finish,
  353. required TResult orElse(),
  354. }) {
  355. if (loading != null) {
  356. return loading();
  357. }
  358. return orElse();
  359. }
  360. @override
  361. @optionalTypeArgs
  362. TResult map<TResult extends Object?>({
  363. required TResult Function(_Loading value) loading,
  364. required TResult Function(_Finish value) finish,
  365. }) {
  366. return loading(this);
  367. }
  368. @override
  369. @optionalTypeArgs
  370. TResult maybeMap<TResult extends Object?>({
  371. TResult Function(_Loading value)? loading,
  372. TResult Function(_Finish value)? finish,
  373. required TResult orElse(),
  374. }) {
  375. if (loading != null) {
  376. return loading(this);
  377. }
  378. return orElse();
  379. }
  380. }
  381. abstract class _Loading implements DocLoadState {
  382. const factory _Loading() = _$_Loading;
  383. }
  384. /// @nodoc
  385. abstract class _$FinishCopyWith<$Res> {
  386. factory _$FinishCopyWith(_Finish value, $Res Function(_Finish) then) =
  387. __$FinishCopyWithImpl<$Res>;
  388. $Res call({Either<FlowyDoc, WorkspaceError> successOrFail});
  389. }
  390. /// @nodoc
  391. class __$FinishCopyWithImpl<$Res> extends _$DocLoadStateCopyWithImpl<$Res>
  392. implements _$FinishCopyWith<$Res> {
  393. __$FinishCopyWithImpl(_Finish _value, $Res Function(_Finish) _then)
  394. : super(_value, (v) => _then(v as _Finish));
  395. @override
  396. _Finish get _value => super._value as _Finish;
  397. @override
  398. $Res call({
  399. Object? successOrFail = freezed,
  400. }) {
  401. return _then(_Finish(
  402. successOrFail == freezed
  403. ? _value.successOrFail
  404. : successOrFail // ignore: cast_nullable_to_non_nullable
  405. as Either<FlowyDoc, WorkspaceError>,
  406. ));
  407. }
  408. }
  409. /// @nodoc
  410. class _$_Finish implements _Finish {
  411. const _$_Finish(this.successOrFail);
  412. @override
  413. final Either<FlowyDoc, WorkspaceError> successOrFail;
  414. @override
  415. String toString() {
  416. return 'DocLoadState.finish(successOrFail: $successOrFail)';
  417. }
  418. @override
  419. bool operator ==(dynamic other) {
  420. return identical(this, other) ||
  421. (other is _Finish &&
  422. (identical(other.successOrFail, successOrFail) ||
  423. const DeepCollectionEquality()
  424. .equals(other.successOrFail, successOrFail)));
  425. }
  426. @override
  427. int get hashCode =>
  428. runtimeType.hashCode ^ const DeepCollectionEquality().hash(successOrFail);
  429. @JsonKey(ignore: true)
  430. @override
  431. _$FinishCopyWith<_Finish> get copyWith =>
  432. __$FinishCopyWithImpl<_Finish>(this, _$identity);
  433. @override
  434. @optionalTypeArgs
  435. TResult when<TResult extends Object?>({
  436. required TResult Function() loading,
  437. required TResult Function(Either<FlowyDoc, WorkspaceError> successOrFail)
  438. finish,
  439. }) {
  440. return finish(successOrFail);
  441. }
  442. @override
  443. @optionalTypeArgs
  444. TResult maybeWhen<TResult extends Object?>({
  445. TResult Function()? loading,
  446. TResult Function(Either<FlowyDoc, WorkspaceError> successOrFail)? finish,
  447. required TResult orElse(),
  448. }) {
  449. if (finish != null) {
  450. return finish(successOrFail);
  451. }
  452. return orElse();
  453. }
  454. @override
  455. @optionalTypeArgs
  456. TResult map<TResult extends Object?>({
  457. required TResult Function(_Loading value) loading,
  458. required TResult Function(_Finish value) finish,
  459. }) {
  460. return finish(this);
  461. }
  462. @override
  463. @optionalTypeArgs
  464. TResult maybeMap<TResult extends Object?>({
  465. TResult Function(_Loading value)? loading,
  466. TResult Function(_Finish value)? finish,
  467. required TResult orElse(),
  468. }) {
  469. if (finish != null) {
  470. return finish(this);
  471. }
  472. return orElse();
  473. }
  474. }
  475. abstract class _Finish implements DocLoadState {
  476. const factory _Finish(Either<FlowyDoc, WorkspaceError> successOrFail) =
  477. _$_Finish;
  478. Either<FlowyDoc, WorkspaceError> get successOrFail =>
  479. throw _privateConstructorUsedError;
  480. @JsonKey(ignore: true)
  481. _$FinishCopyWith<_Finish> get copyWith => throw _privateConstructorUsedError;
  482. }