app_bloc.freezed.dart 14 KB

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