view_edit_bloc.freezed.dart 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  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 'view_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 _$ViewEditEventTearOff {
  12. const _$ViewEditEventTearOff();
  13. Initial initial() {
  14. return const Initial();
  15. }
  16. }
  17. /// @nodoc
  18. const $ViewEditEvent = _$ViewEditEventTearOff();
  19. /// @nodoc
  20. mixin _$ViewEditEvent {
  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 $ViewEditEventCopyWith<$Res> {
  46. factory $ViewEditEventCopyWith(
  47. ViewEditEvent value, $Res Function(ViewEditEvent) then) =
  48. _$ViewEditEventCopyWithImpl<$Res>;
  49. }
  50. /// @nodoc
  51. class _$ViewEditEventCopyWithImpl<$Res>
  52. implements $ViewEditEventCopyWith<$Res> {
  53. _$ViewEditEventCopyWithImpl(this._value, this._then);
  54. final ViewEditEvent _value;
  55. // ignore: unused_field
  56. final $Res Function(ViewEditEvent) _then;
  57. }
  58. /// @nodoc
  59. abstract class $InitialCopyWith<$Res> {
  60. factory $InitialCopyWith(Initial value, $Res Function(Initial) then) =
  61. _$InitialCopyWithImpl<$Res>;
  62. }
  63. /// @nodoc
  64. class _$InitialCopyWithImpl<$Res> extends _$ViewEditEventCopyWithImpl<$Res>
  65. implements $InitialCopyWith<$Res> {
  66. _$InitialCopyWithImpl(Initial _value, $Res Function(Initial) _then)
  67. : super(_value, (v) => _then(v as Initial));
  68. @override
  69. Initial get _value => super._value as Initial;
  70. }
  71. /// @nodoc
  72. class _$Initial implements Initial {
  73. const _$Initial();
  74. @override
  75. String toString() {
  76. return 'ViewEditEvent.initial()';
  77. }
  78. @override
  79. bool operator ==(dynamic other) {
  80. return identical(this, other) || (other is Initial);
  81. }
  82. @override
  83. int get hashCode => runtimeType.hashCode;
  84. @override
  85. @optionalTypeArgs
  86. TResult when<TResult extends Object?>({
  87. required TResult Function() initial,
  88. }) {
  89. return initial();
  90. }
  91. @override
  92. @optionalTypeArgs
  93. TResult maybeWhen<TResult extends Object?>({
  94. TResult Function()? initial,
  95. required TResult orElse(),
  96. }) {
  97. if (initial != null) {
  98. return initial();
  99. }
  100. return orElse();
  101. }
  102. @override
  103. @optionalTypeArgs
  104. TResult map<TResult extends Object?>({
  105. required TResult Function(Initial value) initial,
  106. }) {
  107. return initial(this);
  108. }
  109. @override
  110. @optionalTypeArgs
  111. TResult maybeMap<TResult extends Object?>({
  112. TResult Function(Initial value)? initial,
  113. required TResult orElse(),
  114. }) {
  115. if (initial != null) {
  116. return initial(this);
  117. }
  118. return orElse();
  119. }
  120. }
  121. abstract class Initial implements ViewEditEvent {
  122. const factory Initial() = _$Initial;
  123. }
  124. /// @nodoc
  125. class _$ViewEditStateTearOff {
  126. const _$ViewEditStateTearOff();
  127. _ViewState call(
  128. {required bool isLoading,
  129. required Option<View> view,
  130. required Either<Unit, WorkspaceError> successOrFailure}) {
  131. return _ViewState(
  132. isLoading: isLoading,
  133. view: view,
  134. successOrFailure: successOrFailure,
  135. );
  136. }
  137. }
  138. /// @nodoc
  139. const $ViewEditState = _$ViewEditStateTearOff();
  140. /// @nodoc
  141. mixin _$ViewEditState {
  142. bool get isLoading => throw _privateConstructorUsedError;
  143. Option<View> get view => throw _privateConstructorUsedError;
  144. Either<Unit, WorkspaceError> get successOrFailure =>
  145. throw _privateConstructorUsedError;
  146. @JsonKey(ignore: true)
  147. $ViewEditStateCopyWith<ViewEditState> get copyWith =>
  148. throw _privateConstructorUsedError;
  149. }
  150. /// @nodoc
  151. abstract class $ViewEditStateCopyWith<$Res> {
  152. factory $ViewEditStateCopyWith(
  153. ViewEditState value, $Res Function(ViewEditState) then) =
  154. _$ViewEditStateCopyWithImpl<$Res>;
  155. $Res call(
  156. {bool isLoading,
  157. Option<View> view,
  158. Either<Unit, WorkspaceError> successOrFailure});
  159. }
  160. /// @nodoc
  161. class _$ViewEditStateCopyWithImpl<$Res>
  162. implements $ViewEditStateCopyWith<$Res> {
  163. _$ViewEditStateCopyWithImpl(this._value, this._then);
  164. final ViewEditState _value;
  165. // ignore: unused_field
  166. final $Res Function(ViewEditState) _then;
  167. @override
  168. $Res call({
  169. Object? isLoading = freezed,
  170. Object? view = freezed,
  171. Object? successOrFailure = freezed,
  172. }) {
  173. return _then(_value.copyWith(
  174. isLoading: isLoading == freezed
  175. ? _value.isLoading
  176. : isLoading // ignore: cast_nullable_to_non_nullable
  177. as bool,
  178. view: view == freezed
  179. ? _value.view
  180. : view // ignore: cast_nullable_to_non_nullable
  181. as Option<View>,
  182. successOrFailure: successOrFailure == freezed
  183. ? _value.successOrFailure
  184. : successOrFailure // ignore: cast_nullable_to_non_nullable
  185. as Either<Unit, WorkspaceError>,
  186. ));
  187. }
  188. }
  189. /// @nodoc
  190. abstract class _$ViewStateCopyWith<$Res>
  191. implements $ViewEditStateCopyWith<$Res> {
  192. factory _$ViewStateCopyWith(
  193. _ViewState value, $Res Function(_ViewState) then) =
  194. __$ViewStateCopyWithImpl<$Res>;
  195. @override
  196. $Res call(
  197. {bool isLoading,
  198. Option<View> view,
  199. Either<Unit, WorkspaceError> successOrFailure});
  200. }
  201. /// @nodoc
  202. class __$ViewStateCopyWithImpl<$Res> extends _$ViewEditStateCopyWithImpl<$Res>
  203. implements _$ViewStateCopyWith<$Res> {
  204. __$ViewStateCopyWithImpl(_ViewState _value, $Res Function(_ViewState) _then)
  205. : super(_value, (v) => _then(v as _ViewState));
  206. @override
  207. _ViewState get _value => super._value as _ViewState;
  208. @override
  209. $Res call({
  210. Object? isLoading = freezed,
  211. Object? view = freezed,
  212. Object? successOrFailure = freezed,
  213. }) {
  214. return _then(_ViewState(
  215. isLoading: isLoading == freezed
  216. ? _value.isLoading
  217. : isLoading // ignore: cast_nullable_to_non_nullable
  218. as bool,
  219. view: view == freezed
  220. ? _value.view
  221. : view // ignore: cast_nullable_to_non_nullable
  222. as Option<View>,
  223. successOrFailure: successOrFailure == freezed
  224. ? _value.successOrFailure
  225. : successOrFailure // ignore: cast_nullable_to_non_nullable
  226. as Either<Unit, WorkspaceError>,
  227. ));
  228. }
  229. }
  230. /// @nodoc
  231. class _$_ViewState implements _ViewState {
  232. const _$_ViewState(
  233. {required this.isLoading,
  234. required this.view,
  235. required this.successOrFailure});
  236. @override
  237. final bool isLoading;
  238. @override
  239. final Option<View> view;
  240. @override
  241. final Either<Unit, WorkspaceError> successOrFailure;
  242. @override
  243. String toString() {
  244. return 'ViewEditState(isLoading: $isLoading, view: $view, successOrFailure: $successOrFailure)';
  245. }
  246. @override
  247. bool operator ==(dynamic other) {
  248. return identical(this, other) ||
  249. (other is _ViewState &&
  250. (identical(other.isLoading, isLoading) ||
  251. const DeepCollectionEquality()
  252. .equals(other.isLoading, isLoading)) &&
  253. (identical(other.view, view) ||
  254. const DeepCollectionEquality().equals(other.view, view)) &&
  255. (identical(other.successOrFailure, successOrFailure) ||
  256. const DeepCollectionEquality()
  257. .equals(other.successOrFailure, successOrFailure)));
  258. }
  259. @override
  260. int get hashCode =>
  261. runtimeType.hashCode ^
  262. const DeepCollectionEquality().hash(isLoading) ^
  263. const DeepCollectionEquality().hash(view) ^
  264. const DeepCollectionEquality().hash(successOrFailure);
  265. @JsonKey(ignore: true)
  266. @override
  267. _$ViewStateCopyWith<_ViewState> get copyWith =>
  268. __$ViewStateCopyWithImpl<_ViewState>(this, _$identity);
  269. }
  270. abstract class _ViewState implements ViewEditState {
  271. const factory _ViewState(
  272. {required bool isLoading,
  273. required Option<View> view,
  274. required Either<Unit, WorkspaceError> successOrFailure}) = _$_ViewState;
  275. @override
  276. bool get isLoading => throw _privateConstructorUsedError;
  277. @override
  278. Option<View> get view => throw _privateConstructorUsedError;
  279. @override
  280. Either<Unit, WorkspaceError> get successOrFailure =>
  281. throw _privateConstructorUsedError;
  282. @override
  283. @JsonKey(ignore: true)
  284. _$ViewStateCopyWith<_ViewState> get copyWith =>
  285. throw _privateConstructorUsedError;
  286. }