menu_user_bloc.freezed.dart 13 KB

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