You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1465 lines
48 KiB

2 years ago
  1. // coverage:ignore-file
  2. // GENERATED CODE - DO NOT MODIFY BY HAND
  3. // ignore_for_file: type=lint
  4. // 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
  5. part of 'puzzle_state.dart';
  6. // **************************************************************************
  7. // FreezedGenerator
  8. // **************************************************************************
  9. T _$identity<T>(T value) => value;
  10. final _privateConstructorUsedError = UnsupportedError(
  11. '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');
  12. /// @nodoc
  13. class _$PuzzleStateTearOff {
  14. const _$PuzzleStateTearOff();
  15. PuzzleIdle call() {
  16. return const PuzzleIdle();
  17. }
  18. PuzzleInitializing initializing() {
  19. return const PuzzleInitializing();
  20. }
  21. PuzzleScrambling scrambling(PuzzleData puzzleData) {
  22. return PuzzleScrambling(
  23. puzzleData,
  24. );
  25. }
  26. PuzzleCurrent current(PuzzleData puzzleData) {
  27. return PuzzleCurrent(
  28. puzzleData,
  29. );
  30. }
  31. PuzzleComputingSolution computingSolution(PuzzleData puzzleData) {
  32. return PuzzleComputingSolution(
  33. puzzleData,
  34. );
  35. }
  36. PuzzleAutoSolving autoSolving(PuzzleData puzzleData) {
  37. return PuzzleAutoSolving(
  38. puzzleData,
  39. );
  40. }
  41. PuzzleSolved solved(PuzzleData puzzleData) {
  42. return PuzzleSolved(
  43. puzzleData,
  44. );
  45. }
  46. PuzzleError error({String? message}) {
  47. return PuzzleError(
  48. message: message,
  49. );
  50. }
  51. }
  52. /// @nodoc
  53. const $PuzzleState = _$PuzzleStateTearOff();
  54. /// @nodoc
  55. mixin _$PuzzleState {
  56. @optionalTypeArgs
  57. TResult when<TResult extends Object?>(
  58. TResult Function() $default, {
  59. required TResult Function() initializing,
  60. required TResult Function(PuzzleData puzzleData) scrambling,
  61. required TResult Function(PuzzleData puzzleData) current,
  62. required TResult Function(PuzzleData puzzleData) computingSolution,
  63. required TResult Function(PuzzleData puzzleData) autoSolving,
  64. required TResult Function(PuzzleData puzzleData) solved,
  65. required TResult Function(String? message) error,
  66. }) =>
  67. throw _privateConstructorUsedError;
  68. @optionalTypeArgs
  69. TResult? whenOrNull<TResult extends Object?>(
  70. TResult Function()? $default, {
  71. TResult Function()? initializing,
  72. TResult Function(PuzzleData puzzleData)? scrambling,
  73. TResult Function(PuzzleData puzzleData)? current,
  74. TResult Function(PuzzleData puzzleData)? computingSolution,
  75. TResult Function(PuzzleData puzzleData)? autoSolving,
  76. TResult Function(PuzzleData puzzleData)? solved,
  77. TResult Function(String? message)? error,
  78. }) =>
  79. throw _privateConstructorUsedError;
  80. @optionalTypeArgs
  81. TResult maybeWhen<TResult extends Object?>(
  82. TResult Function()? $default, {
  83. TResult Function()? initializing,
  84. TResult Function(PuzzleData puzzleData)? scrambling,
  85. TResult Function(PuzzleData puzzleData)? current,
  86. TResult Function(PuzzleData puzzleData)? computingSolution,
  87. TResult Function(PuzzleData puzzleData)? autoSolving,
  88. TResult Function(PuzzleData puzzleData)? solved,
  89. TResult Function(String? message)? error,
  90. required TResult orElse(),
  91. }) =>
  92. throw _privateConstructorUsedError;
  93. @optionalTypeArgs
  94. TResult map<TResult extends Object?>(
  95. TResult Function(PuzzleIdle value) $default, {
  96. required TResult Function(PuzzleInitializing value) initializing,
  97. required TResult Function(PuzzleScrambling value) scrambling,
  98. required TResult Function(PuzzleCurrent value) current,
  99. required TResult Function(PuzzleComputingSolution value) computingSolution,
  100. required TResult Function(PuzzleAutoSolving value) autoSolving,
  101. required TResult Function(PuzzleSolved value) solved,
  102. required TResult Function(PuzzleError value) error,
  103. }) =>
  104. throw _privateConstructorUsedError;
  105. @optionalTypeArgs
  106. TResult? mapOrNull<TResult extends Object?>(
  107. TResult Function(PuzzleIdle value)? $default, {
  108. TResult Function(PuzzleInitializing value)? initializing,
  109. TResult Function(PuzzleScrambling value)? scrambling,
  110. TResult Function(PuzzleCurrent value)? current,
  111. TResult Function(PuzzleComputingSolution value)? computingSolution,
  112. TResult Function(PuzzleAutoSolving value)? autoSolving,
  113. TResult Function(PuzzleSolved value)? solved,
  114. TResult Function(PuzzleError value)? error,
  115. }) =>
  116. throw _privateConstructorUsedError;
  117. @optionalTypeArgs
  118. TResult maybeMap<TResult extends Object?>(
  119. TResult Function(PuzzleIdle value)? $default, {
  120. TResult Function(PuzzleInitializing value)? initializing,
  121. TResult Function(PuzzleScrambling value)? scrambling,
  122. TResult Function(PuzzleCurrent value)? current,
  123. TResult Function(PuzzleComputingSolution value)? computingSolution,
  124. TResult Function(PuzzleAutoSolving value)? autoSolving,
  125. TResult Function(PuzzleSolved value)? solved,
  126. TResult Function(PuzzleError value)? error,
  127. required TResult orElse(),
  128. }) =>
  129. throw _privateConstructorUsedError;
  130. }
  131. /// @nodoc
  132. abstract class $PuzzleStateCopyWith<$Res> {
  133. factory $PuzzleStateCopyWith(
  134. PuzzleState value, $Res Function(PuzzleState) then) =
  135. _$PuzzleStateCopyWithImpl<$Res>;
  136. }
  137. /// @nodoc
  138. class _$PuzzleStateCopyWithImpl<$Res> implements $PuzzleStateCopyWith<$Res> {
  139. _$PuzzleStateCopyWithImpl(this._value, this._then);
  140. final PuzzleState _value;
  141. // ignore: unused_field
  142. final $Res Function(PuzzleState) _then;
  143. }
  144. /// @nodoc
  145. abstract class $PuzzleIdleCopyWith<$Res> {
  146. factory $PuzzleIdleCopyWith(
  147. PuzzleIdle value, $Res Function(PuzzleIdle) then) =
  148. _$PuzzleIdleCopyWithImpl<$Res>;
  149. }
  150. /// @nodoc
  151. class _$PuzzleIdleCopyWithImpl<$Res> extends _$PuzzleStateCopyWithImpl<$Res>
  152. implements $PuzzleIdleCopyWith<$Res> {
  153. _$PuzzleIdleCopyWithImpl(PuzzleIdle _value, $Res Function(PuzzleIdle) _then)
  154. : super(_value, (v) => _then(v as PuzzleIdle));
  155. @override
  156. PuzzleIdle get _value => super._value as PuzzleIdle;
  157. }
  158. /// @nodoc
  159. class _$PuzzleIdle implements PuzzleIdle {
  160. const _$PuzzleIdle();
  161. @override
  162. String toString() {
  163. return 'PuzzleState()';
  164. }
  165. @override
  166. bool operator ==(dynamic other) {
  167. return identical(this, other) ||
  168. (other.runtimeType == runtimeType && other is PuzzleIdle);
  169. }
  170. @override
  171. int get hashCode => runtimeType.hashCode;
  172. @override
  173. @optionalTypeArgs
  174. TResult when<TResult extends Object?>(
  175. TResult Function() $default, {
  176. required TResult Function() initializing,
  177. required TResult Function(PuzzleData puzzleData) scrambling,
  178. required TResult Function(PuzzleData puzzleData) current,
  179. required TResult Function(PuzzleData puzzleData) computingSolution,
  180. required TResult Function(PuzzleData puzzleData) autoSolving,
  181. required TResult Function(PuzzleData puzzleData) solved,
  182. required TResult Function(String? message) error,
  183. }) {
  184. return $default();
  185. }
  186. @override
  187. @optionalTypeArgs
  188. TResult? whenOrNull<TResult extends Object?>(
  189. TResult Function()? $default, {
  190. TResult Function()? initializing,
  191. TResult Function(PuzzleData puzzleData)? scrambling,
  192. TResult Function(PuzzleData puzzleData)? current,
  193. TResult Function(PuzzleData puzzleData)? computingSolution,
  194. TResult Function(PuzzleData puzzleData)? autoSolving,
  195. TResult Function(PuzzleData puzzleData)? solved,
  196. TResult Function(String? message)? error,
  197. }) {
  198. return $default?.call();
  199. }
  200. @override
  201. @optionalTypeArgs
  202. TResult maybeWhen<TResult extends Object?>(
  203. TResult Function()? $default, {
  204. TResult Function()? initializing,
  205. TResult Function(PuzzleData puzzleData)? scrambling,
  206. TResult Function(PuzzleData puzzleData)? current,
  207. TResult Function(PuzzleData puzzleData)? computingSolution,
  208. TResult Function(PuzzleData puzzleData)? autoSolving,
  209. TResult Function(PuzzleData puzzleData)? solved,
  210. TResult Function(String? message)? error,
  211. required TResult orElse(),
  212. }) {
  213. if ($default != null) {
  214. return $default();
  215. }
  216. return orElse();
  217. }
  218. @override
  219. @optionalTypeArgs
  220. TResult map<TResult extends Object?>(
  221. TResult Function(PuzzleIdle value) $default, {
  222. required TResult Function(PuzzleInitializing value) initializing,
  223. required TResult Function(PuzzleScrambling value) scrambling,
  224. required TResult Function(PuzzleCurrent value) current,
  225. required TResult Function(PuzzleComputingSolution value) computingSolution,
  226. required TResult Function(PuzzleAutoSolving value) autoSolving,
  227. required TResult Function(PuzzleSolved value) solved,
  228. required TResult Function(PuzzleError value) error,
  229. }) {
  230. return $default(this);
  231. }
  232. @override
  233. @optionalTypeArgs
  234. TResult? mapOrNull<TResult extends Object?>(
  235. TResult Function(PuzzleIdle value)? $default, {
  236. TResult Function(PuzzleInitializing value)? initializing,
  237. TResult Function(PuzzleScrambling value)? scrambling,
  238. TResult Function(PuzzleCurrent value)? current,
  239. TResult Function(PuzzleComputingSolution value)? computingSolution,
  240. TResult Function(PuzzleAutoSolving value)? autoSolving,
  241. TResult Function(PuzzleSolved value)? solved,
  242. TResult Function(PuzzleError value)? error,
  243. }) {
  244. return $default?.call(this);
  245. }
  246. @override
  247. @optionalTypeArgs
  248. TResult maybeMap<TResult extends Object?>(
  249. TResult Function(PuzzleIdle value)? $default, {
  250. TResult Function(PuzzleInitializing value)? initializing,
  251. TResult Function(PuzzleScrambling value)? scrambling,
  252. TResult Function(PuzzleCurrent value)? current,
  253. TResult Function(PuzzleComputingSolution value)? computingSolution,
  254. TResult Function(PuzzleAutoSolving value)? autoSolving,
  255. TResult Function(PuzzleSolved value)? solved,
  256. TResult Function(PuzzleError value)? error,
  257. required TResult orElse(),
  258. }) {
  259. if ($default != null) {
  260. return $default(this);
  261. }
  262. return orElse();
  263. }
  264. }
  265. abstract class PuzzleIdle implements PuzzleState {
  266. const factory PuzzleIdle() = _$PuzzleIdle;
  267. }
  268. /// @nodoc
  269. abstract class $PuzzleInitializingCopyWith<$Res> {
  270. factory $PuzzleInitializingCopyWith(
  271. PuzzleInitializing value, $Res Function(PuzzleInitializing) then) =
  272. _$PuzzleInitializingCopyWithImpl<$Res>;
  273. }
  274. /// @nodoc
  275. class _$PuzzleInitializingCopyWithImpl<$Res>
  276. extends _$PuzzleStateCopyWithImpl<$Res>
  277. implements $PuzzleInitializingCopyWith<$Res> {
  278. _$PuzzleInitializingCopyWithImpl(
  279. PuzzleInitializing _value, $Res Function(PuzzleInitializing) _then)
  280. : super(_value, (v) => _then(v as PuzzleInitializing));
  281. @override
  282. PuzzleInitializing get _value => super._value as PuzzleInitializing;
  283. }
  284. /// @nodoc
  285. class _$PuzzleInitializing implements PuzzleInitializing {
  286. const _$PuzzleInitializing();
  287. @override
  288. String toString() {
  289. return 'PuzzleState.initializing()';
  290. }
  291. @override
  292. bool operator ==(dynamic other) {
  293. return identical(this, other) ||
  294. (other.runtimeType == runtimeType && other is PuzzleInitializing);
  295. }
  296. @override
  297. int get hashCode => runtimeType.hashCode;
  298. @override
  299. @optionalTypeArgs
  300. TResult when<TResult extends Object?>(
  301. TResult Function() $default, {
  302. required TResult Function() initializing,
  303. required TResult Function(PuzzleData puzzleData) scrambling,
  304. required TResult Function(PuzzleData puzzleData) current,
  305. required TResult Function(PuzzleData puzzleData) computingSolution,
  306. required TResult Function(PuzzleData puzzleData) autoSolving,
  307. required TResult Function(PuzzleData puzzleData) solved,
  308. required TResult Function(String? message) error,
  309. }) {
  310. return initializing();
  311. }
  312. @override
  313. @optionalTypeArgs
  314. TResult? whenOrNull<TResult extends Object?>(
  315. TResult Function()? $default, {
  316. TResult Function()? initializing,
  317. TResult Function(PuzzleData puzzleData)? scrambling,
  318. TResult Function(PuzzleData puzzleData)? current,
  319. TResult Function(PuzzleData puzzleData)? computingSolution,
  320. TResult Function(PuzzleData puzzleData)? autoSolving,
  321. TResult Function(PuzzleData puzzleData)? solved,
  322. TResult Function(String? message)? error,
  323. }) {
  324. return initializing?.call();
  325. }
  326. @override
  327. @optionalTypeArgs
  328. TResult maybeWhen<TResult extends Object?>(
  329. TResult Function()? $default, {
  330. TResult Function()? initializing,
  331. TResult Function(PuzzleData puzzleData)? scrambling,
  332. TResult Function(PuzzleData puzzleData)? current,
  333. TResult Function(PuzzleData puzzleData)? computingSolution,
  334. TResult Function(PuzzleData puzzleData)? autoSolving,
  335. TResult Function(PuzzleData puzzleData)? solved,
  336. TResult Function(String? message)? error,
  337. required TResult orElse(),
  338. }) {
  339. if (initializing != null) {
  340. return initializing();
  341. }
  342. return orElse();
  343. }
  344. @override
  345. @optionalTypeArgs
  346. TResult map<TResult extends Object?>(
  347. TResult Function(PuzzleIdle value) $default, {
  348. required TResult Function(PuzzleInitializing value) initializing,
  349. required TResult Function(PuzzleScrambling value) scrambling,
  350. required TResult Function(PuzzleCurrent value) current,
  351. required TResult Function(PuzzleComputingSolution value) computingSolution,
  352. required TResult Function(PuzzleAutoSolving value) autoSolving,
  353. required TResult Function(PuzzleSolved value) solved,
  354. required TResult Function(PuzzleError value) error,
  355. }) {
  356. return initializing(this);
  357. }
  358. @override
  359. @optionalTypeArgs
  360. TResult? mapOrNull<TResult extends Object?>(
  361. TResult Function(PuzzleIdle value)? $default, {
  362. TResult Function(PuzzleInitializing value)? initializing,
  363. TResult Function(PuzzleScrambling value)? scrambling,
  364. TResult Function(PuzzleCurrent value)? current,
  365. TResult Function(PuzzleComputingSolution value)? computingSolution,
  366. TResult Function(PuzzleAutoSolving value)? autoSolving,
  367. TResult Function(PuzzleSolved value)? solved,
  368. TResult Function(PuzzleError value)? error,
  369. }) {
  370. return initializing?.call(this);
  371. }
  372. @override
  373. @optionalTypeArgs
  374. TResult maybeMap<TResult extends Object?>(
  375. TResult Function(PuzzleIdle value)? $default, {
  376. TResult Function(PuzzleInitializing value)? initializing,
  377. TResult Function(PuzzleScrambling value)? scrambling,
  378. TResult Function(PuzzleCurrent value)? current,
  379. TResult Function(PuzzleComputingSolution value)? computingSolution,
  380. TResult Function(PuzzleAutoSolving value)? autoSolving,
  381. TResult Function(PuzzleSolved value)? solved,
  382. TResult Function(PuzzleError value)? error,
  383. required TResult orElse(),
  384. }) {
  385. if (initializing != null) {
  386. return initializing(this);
  387. }
  388. return orElse();
  389. }
  390. }
  391. abstract class PuzzleInitializing implements PuzzleState {
  392. const factory PuzzleInitializing() = _$PuzzleInitializing;
  393. }
  394. /// @nodoc
  395. abstract class $PuzzleScramblingCopyWith<$Res> {
  396. factory $PuzzleScramblingCopyWith(
  397. PuzzleScrambling value, $Res Function(PuzzleScrambling) then) =
  398. _$PuzzleScramblingCopyWithImpl<$Res>;
  399. $Res call({PuzzleData puzzleData});
  400. }
  401. /// @nodoc
  402. class _$PuzzleScramblingCopyWithImpl<$Res>
  403. extends _$PuzzleStateCopyWithImpl<$Res>
  404. implements $PuzzleScramblingCopyWith<$Res> {
  405. _$PuzzleScramblingCopyWithImpl(
  406. PuzzleScrambling _value, $Res Function(PuzzleScrambling) _then)
  407. : super(_value, (v) => _then(v as PuzzleScrambling));
  408. @override
  409. PuzzleScrambling get _value => super._value as PuzzleScrambling;
  410. @override
  411. $Res call({
  412. Object? puzzleData = freezed,
  413. }) {
  414. return _then(PuzzleScrambling(
  415. puzzleData == freezed
  416. ? _value.puzzleData
  417. : puzzleData // ignore: cast_nullable_to_non_nullable
  418. as PuzzleData,
  419. ));
  420. }
  421. }
  422. /// @nodoc
  423. class _$PuzzleScrambling implements PuzzleScrambling {
  424. const _$PuzzleScrambling(this.puzzleData);
  425. @override
  426. final PuzzleData puzzleData;
  427. @override
  428. String toString() {
  429. return 'PuzzleState.scrambling(puzzleData: $puzzleData)';
  430. }
  431. @override
  432. bool operator ==(dynamic other) {
  433. return identical(this, other) ||
  434. (other.runtimeType == runtimeType &&
  435. other is PuzzleScrambling &&
  436. const DeepCollectionEquality()
  437. .equals(other.puzzleData, puzzleData));
  438. }
  439. @override
  440. int get hashCode =>
  441. Object.hash(runtimeType, const DeepCollectionEquality().hash(puzzleData));
  442. @JsonKey(ignore: true)
  443. @override
  444. $PuzzleScramblingCopyWith<PuzzleScrambling> get copyWith =>
  445. _$PuzzleScramblingCopyWithImpl<PuzzleScrambling>(this, _$identity);
  446. @override
  447. @optionalTypeArgs
  448. TResult when<TResult extends Object?>(
  449. TResult Function() $default, {
  450. required TResult Function() initializing,
  451. required TResult Function(PuzzleData puzzleData) scrambling,
  452. required TResult Function(PuzzleData puzzleData) current,
  453. required TResult Function(PuzzleData puzzleData) computingSolution,
  454. required TResult Function(PuzzleData puzzleData) autoSolving,
  455. required TResult Function(PuzzleData puzzleData) solved,
  456. required TResult Function(String? message) error,
  457. }) {
  458. return scrambling(puzzleData);
  459. }
  460. @override
  461. @optionalTypeArgs
  462. TResult? whenOrNull<TResult extends Object?>(
  463. TResult Function()? $default, {
  464. TResult Function()? initializing,
  465. TResult Function(PuzzleData puzzleData)? scrambling,
  466. TResult Function(PuzzleData puzzleData)? current,
  467. TResult Function(PuzzleData puzzleData)? computingSolution,
  468. TResult Function(PuzzleData puzzleData)? autoSolving,
  469. TResult Function(PuzzleData puzzleData)? solved,
  470. TResult Function(String? message)? error,
  471. }) {
  472. return scrambling?.call(puzzleData);
  473. }
  474. @override
  475. @optionalTypeArgs
  476. TResult maybeWhen<TResult extends Object?>(
  477. TResult Function()? $default, {
  478. TResult Function()? initializing,
  479. TResult Function(PuzzleData puzzleData)? scrambling,
  480. TResult Function(PuzzleData puzzleData)? current,
  481. TResult Function(PuzzleData puzzleData)? computingSolution,
  482. TResult Function(PuzzleData puzzleData)? autoSolving,
  483. TResult Function(PuzzleData puzzleData)? solved,
  484. TResult Function(String? message)? error,
  485. required TResult orElse(),
  486. }) {
  487. if (scrambling != null) {
  488. return scrambling(puzzleData);
  489. }
  490. return orElse();
  491. }
  492. @override
  493. @optionalTypeArgs
  494. TResult map<TResult extends Object?>(
  495. TResult Function(PuzzleIdle value) $default, {
  496. required TResult Function(PuzzleInitializing value) initializing,
  497. required TResult Function(PuzzleScrambling value) scrambling,
  498. required TResult Function(PuzzleCurrent value) current,
  499. required TResult Function(PuzzleComputingSolution value) computingSolution,
  500. required TResult Function(PuzzleAutoSolving value) autoSolving,
  501. required TResult Function(PuzzleSolved value) solved,
  502. required TResult Function(PuzzleError value) error,
  503. }) {
  504. return scrambling(this);
  505. }
  506. @override
  507. @optionalTypeArgs
  508. TResult? mapOrNull<TResult extends Object?>(
  509. TResult Function(PuzzleIdle value)? $default, {
  510. TResult Function(PuzzleInitializing value)? initializing,
  511. TResult Function(PuzzleScrambling value)? scrambling,
  512. TResult Function(PuzzleCurrent value)? current,
  513. TResult Function(PuzzleComputingSolution value)? computingSolution,
  514. TResult Function(PuzzleAutoSolving value)? autoSolving,
  515. TResult Function(PuzzleSolved value)? solved,
  516. TResult Function(PuzzleError value)? error,
  517. }) {
  518. return scrambling?.call(this);
  519. }
  520. @override
  521. @optionalTypeArgs
  522. TResult maybeMap<TResult extends Object?>(
  523. TResult Function(PuzzleIdle value)? $default, {
  524. TResult Function(PuzzleInitializing value)? initializing,
  525. TResult Function(PuzzleScrambling value)? scrambling,
  526. TResult Function(PuzzleCurrent value)? current,
  527. TResult Function(PuzzleComputingSolution value)? computingSolution,
  528. TResult Function(PuzzleAutoSolving value)? autoSolving,
  529. TResult Function(PuzzleSolved value)? solved,
  530. TResult Function(PuzzleError value)? error,
  531. required TResult orElse(),
  532. }) {
  533. if (scrambling != null) {
  534. return scrambling(this);
  535. }
  536. return orElse();
  537. }
  538. }
  539. abstract class PuzzleScrambling implements PuzzleState {
  540. const factory PuzzleScrambling(PuzzleData puzzleData) = _$PuzzleScrambling;
  541. PuzzleData get puzzleData;
  542. @JsonKey(ignore: true)
  543. $PuzzleScramblingCopyWith<PuzzleScrambling> get copyWith =>
  544. throw _privateConstructorUsedError;
  545. }
  546. /// @nodoc
  547. abstract class $PuzzleCurrentCopyWith<$Res> {
  548. factory $PuzzleCurrentCopyWith(
  549. PuzzleCurrent value, $Res Function(PuzzleCurrent) then) =
  550. _$PuzzleCurrentCopyWithImpl<$Res>;
  551. $Res call({PuzzleData puzzleData});
  552. }
  553. /// @nodoc
  554. class _$PuzzleCurrentCopyWithImpl<$Res> extends _$PuzzleStateCopyWithImpl<$Res>
  555. implements $PuzzleCurrentCopyWith<$Res> {
  556. _$PuzzleCurrentCopyWithImpl(
  557. PuzzleCurrent _value, $Res Function(PuzzleCurrent) _then)
  558. : super(_value, (v) => _then(v as PuzzleCurrent));
  559. @override
  560. PuzzleCurrent get _value => super._value as PuzzleCurrent;
  561. @override
  562. $Res call({
  563. Object? puzzleData = freezed,
  564. }) {
  565. return _then(PuzzleCurrent(
  566. puzzleData == freezed
  567. ? _value.puzzleData
  568. : puzzleData // ignore: cast_nullable_to_non_nullable
  569. as PuzzleData,
  570. ));
  571. }
  572. }
  573. /// @nodoc
  574. class _$PuzzleCurrent implements PuzzleCurrent {
  575. const _$PuzzleCurrent(this.puzzleData);
  576. @override
  577. final PuzzleData puzzleData;
  578. @override
  579. String toString() {
  580. return 'PuzzleState.current(puzzleData: $puzzleData)';
  581. }
  582. @override
  583. bool operator ==(dynamic other) {
  584. return identical(this, other) ||
  585. (other.runtimeType == runtimeType &&
  586. other is PuzzleCurrent &&
  587. const DeepCollectionEquality()
  588. .equals(other.puzzleData, puzzleData));
  589. }
  590. @override
  591. int get hashCode =>
  592. Object.hash(runtimeType, const DeepCollectionEquality().hash(puzzleData));
  593. @JsonKey(ignore: true)
  594. @override
  595. $PuzzleCurrentCopyWith<PuzzleCurrent> get copyWith =>
  596. _$PuzzleCurrentCopyWithImpl<PuzzleCurrent>(this, _$identity);
  597. @override
  598. @optionalTypeArgs
  599. TResult when<TResult extends Object?>(
  600. TResult Function() $default, {
  601. required TResult Function() initializing,
  602. required TResult Function(PuzzleData puzzleData) scrambling,
  603. required TResult Function(PuzzleData puzzleData) current,
  604. required TResult Function(PuzzleData puzzleData) computingSolution,
  605. required TResult Function(PuzzleData puzzleData) autoSolving,
  606. required TResult Function(PuzzleData puzzleData) solved,
  607. required TResult Function(String? message) error,
  608. }) {
  609. return current(puzzleData);
  610. }
  611. @override
  612. @optionalTypeArgs
  613. TResult? whenOrNull<TResult extends Object?>(
  614. TResult Function()? $default, {
  615. TResult Function()? initializing,
  616. TResult Function(PuzzleData puzzleData)? scrambling,
  617. TResult Function(PuzzleData puzzleData)? current,
  618. TResult Function(PuzzleData puzzleData)? computingSolution,
  619. TResult Function(PuzzleData puzzleData)? autoSolving,
  620. TResult Function(PuzzleData puzzleData)? solved,
  621. TResult Function(String? message)? error,
  622. }) {
  623. return current?.call(puzzleData);
  624. }
  625. @override
  626. @optionalTypeArgs
  627. TResult maybeWhen<TResult extends Object?>(
  628. TResult Function()? $default, {
  629. TResult Function()? initializing,
  630. TResult Function(PuzzleData puzzleData)? scrambling,
  631. TResult Function(PuzzleData puzzleData)? current,
  632. TResult Function(PuzzleData puzzleData)? computingSolution,
  633. TResult Function(PuzzleData puzzleData)? autoSolving,
  634. TResult Function(PuzzleData puzzleData)? solved,
  635. TResult Function(String? message)? error,
  636. required TResult orElse(),
  637. }) {
  638. if (current != null) {
  639. return current(puzzleData);
  640. }
  641. return orElse();
  642. }
  643. @override
  644. @optionalTypeArgs
  645. TResult map<TResult extends Object?>(
  646. TResult Function(PuzzleIdle value) $default, {
  647. required TResult Function(PuzzleInitializing value) initializing,
  648. required TResult Function(PuzzleScrambling value) scrambling,
  649. required TResult Function(PuzzleCurrent value) current,
  650. required TResult Function(PuzzleComputingSolution value) computingSolution,
  651. required TResult Function(PuzzleAutoSolving value) autoSolving,
  652. required TResult Function(PuzzleSolved value) solved,
  653. required TResult Function(PuzzleError value) error,
  654. }) {
  655. return current(this);
  656. }
  657. @override
  658. @optionalTypeArgs
  659. TResult? mapOrNull<TResult extends Object?>(
  660. TResult Function(PuzzleIdle value)? $default, {
  661. TResult Function(PuzzleInitializing value)? initializing,
  662. TResult Function(PuzzleScrambling value)? scrambling,
  663. TResult Function(PuzzleCurrent value)? current,
  664. TResult Function(PuzzleComputingSolution value)? computingSolution,
  665. TResult Function(PuzzleAutoSolving value)? autoSolving,
  666. TResult Function(PuzzleSolved value)? solved,
  667. TResult Function(PuzzleError value)? error,
  668. }) {
  669. return current?.call(this);
  670. }
  671. @override
  672. @optionalTypeArgs
  673. TResult maybeMap<TResult extends Object?>(
  674. TResult Function(PuzzleIdle value)? $default, {
  675. TResult Function(PuzzleInitializing value)? initializing,
  676. TResult Function(PuzzleScrambling value)? scrambling,
  677. TResult Function(PuzzleCurrent value)? current,
  678. TResult Function(PuzzleComputingSolution value)? computingSolution,
  679. TResult Function(PuzzleAutoSolving value)? autoSolving,
  680. TResult Function(PuzzleSolved value)? solved,
  681. TResult Function(PuzzleError value)? error,
  682. required TResult orElse(),
  683. }) {
  684. if (current != null) {
  685. return current(this);
  686. }
  687. return orElse();
  688. }
  689. }
  690. abstract class PuzzleCurrent implements PuzzleState {
  691. const factory PuzzleCurrent(PuzzleData puzzleData) = _$PuzzleCurrent;
  692. PuzzleData get puzzleData;
  693. @JsonKey(ignore: true)
  694. $PuzzleCurrentCopyWith<PuzzleCurrent> get copyWith =>
  695. throw _privateConstructorUsedError;
  696. }
  697. /// @nodoc
  698. abstract class $PuzzleComputingSolutionCopyWith<$Res> {
  699. factory $PuzzleComputingSolutionCopyWith(PuzzleComputingSolution value,
  700. $Res Function(PuzzleComputingSolution) then) =
  701. _$PuzzleComputingSolutionCopyWithImpl<$Res>;
  702. $Res call({PuzzleData puzzleData});
  703. }
  704. /// @nodoc
  705. class _$PuzzleComputingSolutionCopyWithImpl<$Res>
  706. extends _$PuzzleStateCopyWithImpl<$Res>
  707. implements $PuzzleComputingSolutionCopyWith<$Res> {
  708. _$PuzzleComputingSolutionCopyWithImpl(PuzzleComputingSolution _value,
  709. $Res Function(PuzzleComputingSolution) _then)
  710. : super(_value, (v) => _then(v as PuzzleComputingSolution));
  711. @override
  712. PuzzleComputingSolution get _value => super._value as PuzzleComputingSolution;
  713. @override
  714. $Res call({
  715. Object? puzzleData = freezed,
  716. }) {
  717. return _then(PuzzleComputingSolution(
  718. puzzleData == freezed
  719. ? _value.puzzleData
  720. : puzzleData // ignore: cast_nullable_to_non_nullable
  721. as PuzzleData,
  722. ));
  723. }
  724. }
  725. /// @nodoc
  726. class _$PuzzleComputingSolution implements PuzzleComputingSolution {
  727. const _$PuzzleComputingSolution(this.puzzleData);
  728. @override
  729. final PuzzleData puzzleData;
  730. @override
  731. String toString() {
  732. return 'PuzzleState.computingSolution(puzzleData: $puzzleData)';
  733. }
  734. @override
  735. bool operator ==(dynamic other) {
  736. return identical(this, other) ||
  737. (other.runtimeType == runtimeType &&
  738. other is PuzzleComputingSolution &&
  739. const DeepCollectionEquality()
  740. .equals(other.puzzleData, puzzleData));
  741. }
  742. @override
  743. int get hashCode =>
  744. Object.hash(runtimeType, const DeepCollectionEquality().hash(puzzleData));
  745. @JsonKey(ignore: true)
  746. @override
  747. $PuzzleComputingSolutionCopyWith<PuzzleComputingSolution> get copyWith =>
  748. _$PuzzleComputingSolutionCopyWithImpl<PuzzleComputingSolution>(
  749. this, _$identity);
  750. @override
  751. @optionalTypeArgs
  752. TResult when<TResult extends Object?>(
  753. TResult Function() $default, {
  754. required TResult Function() initializing,
  755. required TResult Function(PuzzleData puzzleData) scrambling,
  756. required TResult Function(PuzzleData puzzleData) current,
  757. required TResult Function(PuzzleData puzzleData) computingSolution,
  758. required TResult Function(PuzzleData puzzleData) autoSolving,
  759. required TResult Function(PuzzleData puzzleData) solved,
  760. required TResult Function(String? message) error,
  761. }) {
  762. return computingSolution(puzzleData);
  763. }
  764. @override
  765. @optionalTypeArgs
  766. TResult? whenOrNull<TResult extends Object?>(
  767. TResult Function()? $default, {
  768. TResult Function()? initializing,
  769. TResult Function(PuzzleData puzzleData)? scrambling,
  770. TResult Function(PuzzleData puzzleData)? current,
  771. TResult Function(PuzzleData puzzleData)? computingSolution,
  772. TResult Function(PuzzleData puzzleData)? autoSolving,
  773. TResult Function(PuzzleData puzzleData)? solved,
  774. TResult Function(String? message)? error,
  775. }) {
  776. return computingSolution?.call(puzzleData);
  777. }
  778. @override
  779. @optionalTypeArgs
  780. TResult maybeWhen<TResult extends Object?>(
  781. TResult Function()? $default, {
  782. TResult Function()? initializing,
  783. TResult Function(PuzzleData puzzleData)? scrambling,
  784. TResult Function(PuzzleData puzzleData)? current,
  785. TResult Function(PuzzleData puzzleData)? computingSolution,
  786. TResult Function(PuzzleData puzzleData)? autoSolving,
  787. TResult Function(PuzzleData puzzleData)? solved,
  788. TResult Function(String? message)? error,
  789. required TResult orElse(),
  790. }) {
  791. if (computingSolution != null) {
  792. return computingSolution(puzzleData);
  793. }
  794. return orElse();
  795. }
  796. @override
  797. @optionalTypeArgs
  798. TResult map<TResult extends Object?>(
  799. TResult Function(PuzzleIdle value) $default, {
  800. required TResult Function(PuzzleInitializing value) initializing,
  801. required TResult Function(PuzzleScrambling value) scrambling,
  802. required TResult Function(PuzzleCurrent value) current,
  803. required TResult Function(PuzzleComputingSolution value) computingSolution,
  804. required TResult Function(PuzzleAutoSolving value) autoSolving,
  805. required TResult Function(PuzzleSolved value) solved,
  806. required TResult Function(PuzzleError value) error,
  807. }) {
  808. return computingSolution(this);
  809. }
  810. @override
  811. @optionalTypeArgs
  812. TResult? mapOrNull<TResult extends Object?>(
  813. TResult Function(PuzzleIdle value)? $default, {
  814. TResult Function(PuzzleInitializing value)? initializing,
  815. TResult Function(PuzzleScrambling value)? scrambling,
  816. TResult Function(PuzzleCurrent value)? current,
  817. TResult Function(PuzzleComputingSolution value)? computingSolution,
  818. TResult Function(PuzzleAutoSolving value)? autoSolving,
  819. TResult Function(PuzzleSolved value)? solved,
  820. TResult Function(PuzzleError value)? error,
  821. }) {
  822. return computingSolution?.call(this);
  823. }
  824. @override
  825. @optionalTypeArgs
  826. TResult maybeMap<TResult extends Object?>(
  827. TResult Function(PuzzleIdle value)? $default, {
  828. TResult Function(PuzzleInitializing value)? initializing,
  829. TResult Function(PuzzleScrambling value)? scrambling,
  830. TResult Function(PuzzleCurrent value)? current,
  831. TResult Function(PuzzleComputingSolution value)? computingSolution,
  832. TResult Function(PuzzleAutoSolving value)? autoSolving,
  833. TResult Function(PuzzleSolved value)? solved,
  834. TResult Function(PuzzleError value)? error,
  835. required TResult orElse(),
  836. }) {
  837. if (computingSolution != null) {
  838. return computingSolution(this);
  839. }
  840. return orElse();
  841. }
  842. }
  843. abstract class PuzzleComputingSolution implements PuzzleState {
  844. const factory PuzzleComputingSolution(PuzzleData puzzleData) =
  845. _$PuzzleComputingSolution;
  846. PuzzleData get puzzleData;
  847. @JsonKey(ignore: true)
  848. $PuzzleComputingSolutionCopyWith<PuzzleComputingSolution> get copyWith =>
  849. throw _privateConstructorUsedError;
  850. }
  851. /// @nodoc
  852. abstract class $PuzzleAutoSolvingCopyWith<$Res> {
  853. factory $PuzzleAutoSolvingCopyWith(
  854. PuzzleAutoSolving value, $Res Function(PuzzleAutoSolving) then) =
  855. _$PuzzleAutoSolvingCopyWithImpl<$Res>;
  856. $Res call({PuzzleData puzzleData});
  857. }
  858. /// @nodoc
  859. class _$PuzzleAutoSolvingCopyWithImpl<$Res>
  860. extends _$PuzzleStateCopyWithImpl<$Res>
  861. implements $PuzzleAutoSolvingCopyWith<$Res> {
  862. _$PuzzleAutoSolvingCopyWithImpl(
  863. PuzzleAutoSolving _value, $Res Function(PuzzleAutoSolving) _then)
  864. : super(_value, (v) => _then(v as PuzzleAutoSolving));
  865. @override
  866. PuzzleAutoSolving get _value => super._value as PuzzleAutoSolving;
  867. @override
  868. $Res call({
  869. Object? puzzleData = freezed,
  870. }) {
  871. return _then(PuzzleAutoSolving(
  872. puzzleData == freezed
  873. ? _value.puzzleData
  874. : puzzleData // ignore: cast_nullable_to_non_nullable
  875. as PuzzleData,
  876. ));
  877. }
  878. }
  879. /// @nodoc
  880. class _$PuzzleAutoSolving implements PuzzleAutoSolving {
  881. const _$PuzzleAutoSolving(this.puzzleData);
  882. @override
  883. final PuzzleData puzzleData;
  884. @override
  885. String toString() {
  886. return 'PuzzleState.autoSolving(puzzleData: $puzzleData)';
  887. }
  888. @override
  889. bool operator ==(dynamic other) {
  890. return identical(this, other) ||
  891. (other.runtimeType == runtimeType &&
  892. other is PuzzleAutoSolving &&
  893. const DeepCollectionEquality()
  894. .equals(other.puzzleData, puzzleData));
  895. }
  896. @override
  897. int get hashCode =>
  898. Object.hash(runtimeType, const DeepCollectionEquality().hash(puzzleData));
  899. @JsonKey(ignore: true)
  900. @override
  901. $PuzzleAutoSolvingCopyWith<PuzzleAutoSolving> get copyWith =>
  902. _$PuzzleAutoSolvingCopyWithImpl<PuzzleAutoSolving>(this, _$identity);
  903. @override
  904. @optionalTypeArgs
  905. TResult when<TResult extends Object?>(
  906. TResult Function() $default, {
  907. required TResult Function() initializing,
  908. required TResult Function(PuzzleData puzzleData) scrambling,
  909. required TResult Function(PuzzleData puzzleData) current,
  910. required TResult Function(PuzzleData puzzleData) computingSolution,
  911. required TResult Function(PuzzleData puzzleData) autoSolving,
  912. required TResult Function(PuzzleData puzzleData) solved,
  913. required TResult Function(String? message) error,
  914. }) {
  915. return autoSolving(puzzleData);
  916. }
  917. @override
  918. @optionalTypeArgs
  919. TResult? whenOrNull<TResult extends Object?>(
  920. TResult Function()? $default, {
  921. TResult Function()? initializing,
  922. TResult Function(PuzzleData puzzleData)? scrambling,
  923. TResult Function(PuzzleData puzzleData)? current,
  924. TResult Function(PuzzleData puzzleData)? computingSolution,
  925. TResult Function(PuzzleData puzzleData)? autoSolving,
  926. TResult Function(PuzzleData puzzleData)? solved,
  927. TResult Function(String? message)? error,
  928. }) {
  929. return autoSolving?.call(puzzleData);
  930. }
  931. @override
  932. @optionalTypeArgs
  933. TResult maybeWhen<TResult extends Object?>(
  934. TResult Function()? $default, {
  935. TResult Function()? initializing,
  936. TResult Function(PuzzleData puzzleData)? scrambling,
  937. TResult Function(PuzzleData puzzleData)? current,
  938. TResult Function(PuzzleData puzzleData)? computingSolution,
  939. TResult Function(PuzzleData puzzleData)? autoSolving,
  940. TResult Function(PuzzleData puzzleData)? solved,
  941. TResult Function(String? message)? error,
  942. required TResult orElse(),
  943. }) {
  944. if (autoSolving != null) {
  945. return autoSolving(puzzleData);
  946. }
  947. return orElse();
  948. }
  949. @override
  950. @optionalTypeArgs
  951. TResult map<TResult extends Object?>(
  952. TResult Function(PuzzleIdle value) $default, {
  953. required TResult Function(PuzzleInitializing value) initializing,
  954. required TResult Function(PuzzleScrambling value) scrambling,
  955. required TResult Function(PuzzleCurrent value) current,
  956. required TResult Function(PuzzleComputingSolution value) computingSolution,
  957. required TResult Function(PuzzleAutoSolving value) autoSolving,
  958. required TResult Function(PuzzleSolved value) solved,
  959. required TResult Function(PuzzleError value) error,
  960. }) {
  961. return autoSolving(this);
  962. }
  963. @override
  964. @optionalTypeArgs
  965. TResult? mapOrNull<TResult extends Object?>(
  966. TResult Function(PuzzleIdle value)? $default, {
  967. TResult Function(PuzzleInitializing value)? initializing,
  968. TResult Function(PuzzleScrambling value)? scrambling,
  969. TResult Function(PuzzleCurrent value)? current,
  970. TResult Function(PuzzleComputingSolution value)? computingSolution,
  971. TResult Function(PuzzleAutoSolving value)? autoSolving,
  972. TResult Function(PuzzleSolved value)? solved,
  973. TResult Function(PuzzleError value)? error,
  974. }) {
  975. return autoSolving?.call(this);
  976. }
  977. @override
  978. @optionalTypeArgs
  979. TResult maybeMap<TResult extends Object?>(
  980. TResult Function(PuzzleIdle value)? $default, {
  981. TResult Function(PuzzleInitializing value)? initializing,
  982. TResult Function(PuzzleScrambling value)? scrambling,
  983. TResult Function(PuzzleCurrent value)? current,
  984. TResult Function(PuzzleComputingSolution value)? computingSolution,
  985. TResult Function(PuzzleAutoSolving value)? autoSolving,
  986. TResult Function(PuzzleSolved value)? solved,
  987. TResult Function(PuzzleError value)? error,
  988. required TResult orElse(),
  989. }) {
  990. if (autoSolving != null) {
  991. return autoSolving(this);
  992. }
  993. return orElse();
  994. }
  995. }
  996. abstract class PuzzleAutoSolving implements PuzzleState {
  997. const factory PuzzleAutoSolving(PuzzleData puzzleData) = _$PuzzleAutoSolving;
  998. PuzzleData get puzzleData;
  999. @JsonKey(ignore: true)
  1000. $PuzzleAutoSolvingCopyWith<PuzzleAutoSolving> get copyWith =>
  1001. throw _privateConstructorUsedError;
  1002. }
  1003. /// @nodoc
  1004. abstract class $PuzzleSolvedCopyWith<$Res> {
  1005. factory $PuzzleSolvedCopyWith(
  1006. PuzzleSolved value, $Res Function(PuzzleSolved) then) =
  1007. _$PuzzleSolvedCopyWithImpl<$Res>;
  1008. $Res call({PuzzleData puzzleData});
  1009. }
  1010. /// @nodoc
  1011. class _$PuzzleSolvedCopyWithImpl<$Res> extends _$PuzzleStateCopyWithImpl<$Res>
  1012. implements $PuzzleSolvedCopyWith<$Res> {
  1013. _$PuzzleSolvedCopyWithImpl(
  1014. PuzzleSolved _value, $Res Function(PuzzleSolved) _then)
  1015. : super(_value, (v) => _then(v as PuzzleSolved));
  1016. @override
  1017. PuzzleSolved get _value => super._value as PuzzleSolved;
  1018. @override
  1019. $Res call({
  1020. Object? puzzleData = freezed,
  1021. }) {
  1022. return _then(PuzzleSolved(
  1023. puzzleData == freezed
  1024. ? _value.puzzleData
  1025. : puzzleData // ignore: cast_nullable_to_non_nullable
  1026. as PuzzleData,
  1027. ));
  1028. }
  1029. }
  1030. /// @nodoc
  1031. class _$PuzzleSolved implements PuzzleSolved {
  1032. const _$PuzzleSolved(this.puzzleData);
  1033. @override
  1034. final PuzzleData puzzleData;
  1035. @override
  1036. String toString() {
  1037. return 'PuzzleState.solved(puzzleData: $puzzleData)';
  1038. }
  1039. @override
  1040. bool operator ==(dynamic other) {
  1041. return identical(this, other) ||
  1042. (other.runtimeType == runtimeType &&
  1043. other is PuzzleSolved &&
  1044. const DeepCollectionEquality()
  1045. .equals(other.puzzleData, puzzleData));
  1046. }
  1047. @override
  1048. int get hashCode =>
  1049. Object.hash(runtimeType, const DeepCollectionEquality().hash(puzzleData));
  1050. @JsonKey(ignore: true)
  1051. @override
  1052. $PuzzleSolvedCopyWith<PuzzleSolved> get copyWith =>
  1053. _$PuzzleSolvedCopyWithImpl<PuzzleSolved>(this, _$identity);
  1054. @override
  1055. @optionalTypeArgs
  1056. TResult when<TResult extends Object?>(
  1057. TResult Function() $default, {
  1058. required TResult Function() initializing,
  1059. required TResult Function(PuzzleData puzzleData) scrambling,
  1060. required TResult Function(PuzzleData puzzleData) current,
  1061. required TResult Function(PuzzleData puzzleData) computingSolution,
  1062. required TResult Function(PuzzleData puzzleData) autoSolving,
  1063. required TResult Function(PuzzleData puzzleData) solved,
  1064. required TResult Function(String? message) error,
  1065. }) {
  1066. return solved(puzzleData);
  1067. }
  1068. @override
  1069. @optionalTypeArgs
  1070. TResult? whenOrNull<TResult extends Object?>(
  1071. TResult Function()? $default, {
  1072. TResult Function()? initializing,
  1073. TResult Function(PuzzleData puzzleData)? scrambling,
  1074. TResult Function(PuzzleData puzzleData)? current,
  1075. TResult Function(PuzzleData puzzleData)? computingSolution,
  1076. TResult Function(PuzzleData puzzleData)? autoSolving,
  1077. TResult Function(PuzzleData puzzleData)? solved,
  1078. TResult Function(String? message)? error,
  1079. }) {
  1080. return solved?.call(puzzleData);
  1081. }
  1082. @override
  1083. @optionalTypeArgs
  1084. TResult maybeWhen<TResult extends Object?>(
  1085. TResult Function()? $default, {
  1086. TResult Function()? initializing,
  1087. TResult Function(PuzzleData puzzleData)? scrambling,
  1088. TResult Function(PuzzleData puzzleData)? current,
  1089. TResult Function(PuzzleData puzzleData)? computingSolution,
  1090. TResult Function(PuzzleData puzzleData)? autoSolving,
  1091. TResult Function(PuzzleData puzzleData)? solved,
  1092. TResult Function(String? message)? error,
  1093. required TResult orElse(),
  1094. }) {
  1095. if (solved != null) {
  1096. return solved(puzzleData);
  1097. }
  1098. return orElse();
  1099. }
  1100. @override
  1101. @optionalTypeArgs
  1102. TResult map<TResult extends Object?>(
  1103. TResult Function(PuzzleIdle value) $default, {
  1104. required TResult Function(PuzzleInitializing value) initializing,
  1105. required TResult Function(PuzzleScrambling value) scrambling,
  1106. required TResult Function(PuzzleCurrent value) current,
  1107. required TResult Function(PuzzleComputingSolution value) computingSolution,
  1108. required TResult Function(PuzzleAutoSolving value) autoSolving,
  1109. required TResult Function(PuzzleSolved value) solved,
  1110. required TResult Function(PuzzleError value) error,
  1111. }) {
  1112. return solved(this);
  1113. }
  1114. @override
  1115. @optionalTypeArgs
  1116. TResult? mapOrNull<TResult extends Object?>(
  1117. TResult Function(PuzzleIdle value)? $default, {
  1118. TResult Function(PuzzleInitializing value)? initializing,
  1119. TResult Function(PuzzleScrambling value)? scrambling,
  1120. TResult Function(PuzzleCurrent value)? current,
  1121. TResult Function(PuzzleComputingSolution value)? computingSolution,
  1122. TResult Function(PuzzleAutoSolving value)? autoSolving,
  1123. TResult Function(PuzzleSolved value)? solved,
  1124. TResult Function(PuzzleError value)? error,
  1125. }) {
  1126. return solved?.call(this);
  1127. }
  1128. @override
  1129. @optionalTypeArgs
  1130. TResult maybeMap<TResult extends Object?>(
  1131. TResult Function(PuzzleIdle value)? $default, {
  1132. TResult Function(PuzzleInitializing value)? initializing,
  1133. TResult Function(PuzzleScrambling value)? scrambling,
  1134. TResult Function(PuzzleCurrent value)? current,
  1135. TResult Function(PuzzleComputingSolution value)? computingSolution,
  1136. TResult Function(PuzzleAutoSolving value)? autoSolving,
  1137. TResult Function(PuzzleSolved value)? solved,
  1138. TResult Function(PuzzleError value)? error,
  1139. required TResult orElse(),
  1140. }) {
  1141. if (solved != null) {
  1142. return solved(this);
  1143. }
  1144. return orElse();
  1145. }
  1146. }
  1147. abstract class PuzzleSolved implements PuzzleState {
  1148. const factory PuzzleSolved(PuzzleData puzzleData) = _$PuzzleSolved;
  1149. PuzzleData get puzzleData;
  1150. @JsonKey(ignore: true)
  1151. $PuzzleSolvedCopyWith<PuzzleSolved> get copyWith =>
  1152. throw _privateConstructorUsedError;
  1153. }
  1154. /// @nodoc
  1155. abstract class $PuzzleErrorCopyWith<$Res> {
  1156. factory $PuzzleErrorCopyWith(
  1157. PuzzleError value, $Res Function(PuzzleError) then) =
  1158. _$PuzzleErrorCopyWithImpl<$Res>;
  1159. $Res call({String? message});
  1160. }
  1161. /// @nodoc
  1162. class _$PuzzleErrorCopyWithImpl<$Res> extends _$PuzzleStateCopyWithImpl<$Res>
  1163. implements $PuzzleErrorCopyWith<$Res> {
  1164. _$PuzzleErrorCopyWithImpl(
  1165. PuzzleError _value, $Res Function(PuzzleError) _then)
  1166. : super(_value, (v) => _then(v as PuzzleError));
  1167. @override
  1168. PuzzleError get _value => super._value as PuzzleError;
  1169. @override
  1170. $Res call({
  1171. Object? message = freezed,
  1172. }) {
  1173. return _then(PuzzleError(
  1174. message: message == freezed
  1175. ? _value.message
  1176. : message // ignore: cast_nullable_to_non_nullable
  1177. as String?,
  1178. ));
  1179. }
  1180. }
  1181. /// @nodoc
  1182. class _$PuzzleError implements PuzzleError {
  1183. const _$PuzzleError({this.message});
  1184. @override
  1185. final String? message;
  1186. @override
  1187. String toString() {
  1188. return 'PuzzleState.error(message: $message)';
  1189. }
  1190. @override
  1191. bool operator ==(dynamic other) {
  1192. return identical(this, other) ||
  1193. (other.runtimeType == runtimeType &&
  1194. other is PuzzleError &&
  1195. const DeepCollectionEquality().equals(other.message, message));
  1196. }
  1197. @override
  1198. int get hashCode =>
  1199. Object.hash(runtimeType, const DeepCollectionEquality().hash(message));
  1200. @JsonKey(ignore: true)
  1201. @override
  1202. $PuzzleErrorCopyWith<PuzzleError> get copyWith =>
  1203. _$PuzzleErrorCopyWithImpl<PuzzleError>(this, _$identity);
  1204. @override
  1205. @optionalTypeArgs
  1206. TResult when<TResult extends Object?>(
  1207. TResult Function() $default, {
  1208. required TResult Function() initializing,
  1209. required TResult Function(PuzzleData puzzleData) scrambling,
  1210. required TResult Function(PuzzleData puzzleData) current,
  1211. required TResult Function(PuzzleData puzzleData) computingSolution,
  1212. required TResult Function(PuzzleData puzzleData) autoSolving,
  1213. required TResult Function(PuzzleData puzzleData) solved,
  1214. required TResult Function(String? message) error,
  1215. }) {
  1216. return error(message);
  1217. }
  1218. @override
  1219. @optionalTypeArgs
  1220. TResult? whenOrNull<TResult extends Object?>(
  1221. TResult Function()? $default, {
  1222. TResult Function()? initializing,
  1223. TResult Function(PuzzleData puzzleData)? scrambling,
  1224. TResult Function(PuzzleData puzzleData)? current,
  1225. TResult Function(PuzzleData puzzleData)? computingSolution,
  1226. TResult Function(PuzzleData puzzleData)? autoSolving,
  1227. TResult Function(PuzzleData puzzleData)? solved,
  1228. TResult Function(String? message)? error,
  1229. }) {
  1230. return error?.call(message);
  1231. }
  1232. @override
  1233. @optionalTypeArgs
  1234. TResult maybeWhen<TResult extends Object?>(
  1235. TResult Function()? $default, {
  1236. TResult Function()? initializing,
  1237. TResult Function(PuzzleData puzzleData)? scrambling,
  1238. TResult Function(PuzzleData puzzleData)? current,
  1239. TResult Function(PuzzleData puzzleData)? computingSolution,
  1240. TResult Function(PuzzleData puzzleData)? autoSolving,
  1241. TResult Function(PuzzleData puzzleData)? solved,
  1242. TResult Function(String? message)? error,
  1243. required TResult orElse(),
  1244. }) {
  1245. if (error != null) {
  1246. return error(message);
  1247. }
  1248. return orElse();
  1249. }
  1250. @override
  1251. @optionalTypeArgs
  1252. TResult map<TResult extends Object?>(
  1253. TResult Function(PuzzleIdle value) $default, {
  1254. required TResult Function(PuzzleInitializing value) initializing,
  1255. required TResult Function(PuzzleScrambling value) scrambling,
  1256. required TResult Function(PuzzleCurrent value) current,
  1257. required TResult Function(PuzzleComputingSolution value) computingSolution,
  1258. required TResult Function(PuzzleAutoSolving value) autoSolving,
  1259. required TResult Function(PuzzleSolved value) solved,
  1260. required TResult Function(PuzzleError value) error,
  1261. }) {
  1262. return error(this);
  1263. }
  1264. @override
  1265. @optionalTypeArgs
  1266. TResult? mapOrNull<TResult extends Object?>(
  1267. TResult Function(PuzzleIdle value)? $default, {
  1268. TResult Function(PuzzleInitializing value)? initializing,
  1269. TResult Function(PuzzleScrambling value)? scrambling,
  1270. TResult Function(PuzzleCurrent value)? current,
  1271. TResult Function(PuzzleComputingSolution value)? computingSolution,
  1272. TResult Function(PuzzleAutoSolving value)? autoSolving,
  1273. TResult Function(PuzzleSolved value)? solved,
  1274. TResult Function(PuzzleError value)? error,
  1275. }) {
  1276. return error?.call(this);
  1277. }
  1278. @override
  1279. @optionalTypeArgs
  1280. TResult maybeMap<TResult extends Object?>(
  1281. TResult Function(PuzzleIdle value)? $default, {
  1282. TResult Function(PuzzleInitializing value)? initializing,
  1283. TResult Function(PuzzleScrambling value)? scrambling,
  1284. TResult Function(PuzzleCurrent value)? current,
  1285. TResult Function(PuzzleComputingSolution value)? computingSolution,
  1286. TResult Function(PuzzleAutoSolving value)? autoSolving,
  1287. TResult Function(PuzzleSolved value)? solved,
  1288. TResult Function(PuzzleError value)? error,
  1289. required TResult orElse(),
  1290. }) {
  1291. if (error != null) {
  1292. return error(this);
  1293. }
  1294. return orElse();
  1295. }
  1296. }
  1297. abstract class PuzzleError implements PuzzleState {
  1298. const factory PuzzleError({String? message}) = _$PuzzleError;
  1299. String? get message;
  1300. @JsonKey(ignore: true)
  1301. $PuzzleErrorCopyWith<PuzzleError> get copyWith =>
  1302. throw _privateConstructorUsedError;
  1303. }