unreachableError function
Throws an error for unreachable code paths.
This should be called in places where the code should never execute if the program logic is correct. It helps identify bugs in the generator.
Implementation
Never unreachableError(String id, String message) {
throw StateError('[$id] Unreachable code: $message');
}