nonEmpty static method
Requires data to be non-empty, throws BuError if empty.
Implementation
static void nonEmpty(
List<int> data, {
required String operation,
required String name,
}) {
if (data.isEmpty) {
throw CoreErrors.invalidOperationArguments(
operation,
name: name,
reason: 'must not be empty',
);
}
}