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.

15 lines
795 B

2 years ago
  1. import 'package:freezed_annotation/freezed_annotation.dart';
  2. import 'package:my_flutter_puzzle/models/puzzle_data.dart';
  3. part 'puzzle_state.freezed.dart';
  4. @freezed
  5. class PuzzleState with _$PuzzleState {
  6. const factory PuzzleState() = PuzzleIdle;
  7. const factory PuzzleState.initializing() = PuzzleInitializing;
  8. const factory PuzzleState.scrambling(PuzzleData puzzleData) = PuzzleScrambling;
  9. const factory PuzzleState.current(PuzzleData puzzleData) = PuzzleCurrent;
  10. const factory PuzzleState.computingSolution(PuzzleData puzzleData) = PuzzleComputingSolution;
  11. const factory PuzzleState.autoSolving(PuzzleData puzzleData) = PuzzleAutoSolving;
  12. const factory PuzzleState.solved(PuzzleData puzzleData) = PuzzleSolved;
  13. const factory PuzzleState.error({String? message}) = PuzzleError;
  14. }