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.
 
 
 
 
 
 

23 lines
803 B

import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:my_flutter_puzzle/models/puzzle_data.dart';
part 'puzzle_state.freezed.dart';
@freezed
class PuzzleState with _$PuzzleState {
const factory PuzzleState() = PuzzleIdle;
const factory PuzzleState.initializing() = PuzzleInitializing;
const factory PuzzleState.scrambling(PuzzleData puzzleData) = PuzzleScrambling;
const factory PuzzleState.current(PuzzleData puzzleData) = PuzzleCurrent;
const factory PuzzleState.computingSolution(PuzzleData puzzleData) = PuzzleComputingSolution;
const factory PuzzleState.autoSolving(PuzzleData puzzleData) = PuzzleAutoSolving;
const factory PuzzleState.solved(PuzzleData puzzleData) = PuzzleSolved;
const factory PuzzleState.error({String? message}) = PuzzleError;
}