checkState function
Throws a StateError if the given expression
is false
.
Implementation
void checkState(bool expression, {message}) {
if (!expression) {
throw StateError(_resolveMessage(message, 'failed precondition')!);
}
}
Throws a StateError if the given expression
is false
.
void checkState(bool expression, {message}) {
if (!expression) {
throw StateError(_resolveMessage(message, 'failed precondition')!);
}
}