assertThat function

void assertThat(
  1. bool isConditionMet, [
  2. String message = _kDefaultAssertionMessage
])

Assert with message (only in debug if desired). Roadmap #205.

Implementation

void assertThat(bool isConditionMet, [String message = _kDefaultAssertionMessage]) {
  if (!isConditionMet) throw AssertionError(message);
}