view_bloc.freezed.dart 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  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 'view_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 _$ViewEventTearOff {
  12. const _$ViewEventTearOff();
  13. Initial initial() {
  14. return const Initial();
  15. }
  16. }
  17. /// @nodoc
  18. const $ViewEvent = _$ViewEventTearOff();
  19. /// @nodoc
  20. mixin _$ViewEvent {
  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 $ViewEventCopyWith<$Res> {
  46. factory $ViewEventCopyWith(ViewEvent value, $Res Function(ViewEvent) then) =
  47. _$ViewEventCopyWithImpl<$Res>;
  48. }
  49. /// @nodoc
  50. class _$ViewEventCopyWithImpl<$Res> implements $ViewEventCopyWith<$Res> {
  51. _$ViewEventCopyWithImpl(this._value, this._then);
  52. final ViewEvent _value;
  53. // ignore: unused_field
  54. final $Res Function(ViewEvent) _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 _$ViewEventCopyWithImpl<$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 'ViewEvent.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 ViewEvent {
  120. const factory Initial() = _$Initial;
  121. }
  122. /// @nodoc
  123. class _$ViewStateTearOff {
  124. const _$ViewStateTearOff();
  125. _ViewState call(
  126. {required bool isLoading,
  127. required Option<View> view,
  128. required Either<Unit, WorkspaceError> successOrFailure}) {
  129. return _ViewState(
  130. isLoading: isLoading,
  131. view: view,
  132. successOrFailure: successOrFailure,
  133. );
  134. }
  135. }
  136. /// @nodoc
  137. const $ViewState = _$ViewStateTearOff();
  138. /// @nodoc
  139. mixin _$ViewState {
  140. bool get isLoading => throw _privateConstructorUsedError;
  141. Option<View> get view => throw _privateConstructorUsedError;
  142. Either<Unit, WorkspaceError> get successOrFailure =>
  143. throw _privateConstructorUsedError;
  144. @JsonKey(ignore: true)
  145. $ViewStateCopyWith<ViewState> get copyWith =>
  146. throw _privateConstructorUsedError;
  147. }
  148. /// @nodoc
  149. abstract class $ViewStateCopyWith<$Res> {
  150. factory $ViewStateCopyWith(ViewState value, $Res Function(ViewState) then) =
  151. _$ViewStateCopyWithImpl<$Res>;
  152. $Res call(
  153. {bool isLoading,
  154. Option<View> view,
  155. Either<Unit, WorkspaceError> successOrFailure});
  156. }
  157. /// @nodoc
  158. class _$ViewStateCopyWithImpl<$Res> implements $ViewStateCopyWith<$Res> {
  159. _$ViewStateCopyWithImpl(this._value, this._then);
  160. final ViewState _value;
  161. // ignore: unused_field
  162. final $Res Function(ViewState) _then;
  163. @override
  164. $Res call({
  165. Object? isLoading = freezed,
  166. Object? view = freezed,
  167. Object? successOrFailure = freezed,
  168. }) {
  169. return _then(_value.copyWith(
  170. isLoading: isLoading == freezed
  171. ? _value.isLoading
  172. : isLoading // ignore: cast_nullable_to_non_nullable
  173. as bool,
  174. view: view == freezed
  175. ? _value.view
  176. : view // ignore: cast_nullable_to_non_nullable
  177. as Option<View>,
  178. successOrFailure: successOrFailure == freezed
  179. ? _value.successOrFailure
  180. : successOrFailure // ignore: cast_nullable_to_non_nullable
  181. as Either<Unit, WorkspaceError>,
  182. ));
  183. }
  184. }
  185. /// @nodoc
  186. abstract class _$ViewStateCopyWith<$Res> implements $ViewStateCopyWith<$Res> {
  187. factory _$ViewStateCopyWith(
  188. _ViewState value, $Res Function(_ViewState) then) =
  189. __$ViewStateCopyWithImpl<$Res>;
  190. @override
  191. $Res call(
  192. {bool isLoading,
  193. Option<View> view,
  194. Either<Unit, WorkspaceError> successOrFailure});
  195. }
  196. /// @nodoc
  197. class __$ViewStateCopyWithImpl<$Res> extends _$ViewStateCopyWithImpl<$Res>
  198. implements _$ViewStateCopyWith<$Res> {
  199. __$ViewStateCopyWithImpl(_ViewState _value, $Res Function(_ViewState) _then)
  200. : super(_value, (v) => _then(v as _ViewState));
  201. @override
  202. _ViewState get _value => super._value as _ViewState;
  203. @override
  204. $Res call({
  205. Object? isLoading = freezed,
  206. Object? view = freezed,
  207. Object? successOrFailure = freezed,
  208. }) {
  209. return _then(_ViewState(
  210. isLoading: isLoading == freezed
  211. ? _value.isLoading
  212. : isLoading // ignore: cast_nullable_to_non_nullable
  213. as bool,
  214. view: view == freezed
  215. ? _value.view
  216. : view // ignore: cast_nullable_to_non_nullable
  217. as Option<View>,
  218. successOrFailure: successOrFailure == freezed
  219. ? _value.successOrFailure
  220. : successOrFailure // ignore: cast_nullable_to_non_nullable
  221. as Either<Unit, WorkspaceError>,
  222. ));
  223. }
  224. }
  225. /// @nodoc
  226. class _$_ViewState implements _ViewState {
  227. const _$_ViewState(
  228. {required this.isLoading,
  229. required this.view,
  230. required this.successOrFailure});
  231. @override
  232. final bool isLoading;
  233. @override
  234. final Option<View> view;
  235. @override
  236. final Either<Unit, WorkspaceError> successOrFailure;
  237. @override
  238. String toString() {
  239. return 'ViewState(isLoading: $isLoading, view: $view, successOrFailure: $successOrFailure)';
  240. }
  241. @override
  242. bool operator ==(dynamic other) {
  243. return identical(this, other) ||
  244. (other is _ViewState &&
  245. (identical(other.isLoading, isLoading) ||
  246. const DeepCollectionEquality()
  247. .equals(other.isLoading, isLoading)) &&
  248. (identical(other.view, view) ||
  249. const DeepCollectionEquality().equals(other.view, view)) &&
  250. (identical(other.successOrFailure, successOrFailure) ||
  251. const DeepCollectionEquality()
  252. .equals(other.successOrFailure, successOrFailure)));
  253. }
  254. @override
  255. int get hashCode =>
  256. runtimeType.hashCode ^
  257. const DeepCollectionEquality().hash(isLoading) ^
  258. const DeepCollectionEquality().hash(view) ^
  259. const DeepCollectionEquality().hash(successOrFailure);
  260. @JsonKey(ignore: true)
  261. @override
  262. _$ViewStateCopyWith<_ViewState> get copyWith =>
  263. __$ViewStateCopyWithImpl<_ViewState>(this, _$identity);
  264. }
  265. abstract class _ViewState implements ViewState {
  266. const factory _ViewState(
  267. {required bool isLoading,
  268. required Option<View> view,
  269. required Either<Unit, WorkspaceError> successOrFailure}) = _$_ViewState;
  270. @override
  271. bool get isLoading => throw _privateConstructorUsedError;
  272. @override
  273. Option<View> get view => throw _privateConstructorUsedError;
  274. @override
  275. Either<Unit, WorkspaceError> get successOrFailure =>
  276. throw _privateConstructorUsedError;
  277. @override
  278. @JsonKey(ignore: true)
  279. _$ViewStateCopyWith<_ViewState> get copyWith =>
  280. throw _privateConstructorUsedError;
  281. }