avoid-empty-spread
preset: recommended
Warns when a collection literal in spread (...[]) has no elements.
Example
❌ Bad:
void fn(bool flag) {
final another = [
...<String>[], // LINT
if (flag) ...<String>[], // LINT
];
}
✅ Good:
void fn(bool flag) {
final another = [
...<String>['some', 'elements'],
];
}