app_bloc.freezed.dart 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622
  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 '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. CreateView createView(String name, String desc, ViewType viewType) {
  17. return CreateView(
  18. name,
  19. desc,
  20. viewType,
  21. );
  22. }
  23. ReceiveViews didReceiveViews(List<View> views) {
  24. return ReceiveViews(
  25. views,
  26. );
  27. }
  28. }
  29. /// @nodoc
  30. const $AppEvent = _$AppEventTearOff();
  31. /// @nodoc
  32. mixin _$AppEvent {
  33. @optionalTypeArgs
  34. TResult when<TResult extends Object?>({
  35. required TResult Function() initial,
  36. required TResult Function(String name, String desc, ViewType viewType)
  37. createView,
  38. required TResult Function(List<View> views) didReceiveViews,
  39. }) =>
  40. throw _privateConstructorUsedError;
  41. @optionalTypeArgs
  42. TResult maybeWhen<TResult extends Object?>({
  43. TResult Function()? initial,
  44. TResult Function(String name, String desc, ViewType viewType)? createView,
  45. TResult Function(List<View> views)? didReceiveViews,
  46. required TResult orElse(),
  47. }) =>
  48. throw _privateConstructorUsedError;
  49. @optionalTypeArgs
  50. TResult map<TResult extends Object?>({
  51. required TResult Function(Initial value) initial,
  52. required TResult Function(CreateView value) createView,
  53. required TResult Function(ReceiveViews value) didReceiveViews,
  54. }) =>
  55. throw _privateConstructorUsedError;
  56. @optionalTypeArgs
  57. TResult maybeMap<TResult extends Object?>({
  58. TResult Function(Initial value)? initial,
  59. TResult Function(CreateView value)? createView,
  60. TResult Function(ReceiveViews value)? didReceiveViews,
  61. required TResult orElse(),
  62. }) =>
  63. throw _privateConstructorUsedError;
  64. }
  65. /// @nodoc
  66. abstract class $AppEventCopyWith<$Res> {
  67. factory $AppEventCopyWith(AppEvent value, $Res Function(AppEvent) then) =
  68. _$AppEventCopyWithImpl<$Res>;
  69. }
  70. /// @nodoc
  71. class _$AppEventCopyWithImpl<$Res> implements $AppEventCopyWith<$Res> {
  72. _$AppEventCopyWithImpl(this._value, this._then);
  73. final AppEvent _value;
  74. // ignore: unused_field
  75. final $Res Function(AppEvent) _then;
  76. }
  77. /// @nodoc
  78. abstract class $InitialCopyWith<$Res> {
  79. factory $InitialCopyWith(Initial value, $Res Function(Initial) then) =
  80. _$InitialCopyWithImpl<$Res>;
  81. }
  82. /// @nodoc
  83. class _$InitialCopyWithImpl<$Res> extends _$AppEventCopyWithImpl<$Res>
  84. implements $InitialCopyWith<$Res> {
  85. _$InitialCopyWithImpl(Initial _value, $Res Function(Initial) _then)
  86. : super(_value, (v) => _then(v as Initial));
  87. @override
  88. Initial get _value => super._value as Initial;
  89. }
  90. /// @nodoc
  91. class _$Initial implements Initial {
  92. const _$Initial();
  93. @override
  94. String toString() {
  95. return 'AppEvent.initial()';
  96. }
  97. @override
  98. bool operator ==(dynamic other) {
  99. return identical(this, other) || (other is Initial);
  100. }
  101. @override
  102. int get hashCode => runtimeType.hashCode;
  103. @override
  104. @optionalTypeArgs
  105. TResult when<TResult extends Object?>({
  106. required TResult Function() initial,
  107. required TResult Function(String name, String desc, ViewType viewType)
  108. createView,
  109. required TResult Function(List<View> views) didReceiveViews,
  110. }) {
  111. return initial();
  112. }
  113. @override
  114. @optionalTypeArgs
  115. TResult maybeWhen<TResult extends Object?>({
  116. TResult Function()? initial,
  117. TResult Function(String name, String desc, ViewType viewType)? createView,
  118. TResult Function(List<View> views)? didReceiveViews,
  119. required TResult orElse(),
  120. }) {
  121. if (initial != null) {
  122. return initial();
  123. }
  124. return orElse();
  125. }
  126. @override
  127. @optionalTypeArgs
  128. TResult map<TResult extends Object?>({
  129. required TResult Function(Initial value) initial,
  130. required TResult Function(CreateView value) createView,
  131. required TResult Function(ReceiveViews value) didReceiveViews,
  132. }) {
  133. return initial(this);
  134. }
  135. @override
  136. @optionalTypeArgs
  137. TResult maybeMap<TResult extends Object?>({
  138. TResult Function(Initial value)? initial,
  139. TResult Function(CreateView value)? createView,
  140. TResult Function(ReceiveViews value)? didReceiveViews,
  141. required TResult orElse(),
  142. }) {
  143. if (initial != null) {
  144. return initial(this);
  145. }
  146. return orElse();
  147. }
  148. }
  149. abstract class Initial implements AppEvent {
  150. const factory Initial() = _$Initial;
  151. }
  152. /// @nodoc
  153. abstract class $CreateViewCopyWith<$Res> {
  154. factory $CreateViewCopyWith(
  155. CreateView value, $Res Function(CreateView) then) =
  156. _$CreateViewCopyWithImpl<$Res>;
  157. $Res call({String name, String desc, ViewType viewType});
  158. }
  159. /// @nodoc
  160. class _$CreateViewCopyWithImpl<$Res> extends _$AppEventCopyWithImpl<$Res>
  161. implements $CreateViewCopyWith<$Res> {
  162. _$CreateViewCopyWithImpl(CreateView _value, $Res Function(CreateView) _then)
  163. : super(_value, (v) => _then(v as CreateView));
  164. @override
  165. CreateView get _value => super._value as CreateView;
  166. @override
  167. $Res call({
  168. Object? name = freezed,
  169. Object? desc = freezed,
  170. Object? viewType = freezed,
  171. }) {
  172. return _then(CreateView(
  173. name == freezed
  174. ? _value.name
  175. : name // ignore: cast_nullable_to_non_nullable
  176. as String,
  177. desc == freezed
  178. ? _value.desc
  179. : desc // ignore: cast_nullable_to_non_nullable
  180. as String,
  181. viewType == freezed
  182. ? _value.viewType
  183. : viewType // ignore: cast_nullable_to_non_nullable
  184. as ViewType,
  185. ));
  186. }
  187. }
  188. /// @nodoc
  189. class _$CreateView implements CreateView {
  190. const _$CreateView(this.name, this.desc, this.viewType);
  191. @override
  192. final String name;
  193. @override
  194. final String desc;
  195. @override
  196. final ViewType viewType;
  197. @override
  198. String toString() {
  199. return 'AppEvent.createView(name: $name, desc: $desc, viewType: $viewType)';
  200. }
  201. @override
  202. bool operator ==(dynamic other) {
  203. return identical(this, other) ||
  204. (other is CreateView &&
  205. (identical(other.name, name) ||
  206. const DeepCollectionEquality().equals(other.name, name)) &&
  207. (identical(other.desc, desc) ||
  208. const DeepCollectionEquality().equals(other.desc, desc)) &&
  209. (identical(other.viewType, viewType) ||
  210. const DeepCollectionEquality()
  211. .equals(other.viewType, viewType)));
  212. }
  213. @override
  214. int get hashCode =>
  215. runtimeType.hashCode ^
  216. const DeepCollectionEquality().hash(name) ^
  217. const DeepCollectionEquality().hash(desc) ^
  218. const DeepCollectionEquality().hash(viewType);
  219. @JsonKey(ignore: true)
  220. @override
  221. $CreateViewCopyWith<CreateView> get copyWith =>
  222. _$CreateViewCopyWithImpl<CreateView>(this, _$identity);
  223. @override
  224. @optionalTypeArgs
  225. TResult when<TResult extends Object?>({
  226. required TResult Function() initial,
  227. required TResult Function(String name, String desc, ViewType viewType)
  228. createView,
  229. required TResult Function(List<View> views) didReceiveViews,
  230. }) {
  231. return createView(name, desc, viewType);
  232. }
  233. @override
  234. @optionalTypeArgs
  235. TResult maybeWhen<TResult extends Object?>({
  236. TResult Function()? initial,
  237. TResult Function(String name, String desc, ViewType viewType)? createView,
  238. TResult Function(List<View> views)? didReceiveViews,
  239. required TResult orElse(),
  240. }) {
  241. if (createView != null) {
  242. return createView(name, desc, viewType);
  243. }
  244. return orElse();
  245. }
  246. @override
  247. @optionalTypeArgs
  248. TResult map<TResult extends Object?>({
  249. required TResult Function(Initial value) initial,
  250. required TResult Function(CreateView value) createView,
  251. required TResult Function(ReceiveViews value) didReceiveViews,
  252. }) {
  253. return createView(this);
  254. }
  255. @override
  256. @optionalTypeArgs
  257. TResult maybeMap<TResult extends Object?>({
  258. TResult Function(Initial value)? initial,
  259. TResult Function(CreateView value)? createView,
  260. TResult Function(ReceiveViews value)? didReceiveViews,
  261. required TResult orElse(),
  262. }) {
  263. if (createView != null) {
  264. return createView(this);
  265. }
  266. return orElse();
  267. }
  268. }
  269. abstract class CreateView implements AppEvent {
  270. const factory CreateView(String name, String desc, ViewType viewType) =
  271. _$CreateView;
  272. String get name => throw _privateConstructorUsedError;
  273. String get desc => throw _privateConstructorUsedError;
  274. ViewType get viewType => throw _privateConstructorUsedError;
  275. @JsonKey(ignore: true)
  276. $CreateViewCopyWith<CreateView> get copyWith =>
  277. throw _privateConstructorUsedError;
  278. }
  279. /// @nodoc
  280. abstract class $ReceiveViewsCopyWith<$Res> {
  281. factory $ReceiveViewsCopyWith(
  282. ReceiveViews value, $Res Function(ReceiveViews) then) =
  283. _$ReceiveViewsCopyWithImpl<$Res>;
  284. $Res call({List<View> views});
  285. }
  286. /// @nodoc
  287. class _$ReceiveViewsCopyWithImpl<$Res> extends _$AppEventCopyWithImpl<$Res>
  288. implements $ReceiveViewsCopyWith<$Res> {
  289. _$ReceiveViewsCopyWithImpl(
  290. ReceiveViews _value, $Res Function(ReceiveViews) _then)
  291. : super(_value, (v) => _then(v as ReceiveViews));
  292. @override
  293. ReceiveViews get _value => super._value as ReceiveViews;
  294. @override
  295. $Res call({
  296. Object? views = freezed,
  297. }) {
  298. return _then(ReceiveViews(
  299. views == freezed
  300. ? _value.views
  301. : views // ignore: cast_nullable_to_non_nullable
  302. as List<View>,
  303. ));
  304. }
  305. }
  306. /// @nodoc
  307. class _$ReceiveViews implements ReceiveViews {
  308. const _$ReceiveViews(this.views);
  309. @override
  310. final List<View> views;
  311. @override
  312. String toString() {
  313. return 'AppEvent.didReceiveViews(views: $views)';
  314. }
  315. @override
  316. bool operator ==(dynamic other) {
  317. return identical(this, other) ||
  318. (other is ReceiveViews &&
  319. (identical(other.views, views) ||
  320. const DeepCollectionEquality().equals(other.views, views)));
  321. }
  322. @override
  323. int get hashCode =>
  324. runtimeType.hashCode ^ const DeepCollectionEquality().hash(views);
  325. @JsonKey(ignore: true)
  326. @override
  327. $ReceiveViewsCopyWith<ReceiveViews> get copyWith =>
  328. _$ReceiveViewsCopyWithImpl<ReceiveViews>(this, _$identity);
  329. @override
  330. @optionalTypeArgs
  331. TResult when<TResult extends Object?>({
  332. required TResult Function() initial,
  333. required TResult Function(String name, String desc, ViewType viewType)
  334. createView,
  335. required TResult Function(List<View> views) didReceiveViews,
  336. }) {
  337. return didReceiveViews(views);
  338. }
  339. @override
  340. @optionalTypeArgs
  341. TResult maybeWhen<TResult extends Object?>({
  342. TResult Function()? initial,
  343. TResult Function(String name, String desc, ViewType viewType)? createView,
  344. TResult Function(List<View> views)? didReceiveViews,
  345. required TResult orElse(),
  346. }) {
  347. if (didReceiveViews != null) {
  348. return didReceiveViews(views);
  349. }
  350. return orElse();
  351. }
  352. @override
  353. @optionalTypeArgs
  354. TResult map<TResult extends Object?>({
  355. required TResult Function(Initial value) initial,
  356. required TResult Function(CreateView value) createView,
  357. required TResult Function(ReceiveViews value) didReceiveViews,
  358. }) {
  359. return didReceiveViews(this);
  360. }
  361. @override
  362. @optionalTypeArgs
  363. TResult maybeMap<TResult extends Object?>({
  364. TResult Function(Initial value)? initial,
  365. TResult Function(CreateView value)? createView,
  366. TResult Function(ReceiveViews value)? didReceiveViews,
  367. required TResult orElse(),
  368. }) {
  369. if (didReceiveViews != null) {
  370. return didReceiveViews(this);
  371. }
  372. return orElse();
  373. }
  374. }
  375. abstract class ReceiveViews implements AppEvent {
  376. const factory ReceiveViews(List<View> views) = _$ReceiveViews;
  377. List<View> get views => throw _privateConstructorUsedError;
  378. @JsonKey(ignore: true)
  379. $ReceiveViewsCopyWith<ReceiveViews> get copyWith =>
  380. throw _privateConstructorUsedError;
  381. }
  382. /// @nodoc
  383. class _$AppStateTearOff {
  384. const _$AppStateTearOff();
  385. _AppState call(
  386. {required bool isLoading,
  387. required List<View>? views,
  388. required Either<Unit, WorkspaceError> successOrFailure}) {
  389. return _AppState(
  390. isLoading: isLoading,
  391. views: views,
  392. successOrFailure: successOrFailure,
  393. );
  394. }
  395. }
  396. /// @nodoc
  397. const $AppState = _$AppStateTearOff();
  398. /// @nodoc
  399. mixin _$AppState {
  400. bool get isLoading => throw _privateConstructorUsedError;
  401. List<View>? get views => throw _privateConstructorUsedError;
  402. Either<Unit, WorkspaceError> get successOrFailure =>
  403. throw _privateConstructorUsedError;
  404. @JsonKey(ignore: true)
  405. $AppStateCopyWith<AppState> get copyWith =>
  406. throw _privateConstructorUsedError;
  407. }
  408. /// @nodoc
  409. abstract class $AppStateCopyWith<$Res> {
  410. factory $AppStateCopyWith(AppState value, $Res Function(AppState) then) =
  411. _$AppStateCopyWithImpl<$Res>;
  412. $Res call(
  413. {bool isLoading,
  414. List<View>? views,
  415. Either<Unit, WorkspaceError> successOrFailure});
  416. }
  417. /// @nodoc
  418. class _$AppStateCopyWithImpl<$Res> implements $AppStateCopyWith<$Res> {
  419. _$AppStateCopyWithImpl(this._value, this._then);
  420. final AppState _value;
  421. // ignore: unused_field
  422. final $Res Function(AppState) _then;
  423. @override
  424. $Res call({
  425. Object? isLoading = freezed,
  426. Object? views = freezed,
  427. Object? successOrFailure = freezed,
  428. }) {
  429. return _then(_value.copyWith(
  430. isLoading: isLoading == freezed
  431. ? _value.isLoading
  432. : isLoading // ignore: cast_nullable_to_non_nullable
  433. as bool,
  434. views: views == freezed
  435. ? _value.views
  436. : views // ignore: cast_nullable_to_non_nullable
  437. as List<View>?,
  438. successOrFailure: successOrFailure == freezed
  439. ? _value.successOrFailure
  440. : successOrFailure // ignore: cast_nullable_to_non_nullable
  441. as Either<Unit, WorkspaceError>,
  442. ));
  443. }
  444. }
  445. /// @nodoc
  446. abstract class _$AppStateCopyWith<$Res> implements $AppStateCopyWith<$Res> {
  447. factory _$AppStateCopyWith(_AppState value, $Res Function(_AppState) then) =
  448. __$AppStateCopyWithImpl<$Res>;
  449. @override
  450. $Res call(
  451. {bool isLoading,
  452. List<View>? views,
  453. Either<Unit, WorkspaceError> successOrFailure});
  454. }
  455. /// @nodoc
  456. class __$AppStateCopyWithImpl<$Res> extends _$AppStateCopyWithImpl<$Res>
  457. implements _$AppStateCopyWith<$Res> {
  458. __$AppStateCopyWithImpl(_AppState _value, $Res Function(_AppState) _then)
  459. : super(_value, (v) => _then(v as _AppState));
  460. @override
  461. _AppState get _value => super._value as _AppState;
  462. @override
  463. $Res call({
  464. Object? isLoading = freezed,
  465. Object? views = freezed,
  466. Object? successOrFailure = freezed,
  467. }) {
  468. return _then(_AppState(
  469. isLoading: isLoading == freezed
  470. ? _value.isLoading
  471. : isLoading // ignore: cast_nullable_to_non_nullable
  472. as bool,
  473. views: views == freezed
  474. ? _value.views
  475. : views // ignore: cast_nullable_to_non_nullable
  476. as List<View>?,
  477. successOrFailure: successOrFailure == freezed
  478. ? _value.successOrFailure
  479. : successOrFailure // ignore: cast_nullable_to_non_nullable
  480. as Either<Unit, WorkspaceError>,
  481. ));
  482. }
  483. }
  484. /// @nodoc
  485. class _$_AppState implements _AppState {
  486. const _$_AppState(
  487. {required this.isLoading,
  488. required this.views,
  489. required this.successOrFailure});
  490. @override
  491. final bool isLoading;
  492. @override
  493. final List<View>? views;
  494. @override
  495. final Either<Unit, WorkspaceError> successOrFailure;
  496. @override
  497. String toString() {
  498. return 'AppState(isLoading: $isLoading, views: $views, successOrFailure: $successOrFailure)';
  499. }
  500. @override
  501. bool operator ==(dynamic other) {
  502. return identical(this, other) ||
  503. (other is _AppState &&
  504. (identical(other.isLoading, isLoading) ||
  505. const DeepCollectionEquality()
  506. .equals(other.isLoading, isLoading)) &&
  507. (identical(other.views, views) ||
  508. const DeepCollectionEquality().equals(other.views, views)) &&
  509. (identical(other.successOrFailure, successOrFailure) ||
  510. const DeepCollectionEquality()
  511. .equals(other.successOrFailure, successOrFailure)));
  512. }
  513. @override
  514. int get hashCode =>
  515. runtimeType.hashCode ^
  516. const DeepCollectionEquality().hash(isLoading) ^
  517. const DeepCollectionEquality().hash(views) ^
  518. const DeepCollectionEquality().hash(successOrFailure);
  519. @JsonKey(ignore: true)
  520. @override
  521. _$AppStateCopyWith<_AppState> get copyWith =>
  522. __$AppStateCopyWithImpl<_AppState>(this, _$identity);
  523. }
  524. abstract class _AppState implements AppState {
  525. const factory _AppState(
  526. {required bool isLoading,
  527. required List<View>? views,
  528. required Either<Unit, WorkspaceError> successOrFailure}) = _$_AppState;
  529. @override
  530. bool get isLoading => throw _privateConstructorUsedError;
  531. @override
  532. List<View>? get views => throw _privateConstructorUsedError;
  533. @override
  534. Either<Unit, WorkspaceError> get successOrFailure =>
  535. throw _privateConstructorUsedError;
  536. @override
  537. @JsonKey(ignore: true)
  538. _$AppStateCopyWith<_AppState> get copyWith =>
  539. throw _privateConstructorUsedError;
  540. }