app_bloc.freezed.dart 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647
  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. View? selectedView,
  389. required Either<Unit, WorkspaceError> successOrFailure}) {
  390. return _AppState(
  391. isLoading: isLoading,
  392. views: views,
  393. selectedView: selectedView,
  394. successOrFailure: successOrFailure,
  395. );
  396. }
  397. }
  398. /// @nodoc
  399. const $AppState = _$AppStateTearOff();
  400. /// @nodoc
  401. mixin _$AppState {
  402. bool get isLoading => throw _privateConstructorUsedError;
  403. List<View>? get views => throw _privateConstructorUsedError;
  404. View? get selectedView => throw _privateConstructorUsedError;
  405. Either<Unit, WorkspaceError> get successOrFailure =>
  406. throw _privateConstructorUsedError;
  407. @JsonKey(ignore: true)
  408. $AppStateCopyWith<AppState> get copyWith =>
  409. throw _privateConstructorUsedError;
  410. }
  411. /// @nodoc
  412. abstract class $AppStateCopyWith<$Res> {
  413. factory $AppStateCopyWith(AppState value, $Res Function(AppState) then) =
  414. _$AppStateCopyWithImpl<$Res>;
  415. $Res call(
  416. {bool isLoading,
  417. List<View>? views,
  418. View? selectedView,
  419. Either<Unit, WorkspaceError> successOrFailure});
  420. }
  421. /// @nodoc
  422. class _$AppStateCopyWithImpl<$Res> implements $AppStateCopyWith<$Res> {
  423. _$AppStateCopyWithImpl(this._value, this._then);
  424. final AppState _value;
  425. // ignore: unused_field
  426. final $Res Function(AppState) _then;
  427. @override
  428. $Res call({
  429. Object? isLoading = freezed,
  430. Object? views = freezed,
  431. Object? selectedView = freezed,
  432. Object? successOrFailure = freezed,
  433. }) {
  434. return _then(_value.copyWith(
  435. isLoading: isLoading == freezed
  436. ? _value.isLoading
  437. : isLoading // ignore: cast_nullable_to_non_nullable
  438. as bool,
  439. views: views == freezed
  440. ? _value.views
  441. : views // ignore: cast_nullable_to_non_nullable
  442. as List<View>?,
  443. selectedView: selectedView == freezed
  444. ? _value.selectedView
  445. : selectedView // ignore: cast_nullable_to_non_nullable
  446. as View?,
  447. successOrFailure: successOrFailure == freezed
  448. ? _value.successOrFailure
  449. : successOrFailure // ignore: cast_nullable_to_non_nullable
  450. as Either<Unit, WorkspaceError>,
  451. ));
  452. }
  453. }
  454. /// @nodoc
  455. abstract class _$AppStateCopyWith<$Res> implements $AppStateCopyWith<$Res> {
  456. factory _$AppStateCopyWith(_AppState value, $Res Function(_AppState) then) =
  457. __$AppStateCopyWithImpl<$Res>;
  458. @override
  459. $Res call(
  460. {bool isLoading,
  461. List<View>? views,
  462. View? selectedView,
  463. Either<Unit, WorkspaceError> successOrFailure});
  464. }
  465. /// @nodoc
  466. class __$AppStateCopyWithImpl<$Res> extends _$AppStateCopyWithImpl<$Res>
  467. implements _$AppStateCopyWith<$Res> {
  468. __$AppStateCopyWithImpl(_AppState _value, $Res Function(_AppState) _then)
  469. : super(_value, (v) => _then(v as _AppState));
  470. @override
  471. _AppState get _value => super._value as _AppState;
  472. @override
  473. $Res call({
  474. Object? isLoading = freezed,
  475. Object? views = freezed,
  476. Object? selectedView = freezed,
  477. Object? successOrFailure = freezed,
  478. }) {
  479. return _then(_AppState(
  480. isLoading: isLoading == freezed
  481. ? _value.isLoading
  482. : isLoading // ignore: cast_nullable_to_non_nullable
  483. as bool,
  484. views: views == freezed
  485. ? _value.views
  486. : views // ignore: cast_nullable_to_non_nullable
  487. as List<View>?,
  488. selectedView: selectedView == freezed
  489. ? _value.selectedView
  490. : selectedView // ignore: cast_nullable_to_non_nullable
  491. as View?,
  492. successOrFailure: successOrFailure == freezed
  493. ? _value.successOrFailure
  494. : successOrFailure // ignore: cast_nullable_to_non_nullable
  495. as Either<Unit, WorkspaceError>,
  496. ));
  497. }
  498. }
  499. /// @nodoc
  500. class _$_AppState implements _AppState {
  501. const _$_AppState(
  502. {required this.isLoading,
  503. required this.views,
  504. this.selectedView,
  505. required this.successOrFailure});
  506. @override
  507. final bool isLoading;
  508. @override
  509. final List<View>? views;
  510. @override
  511. final View? selectedView;
  512. @override
  513. final Either<Unit, WorkspaceError> successOrFailure;
  514. @override
  515. String toString() {
  516. return 'AppState(isLoading: $isLoading, views: $views, selectedView: $selectedView, successOrFailure: $successOrFailure)';
  517. }
  518. @override
  519. bool operator ==(dynamic other) {
  520. return identical(this, other) ||
  521. (other is _AppState &&
  522. (identical(other.isLoading, isLoading) ||
  523. const DeepCollectionEquality()
  524. .equals(other.isLoading, isLoading)) &&
  525. (identical(other.views, views) ||
  526. const DeepCollectionEquality().equals(other.views, views)) &&
  527. (identical(other.selectedView, selectedView) ||
  528. const DeepCollectionEquality()
  529. .equals(other.selectedView, selectedView)) &&
  530. (identical(other.successOrFailure, successOrFailure) ||
  531. const DeepCollectionEquality()
  532. .equals(other.successOrFailure, successOrFailure)));
  533. }
  534. @override
  535. int get hashCode =>
  536. runtimeType.hashCode ^
  537. const DeepCollectionEquality().hash(isLoading) ^
  538. const DeepCollectionEquality().hash(views) ^
  539. const DeepCollectionEquality().hash(selectedView) ^
  540. const DeepCollectionEquality().hash(successOrFailure);
  541. @JsonKey(ignore: true)
  542. @override
  543. _$AppStateCopyWith<_AppState> get copyWith =>
  544. __$AppStateCopyWithImpl<_AppState>(this, _$identity);
  545. }
  546. abstract class _AppState implements AppState {
  547. const factory _AppState(
  548. {required bool isLoading,
  549. required List<View>? views,
  550. View? selectedView,
  551. required Either<Unit, WorkspaceError> successOrFailure}) = _$_AppState;
  552. @override
  553. bool get isLoading => throw _privateConstructorUsedError;
  554. @override
  555. List<View>? get views => throw _privateConstructorUsedError;
  556. @override
  557. View? get selectedView => throw _privateConstructorUsedError;
  558. @override
  559. Either<Unit, WorkspaceError> get successOrFailure =>
  560. throw _privateConstructorUsedError;
  561. @override
  562. @JsonKey(ignore: true)
  563. _$AppStateCopyWith<_AppState> get copyWith =>
  564. throw _privateConstructorUsedError;
  565. }