assertNotEmpty static method
- Iterable sample
Throws an exception if sample
is empty.
Implementation
static void assertNotEmpty(Iterable sample) {
if (sample.isEmpty) {
throw ExceptionOfType<EmptyIterable>(
message: 'Stats can not be calculated.',
invalidState: 'Sample is empty.',
);
}
}