Skip to main content

prefer-using-list-view

Warns when a Column widget with only children parameter is wrapped in a SingleChildScrollView widget.

Additional resources:

Example

❌ Bad:

SingleChildScrollView(
child: Column(
children: [
Text('Wow lint rule'),
Text('Wow another lint rule'),
],
),
),

✅ Good:

ListView(
children: [
Text('Wow lint rule'),
Text('Wow another lint rule'),
],
),