app_bloc.freezed.dart 13 KB

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