Puzzle class

Sudoku Puzzle Class Handles:

  • Puzzle options
  • Generation
  • Observable grid change
  • Stopwatch


Puzzle(PuzzleOptions options)
Constructs a new Sudoku puzzle - don't forget to run generate
Puzzle.fromMap(Map<String, dynamic> map)


hashCode int
The hash code for this object. [...]
read-only, inherited
isStopwatchRunning bool
to check stopwatch is paused or not
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


board() Grid
dispose() → void
Terminate listeners, and prepare Puzzle for closure
fillCell(Position position, int value) List<CellViolation>
Fill a particular Cell at position with value, and returns a list of CellViolation For what violations are, please refer to CellViolation enum
generate() Future<bool>
Generates a new puzzle using parameters set in _options
getTimeElapsed() Duration
Add the time elapsed in case the game is being reloaded from map/storage
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
onBoardChange(dynamic handler(Cell)) → void
Set a handler function, which will be called whenever the grid changes. A change is whenever a cell experiences a change in value.
options() PuzzleOptions
solvedBoard() Grid
startStopwatch() → void
Getters and setters I can only make these comments so interesting and no more :l
stopStopwatch() → void
toMap() Map<String, dynamic>
toString() String
A string representation of this object. [...]


operator ==(Object other) bool
The equality operator. [...]