doc_edit_bloc.freezed.dart 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646
  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_edit_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 _$DocEditEventTearOff {
  12. const _$DocEditEventTearOff();
  13. Initial initial() {
  14. return const Initial();
  15. }
  16. Changeset changeset(String data) {
  17. return Changeset(
  18. data,
  19. );
  20. }
  21. Save save(String data) {
  22. return Save(
  23. data,
  24. );
  25. }
  26. Close close() {
  27. return const Close();
  28. }
  29. }
  30. /// @nodoc
  31. const $DocEditEvent = _$DocEditEventTearOff();
  32. /// @nodoc
  33. mixin _$DocEditEvent {
  34. @optionalTypeArgs
  35. TResult when<TResult extends Object?>({
  36. required TResult Function() initial,
  37. required TResult Function(String data) changeset,
  38. required TResult Function(String data) save,
  39. required TResult Function() close,
  40. }) =>
  41. throw _privateConstructorUsedError;
  42. @optionalTypeArgs
  43. TResult maybeWhen<TResult extends Object?>({
  44. TResult Function()? initial,
  45. TResult Function(String data)? changeset,
  46. TResult Function(String data)? save,
  47. TResult Function()? close,
  48. required TResult orElse(),
  49. }) =>
  50. throw _privateConstructorUsedError;
  51. @optionalTypeArgs
  52. TResult map<TResult extends Object?>({
  53. required TResult Function(Initial value) initial,
  54. required TResult Function(Changeset value) changeset,
  55. required TResult Function(Save value) save,
  56. required TResult Function(Close value) close,
  57. }) =>
  58. throw _privateConstructorUsedError;
  59. @optionalTypeArgs
  60. TResult maybeMap<TResult extends Object?>({
  61. TResult Function(Initial value)? initial,
  62. TResult Function(Changeset value)? changeset,
  63. TResult Function(Save value)? save,
  64. TResult Function(Close value)? close,
  65. required TResult orElse(),
  66. }) =>
  67. throw _privateConstructorUsedError;
  68. }
  69. /// @nodoc
  70. abstract class $DocEditEventCopyWith<$Res> {
  71. factory $DocEditEventCopyWith(
  72. DocEditEvent value, $Res Function(DocEditEvent) then) =
  73. _$DocEditEventCopyWithImpl<$Res>;
  74. }
  75. /// @nodoc
  76. class _$DocEditEventCopyWithImpl<$Res> implements $DocEditEventCopyWith<$Res> {
  77. _$DocEditEventCopyWithImpl(this._value, this._then);
  78. final DocEditEvent _value;
  79. // ignore: unused_field
  80. final $Res Function(DocEditEvent) _then;
  81. }
  82. /// @nodoc
  83. abstract class $InitialCopyWith<$Res> {
  84. factory $InitialCopyWith(Initial value, $Res Function(Initial) then) =
  85. _$InitialCopyWithImpl<$Res>;
  86. }
  87. /// @nodoc
  88. class _$InitialCopyWithImpl<$Res> extends _$DocEditEventCopyWithImpl<$Res>
  89. implements $InitialCopyWith<$Res> {
  90. _$InitialCopyWithImpl(Initial _value, $Res Function(Initial) _then)
  91. : super(_value, (v) => _then(v as Initial));
  92. @override
  93. Initial get _value => super._value as Initial;
  94. }
  95. /// @nodoc
  96. class _$Initial implements Initial {
  97. const _$Initial();
  98. @override
  99. String toString() {
  100. return 'DocEditEvent.initial()';
  101. }
  102. @override
  103. bool operator ==(dynamic other) {
  104. return identical(this, other) || (other is Initial);
  105. }
  106. @override
  107. int get hashCode => runtimeType.hashCode;
  108. @override
  109. @optionalTypeArgs
  110. TResult when<TResult extends Object?>({
  111. required TResult Function() initial,
  112. required TResult Function(String data) changeset,
  113. required TResult Function(String data) save,
  114. required TResult Function() close,
  115. }) {
  116. return initial();
  117. }
  118. @override
  119. @optionalTypeArgs
  120. TResult maybeWhen<TResult extends Object?>({
  121. TResult Function()? initial,
  122. TResult Function(String data)? changeset,
  123. TResult Function(String data)? save,
  124. TResult Function()? close,
  125. required TResult orElse(),
  126. }) {
  127. if (initial != null) {
  128. return initial();
  129. }
  130. return orElse();
  131. }
  132. @override
  133. @optionalTypeArgs
  134. TResult map<TResult extends Object?>({
  135. required TResult Function(Initial value) initial,
  136. required TResult Function(Changeset value) changeset,
  137. required TResult Function(Save value) save,
  138. required TResult Function(Close value) close,
  139. }) {
  140. return initial(this);
  141. }
  142. @override
  143. @optionalTypeArgs
  144. TResult maybeMap<TResult extends Object?>({
  145. TResult Function(Initial value)? initial,
  146. TResult Function(Changeset value)? changeset,
  147. TResult Function(Save value)? save,
  148. TResult Function(Close value)? close,
  149. required TResult orElse(),
  150. }) {
  151. if (initial != null) {
  152. return initial(this);
  153. }
  154. return orElse();
  155. }
  156. }
  157. abstract class Initial implements DocEditEvent {
  158. const factory Initial() = _$Initial;
  159. }
  160. /// @nodoc
  161. abstract class $ChangesetCopyWith<$Res> {
  162. factory $ChangesetCopyWith(Changeset value, $Res Function(Changeset) then) =
  163. _$ChangesetCopyWithImpl<$Res>;
  164. $Res call({String data});
  165. }
  166. /// @nodoc
  167. class _$ChangesetCopyWithImpl<$Res> extends _$DocEditEventCopyWithImpl<$Res>
  168. implements $ChangesetCopyWith<$Res> {
  169. _$ChangesetCopyWithImpl(Changeset _value, $Res Function(Changeset) _then)
  170. : super(_value, (v) => _then(v as Changeset));
  171. @override
  172. Changeset get _value => super._value as Changeset;
  173. @override
  174. $Res call({
  175. Object? data = freezed,
  176. }) {
  177. return _then(Changeset(
  178. data == freezed
  179. ? _value.data
  180. : data // ignore: cast_nullable_to_non_nullable
  181. as String,
  182. ));
  183. }
  184. }
  185. /// @nodoc
  186. class _$Changeset implements Changeset {
  187. const _$Changeset(this.data);
  188. @override
  189. final String data;
  190. @override
  191. String toString() {
  192. return 'DocEditEvent.changeset(data: $data)';
  193. }
  194. @override
  195. bool operator ==(dynamic other) {
  196. return identical(this, other) ||
  197. (other is Changeset &&
  198. (identical(other.data, data) ||
  199. const DeepCollectionEquality().equals(other.data, data)));
  200. }
  201. @override
  202. int get hashCode =>
  203. runtimeType.hashCode ^ const DeepCollectionEquality().hash(data);
  204. @JsonKey(ignore: true)
  205. @override
  206. $ChangesetCopyWith<Changeset> get copyWith =>
  207. _$ChangesetCopyWithImpl<Changeset>(this, _$identity);
  208. @override
  209. @optionalTypeArgs
  210. TResult when<TResult extends Object?>({
  211. required TResult Function() initial,
  212. required TResult Function(String data) changeset,
  213. required TResult Function(String data) save,
  214. required TResult Function() close,
  215. }) {
  216. return changeset(data);
  217. }
  218. @override
  219. @optionalTypeArgs
  220. TResult maybeWhen<TResult extends Object?>({
  221. TResult Function()? initial,
  222. TResult Function(String data)? changeset,
  223. TResult Function(String data)? save,
  224. TResult Function()? close,
  225. required TResult orElse(),
  226. }) {
  227. if (changeset != null) {
  228. return changeset(data);
  229. }
  230. return orElse();
  231. }
  232. @override
  233. @optionalTypeArgs
  234. TResult map<TResult extends Object?>({
  235. required TResult Function(Initial value) initial,
  236. required TResult Function(Changeset value) changeset,
  237. required TResult Function(Save value) save,
  238. required TResult Function(Close value) close,
  239. }) {
  240. return changeset(this);
  241. }
  242. @override
  243. @optionalTypeArgs
  244. TResult maybeMap<TResult extends Object?>({
  245. TResult Function(Initial value)? initial,
  246. TResult Function(Changeset value)? changeset,
  247. TResult Function(Save value)? save,
  248. TResult Function(Close value)? close,
  249. required TResult orElse(),
  250. }) {
  251. if (changeset != null) {
  252. return changeset(this);
  253. }
  254. return orElse();
  255. }
  256. }
  257. abstract class Changeset implements DocEditEvent {
  258. const factory Changeset(String data) = _$Changeset;
  259. String get data => throw _privateConstructorUsedError;
  260. @JsonKey(ignore: true)
  261. $ChangesetCopyWith<Changeset> get copyWith =>
  262. throw _privateConstructorUsedError;
  263. }
  264. /// @nodoc
  265. abstract class $SaveCopyWith<$Res> {
  266. factory $SaveCopyWith(Save value, $Res Function(Save) then) =
  267. _$SaveCopyWithImpl<$Res>;
  268. $Res call({String data});
  269. }
  270. /// @nodoc
  271. class _$SaveCopyWithImpl<$Res> extends _$DocEditEventCopyWithImpl<$Res>
  272. implements $SaveCopyWith<$Res> {
  273. _$SaveCopyWithImpl(Save _value, $Res Function(Save) _then)
  274. : super(_value, (v) => _then(v as Save));
  275. @override
  276. Save get _value => super._value as Save;
  277. @override
  278. $Res call({
  279. Object? data = freezed,
  280. }) {
  281. return _then(Save(
  282. data == freezed
  283. ? _value.data
  284. : data // ignore: cast_nullable_to_non_nullable
  285. as String,
  286. ));
  287. }
  288. }
  289. /// @nodoc
  290. class _$Save implements Save {
  291. const _$Save(this.data);
  292. @override
  293. final String data;
  294. @override
  295. String toString() {
  296. return 'DocEditEvent.save(data: $data)';
  297. }
  298. @override
  299. bool operator ==(dynamic other) {
  300. return identical(this, other) ||
  301. (other is Save &&
  302. (identical(other.data, data) ||
  303. const DeepCollectionEquality().equals(other.data, data)));
  304. }
  305. @override
  306. int get hashCode =>
  307. runtimeType.hashCode ^ const DeepCollectionEquality().hash(data);
  308. @JsonKey(ignore: true)
  309. @override
  310. $SaveCopyWith<Save> get copyWith =>
  311. _$SaveCopyWithImpl<Save>(this, _$identity);
  312. @override
  313. @optionalTypeArgs
  314. TResult when<TResult extends Object?>({
  315. required TResult Function() initial,
  316. required TResult Function(String data) changeset,
  317. required TResult Function(String data) save,
  318. required TResult Function() close,
  319. }) {
  320. return save(data);
  321. }
  322. @override
  323. @optionalTypeArgs
  324. TResult maybeWhen<TResult extends Object?>({
  325. TResult Function()? initial,
  326. TResult Function(String data)? changeset,
  327. TResult Function(String data)? save,
  328. TResult Function()? close,
  329. required TResult orElse(),
  330. }) {
  331. if (save != null) {
  332. return save(data);
  333. }
  334. return orElse();
  335. }
  336. @override
  337. @optionalTypeArgs
  338. TResult map<TResult extends Object?>({
  339. required TResult Function(Initial value) initial,
  340. required TResult Function(Changeset value) changeset,
  341. required TResult Function(Save value) save,
  342. required TResult Function(Close value) close,
  343. }) {
  344. return save(this);
  345. }
  346. @override
  347. @optionalTypeArgs
  348. TResult maybeMap<TResult extends Object?>({
  349. TResult Function(Initial value)? initial,
  350. TResult Function(Changeset value)? changeset,
  351. TResult Function(Save value)? save,
  352. TResult Function(Close value)? close,
  353. required TResult orElse(),
  354. }) {
  355. if (save != null) {
  356. return save(this);
  357. }
  358. return orElse();
  359. }
  360. }
  361. abstract class Save implements DocEditEvent {
  362. const factory Save(String data) = _$Save;
  363. String get data => throw _privateConstructorUsedError;
  364. @JsonKey(ignore: true)
  365. $SaveCopyWith<Save> get copyWith => throw _privateConstructorUsedError;
  366. }
  367. /// @nodoc
  368. abstract class $CloseCopyWith<$Res> {
  369. factory $CloseCopyWith(Close value, $Res Function(Close) then) =
  370. _$CloseCopyWithImpl<$Res>;
  371. }
  372. /// @nodoc
  373. class _$CloseCopyWithImpl<$Res> extends _$DocEditEventCopyWithImpl<$Res>
  374. implements $CloseCopyWith<$Res> {
  375. _$CloseCopyWithImpl(Close _value, $Res Function(Close) _then)
  376. : super(_value, (v) => _then(v as Close));
  377. @override
  378. Close get _value => super._value as Close;
  379. }
  380. /// @nodoc
  381. class _$Close implements Close {
  382. const _$Close();
  383. @override
  384. String toString() {
  385. return 'DocEditEvent.close()';
  386. }
  387. @override
  388. bool operator ==(dynamic other) {
  389. return identical(this, other) || (other is Close);
  390. }
  391. @override
  392. int get hashCode => runtimeType.hashCode;
  393. @override
  394. @optionalTypeArgs
  395. TResult when<TResult extends Object?>({
  396. required TResult Function() initial,
  397. required TResult Function(String data) changeset,
  398. required TResult Function(String data) save,
  399. required TResult Function() close,
  400. }) {
  401. return close();
  402. }
  403. @override
  404. @optionalTypeArgs
  405. TResult maybeWhen<TResult extends Object?>({
  406. TResult Function()? initial,
  407. TResult Function(String data)? changeset,
  408. TResult Function(String data)? save,
  409. TResult Function()? close,
  410. required TResult orElse(),
  411. }) {
  412. if (close != null) {
  413. return close();
  414. }
  415. return orElse();
  416. }
  417. @override
  418. @optionalTypeArgs
  419. TResult map<TResult extends Object?>({
  420. required TResult Function(Initial value) initial,
  421. required TResult Function(Changeset value) changeset,
  422. required TResult Function(Save value) save,
  423. required TResult Function(Close value) close,
  424. }) {
  425. return close(this);
  426. }
  427. @override
  428. @optionalTypeArgs
  429. TResult maybeMap<TResult extends Object?>({
  430. TResult Function(Initial value)? initial,
  431. TResult Function(Changeset value)? changeset,
  432. TResult Function(Save value)? save,
  433. TResult Function(Close value)? close,
  434. required TResult orElse(),
  435. }) {
  436. if (close != null) {
  437. return close(this);
  438. }
  439. return orElse();
  440. }
  441. }
  442. abstract class Close implements DocEditEvent {
  443. const factory Close() = _$Close;
  444. }
  445. /// @nodoc
  446. class _$DocEditStateTearOff {
  447. const _$DocEditStateTearOff();
  448. _DocEditState call({required bool isSaving}) {
  449. return _DocEditState(
  450. isSaving: isSaving,
  451. );
  452. }
  453. }
  454. /// @nodoc
  455. const $DocEditState = _$DocEditStateTearOff();
  456. /// @nodoc
  457. mixin _$DocEditState {
  458. bool get isSaving => throw _privateConstructorUsedError;
  459. @JsonKey(ignore: true)
  460. $DocEditStateCopyWith<DocEditState> get copyWith =>
  461. throw _privateConstructorUsedError;
  462. }
  463. /// @nodoc
  464. abstract class $DocEditStateCopyWith<$Res> {
  465. factory $DocEditStateCopyWith(
  466. DocEditState value, $Res Function(DocEditState) then) =
  467. _$DocEditStateCopyWithImpl<$Res>;
  468. $Res call({bool isSaving});
  469. }
  470. /// @nodoc
  471. class _$DocEditStateCopyWithImpl<$Res> implements $DocEditStateCopyWith<$Res> {
  472. _$DocEditStateCopyWithImpl(this._value, this._then);
  473. final DocEditState _value;
  474. // ignore: unused_field
  475. final $Res Function(DocEditState) _then;
  476. @override
  477. $Res call({
  478. Object? isSaving = freezed,
  479. }) {
  480. return _then(_value.copyWith(
  481. isSaving: isSaving == freezed
  482. ? _value.isSaving
  483. : isSaving // ignore: cast_nullable_to_non_nullable
  484. as bool,
  485. ));
  486. }
  487. }
  488. /// @nodoc
  489. abstract class _$DocEditStateCopyWith<$Res>
  490. implements $DocEditStateCopyWith<$Res> {
  491. factory _$DocEditStateCopyWith(
  492. _DocEditState value, $Res Function(_DocEditState) then) =
  493. __$DocEditStateCopyWithImpl<$Res>;
  494. @override
  495. $Res call({bool isSaving});
  496. }
  497. /// @nodoc
  498. class __$DocEditStateCopyWithImpl<$Res> extends _$DocEditStateCopyWithImpl<$Res>
  499. implements _$DocEditStateCopyWith<$Res> {
  500. __$DocEditStateCopyWithImpl(
  501. _DocEditState _value, $Res Function(_DocEditState) _then)
  502. : super(_value, (v) => _then(v as _DocEditState));
  503. @override
  504. _DocEditState get _value => super._value as _DocEditState;
  505. @override
  506. $Res call({
  507. Object? isSaving = freezed,
  508. }) {
  509. return _then(_DocEditState(
  510. isSaving: isSaving == freezed
  511. ? _value.isSaving
  512. : isSaving // ignore: cast_nullable_to_non_nullable
  513. as bool,
  514. ));
  515. }
  516. }
  517. /// @nodoc
  518. class _$_DocEditState implements _DocEditState {
  519. const _$_DocEditState({required this.isSaving});
  520. @override
  521. final bool isSaving;
  522. @override
  523. String toString() {
  524. return 'DocEditState(isSaving: $isSaving)';
  525. }
  526. @override
  527. bool operator ==(dynamic other) {
  528. return identical(this, other) ||
  529. (other is _DocEditState &&
  530. (identical(other.isSaving, isSaving) ||
  531. const DeepCollectionEquality()
  532. .equals(other.isSaving, isSaving)));
  533. }
  534. @override
  535. int get hashCode =>
  536. runtimeType.hashCode ^ const DeepCollectionEquality().hash(isSaving);
  537. @JsonKey(ignore: true)
  538. @override
  539. _$DocEditStateCopyWith<_DocEditState> get copyWith =>
  540. __$DocEditStateCopyWithImpl<_DocEditState>(this, _$identity);
  541. }
  542. abstract class _DocEditState implements DocEditState {
  543. const factory _DocEditState({required bool isSaving}) = _$_DocEditState;
  544. @override
  545. bool get isSaving => throw _privateConstructorUsedError;
  546. @override
  547. @JsonKey(ignore: true)
  548. _$DocEditStateCopyWith<_DocEditState> get copyWith =>
  549. throw _privateConstructorUsedError;
  550. }