BacktrackingSolver<State, Choice> constructor
const
BacktrackingSolver<State, Choice> ({})
Creates a solver from the four pure callbacks that define the search:
choices: candidate moves available from a state (empty = dead end).apply: produces the new state reached by taking a choice.isComplete: whether a state is a full, accepted solution.isValid: whether a partial state is still worth exploring; returning false prunes the whole branch before any deeper recursion. Audited: 2026-06-12 11:26 EDT
Implementation
const BacktrackingSolver({
required this.choices,
required this.apply,
required this.isComplete,
required this.isValid,
});