isTrue function Null safety

bool isTrue(
  1. bool expression,
  2. {LazyMessage message = _DEFAULT_IS_TRUE_EX_MESSAGE}
)

Implementation

bool isTrue(final bool expression,
    {final LazyMessage message = _DEFAULT_IS_TRUE_EX_MESSAGE}) {
  if (expression == null || expression == false) {
    throw new ArgumentError(message());
  }
  return expression;
}