Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!
We spend hours on Instagram and YouTube and waste money on coffee and fast food, but wonβt spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!
Learn from Guru Rajesh Kumar and double your salary in just one year.
I want to start showing the list items from index 5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ListView.builder( | |
itemCount: items.length, | |
itemBuilder: (context, index) { | |
return ListTile( | |
title: Text('${items[index]}'), | |
); | |
}, | |
); |
Check this out
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ListView.builder( | |
itemCount: items.length, | |
itemBuilder: (context, index) { | |
if(index < 5) return SizedBox(); | |
return ListTile( | |
title: Text('${items[index]}'), | |
); | |
}, | |
); |
ListView.builder(
itemCount: items.length,
itemBuilder: (context, index) {
return Visibility(
visible: index>5,
child: ListTile(
title: Text('${items[index]}'),
),
);
},
);
Maybe this is what you are looking for
ListView.builder(
itemCount: items.length - 5,
itemBuilder: (context, index) {
return ListTile(
title: Text(items[index+5].toString()),
);
},
);