doc_bloc.freezed.dart 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  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. Close close() {
  17. return const Close();
  18. }
  19. }
  20. /// @nodoc
  21. const $DocEvent = _$DocEventTearOff();
  22. /// @nodoc
  23. mixin _$DocEvent {
  24. @optionalTypeArgs
  25. TResult when<TResult extends Object?>({
  26. required TResult Function() initial,
  27. required TResult Function() close,
  28. }) =>
  29. throw _privateConstructorUsedError;
  30. @optionalTypeArgs
  31. TResult maybeWhen<TResult extends Object?>({
  32. TResult Function()? initial,
  33. TResult Function()? close,
  34. required TResult orElse(),
  35. }) =>
  36. throw _privateConstructorUsedError;
  37. @optionalTypeArgs
  38. TResult map<TResult extends Object?>({
  39. required TResult Function(Initial value) initial,
  40. required TResult Function(Close value) close,
  41. }) =>
  42. throw _privateConstructorUsedError;
  43. @optionalTypeArgs
  44. TResult maybeMap<TResult extends Object?>({
  45. TResult Function(Initial value)? initial,
  46. TResult Function(Close value)? close,
  47. required TResult orElse(),
  48. }) =>
  49. throw _privateConstructorUsedError;
  50. }
  51. /// @nodoc
  52. abstract class $DocEventCopyWith<$Res> {
  53. factory $DocEventCopyWith(DocEvent value, $Res Function(DocEvent) then) =
  54. _$DocEventCopyWithImpl<$Res>;
  55. }
  56. /// @nodoc
  57. class _$DocEventCopyWithImpl<$Res> implements $DocEventCopyWith<$Res> {
  58. _$DocEventCopyWithImpl(this._value, this._then);
  59. final DocEvent _value;
  60. // ignore: unused_field
  61. final $Res Function(DocEvent) _then;
  62. }
  63. /// @nodoc
  64. abstract class $InitialCopyWith<$Res> {
  65. factory $InitialCopyWith(Initial value, $Res Function(Initial) then) =
  66. _$InitialCopyWithImpl<$Res>;
  67. }
  68. /// @nodoc
  69. class _$InitialCopyWithImpl<$Res> extends _$DocEventCopyWithImpl<$Res>
  70. implements $InitialCopyWith<$Res> {
  71. _$InitialCopyWithImpl(Initial _value, $Res Function(Initial) _then)
  72. : super(_value, (v) => _then(v as Initial));
  73. @override
  74. Initial get _value => super._value as Initial;
  75. }
  76. /// @nodoc
  77. class _$Initial implements Initial {
  78. const _$Initial();
  79. @override
  80. String toString() {
  81. return 'DocEvent.initial()';
  82. }
  83. @override
  84. bool operator ==(dynamic other) {
  85. return identical(this, other) || (other is Initial);
  86. }
  87. @override
  88. int get hashCode => runtimeType.hashCode;
  89. @override
  90. @optionalTypeArgs
  91. TResult when<TResult extends Object?>({
  92. required TResult Function() initial,
  93. required TResult Function() close,
  94. }) {
  95. return initial();
  96. }
  97. @override
  98. @optionalTypeArgs
  99. TResult maybeWhen<TResult extends Object?>({
  100. TResult Function()? initial,
  101. TResult Function()? close,
  102. required TResult orElse(),
  103. }) {
  104. if (initial != null) {
  105. return initial();
  106. }
  107. return orElse();
  108. }
  109. @override
  110. @optionalTypeArgs
  111. TResult map<TResult extends Object?>({
  112. required TResult Function(Initial value) initial,
  113. required TResult Function(Close value) close,
  114. }) {
  115. return initial(this);
  116. }
  117. @override
  118. @optionalTypeArgs
  119. TResult maybeMap<TResult extends Object?>({
  120. TResult Function(Initial value)? initial,
  121. TResult Function(Close value)? close,
  122. required TResult orElse(),
  123. }) {
  124. if (initial != null) {
  125. return initial(this);
  126. }
  127. return orElse();
  128. }
  129. }
  130. abstract class Initial implements DocEvent {
  131. const factory Initial() = _$Initial;
  132. }
  133. /// @nodoc
  134. abstract class $CloseCopyWith<$Res> {
  135. factory $CloseCopyWith(Close value, $Res Function(Close) then) =
  136. _$CloseCopyWithImpl<$Res>;
  137. }
  138. /// @nodoc
  139. class _$CloseCopyWithImpl<$Res> extends _$DocEventCopyWithImpl<$Res>
  140. implements $CloseCopyWith<$Res> {
  141. _$CloseCopyWithImpl(Close _value, $Res Function(Close) _then)
  142. : super(_value, (v) => _then(v as Close));
  143. @override
  144. Close get _value => super._value as Close;
  145. }
  146. /// @nodoc
  147. class _$Close implements Close {
  148. const _$Close();
  149. @override
  150. String toString() {
  151. return 'DocEvent.close()';
  152. }
  153. @override
  154. bool operator ==(dynamic other) {
  155. return identical(this, other) || (other is Close);
  156. }
  157. @override
  158. int get hashCode => runtimeType.hashCode;
  159. @override
  160. @optionalTypeArgs
  161. TResult when<TResult extends Object?>({
  162. required TResult Function() initial,
  163. required TResult Function() close,
  164. }) {
  165. return close();
  166. }
  167. @override
  168. @optionalTypeArgs
  169. TResult maybeWhen<TResult extends Object?>({
  170. TResult Function()? initial,
  171. TResult Function()? close,
  172. required TResult orElse(),
  173. }) {
  174. if (close != null) {
  175. return close();
  176. }
  177. return orElse();
  178. }
  179. @override
  180. @optionalTypeArgs
  181. TResult map<TResult extends Object?>({
  182. required TResult Function(Initial value) initial,
  183. required TResult Function(Close value) close,
  184. }) {
  185. return close(this);
  186. }
  187. @override
  188. @optionalTypeArgs
  189. TResult maybeMap<TResult extends Object?>({
  190. TResult Function(Initial value)? initial,
  191. TResult Function(Close value)? close,
  192. required TResult orElse(),
  193. }) {
  194. if (close != null) {
  195. return close(this);
  196. }
  197. return orElse();
  198. }
  199. }
  200. abstract class Close implements DocEvent {
  201. const factory Close() = _$Close;
  202. }
  203. /// @nodoc
  204. class _$DocStateTearOff {
  205. const _$DocStateTearOff();
  206. _DocState call({required bool isSaving}) {
  207. return _DocState(
  208. isSaving: isSaving,
  209. );
  210. }
  211. }
  212. /// @nodoc
  213. const $DocState = _$DocStateTearOff();
  214. /// @nodoc
  215. mixin _$DocState {
  216. bool get isSaving => throw _privateConstructorUsedError;
  217. @JsonKey(ignore: true)
  218. $DocStateCopyWith<DocState> get copyWith =>
  219. throw _privateConstructorUsedError;
  220. }
  221. /// @nodoc
  222. abstract class $DocStateCopyWith<$Res> {
  223. factory $DocStateCopyWith(DocState value, $Res Function(DocState) then) =
  224. _$DocStateCopyWithImpl<$Res>;
  225. $Res call({bool isSaving});
  226. }
  227. /// @nodoc
  228. class _$DocStateCopyWithImpl<$Res> implements $DocStateCopyWith<$Res> {
  229. _$DocStateCopyWithImpl(this._value, this._then);
  230. final DocState _value;
  231. // ignore: unused_field
  232. final $Res Function(DocState) _then;
  233. @override
  234. $Res call({
  235. Object? isSaving = freezed,
  236. }) {
  237. return _then(_value.copyWith(
  238. isSaving: isSaving == freezed
  239. ? _value.isSaving
  240. : isSaving // ignore: cast_nullable_to_non_nullable
  241. as bool,
  242. ));
  243. }
  244. }
  245. /// @nodoc
  246. abstract class _$DocStateCopyWith<$Res> implements $DocStateCopyWith<$Res> {
  247. factory _$DocStateCopyWith(_DocState value, $Res Function(_DocState) then) =
  248. __$DocStateCopyWithImpl<$Res>;
  249. @override
  250. $Res call({bool isSaving});
  251. }
  252. /// @nodoc
  253. class __$DocStateCopyWithImpl<$Res> extends _$DocStateCopyWithImpl<$Res>
  254. implements _$DocStateCopyWith<$Res> {
  255. __$DocStateCopyWithImpl(_DocState _value, $Res Function(_DocState) _then)
  256. : super(_value, (v) => _then(v as _DocState));
  257. @override
  258. _DocState get _value => super._value as _DocState;
  259. @override
  260. $Res call({
  261. Object? isSaving = freezed,
  262. }) {
  263. return _then(_DocState(
  264. isSaving: isSaving == freezed
  265. ? _value.isSaving
  266. : isSaving // ignore: cast_nullable_to_non_nullable
  267. as bool,
  268. ));
  269. }
  270. }
  271. /// @nodoc
  272. class _$_DocState implements _DocState {
  273. const _$_DocState({required this.isSaving});
  274. @override
  275. final bool isSaving;
  276. @override
  277. String toString() {
  278. return 'DocState(isSaving: $isSaving)';
  279. }
  280. @override
  281. bool operator ==(dynamic other) {
  282. return identical(this, other) ||
  283. (other is _DocState &&
  284. (identical(other.isSaving, isSaving) ||
  285. const DeepCollectionEquality()
  286. .equals(other.isSaving, isSaving)));
  287. }
  288. @override
  289. int get hashCode =>
  290. runtimeType.hashCode ^ const DeepCollectionEquality().hash(isSaving);
  291. @JsonKey(ignore: true)
  292. @override
  293. _$DocStateCopyWith<_DocState> get copyWith =>
  294. __$DocStateCopyWithImpl<_DocState>(this, _$identity);
  295. }
  296. abstract class _DocState implements DocState {
  297. const factory _DocState({required bool isSaving}) = _$_DocState;
  298. @override
  299. bool get isSaving => throw _privateConstructorUsedError;
  300. @override
  301. @JsonKey(ignore: true)
  302. _$DocStateCopyWith<_DocState> get copyWith =>
  303. throw _privateConstructorUsedError;
  304. }