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.

1431 lines
47 KiB

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