doc_bloc.freezed.dart 12 KB

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