doc_watch_bloc.freezed.dart 14 KB

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