As my Problem Says..i want to sort my listView items that are basically songs read by external storage..I want to sort them alphabetically..this is my code for listView
final List<MaterialColor> _colors = Colors.primaries;
@override
Widget build(BuildContext context) {
final rootIW = MPInheritedWidget.of(context);
SongData songData = rootIW.songData;
return new ListView.builder(
itemCount: songData.songs.length,
itemBuilder: (context, int index) {
var s = songData.songs[index];
final MaterialColor color = _colors[index % _colors.length];
var artFile =
s.albumArt == null ? null : new File.fromUri(Uri.parse(s.albumArt));
return new ListTile(
dense: false,
leading: new Hero(
child: avatar(artFile, s.title, color),
tag: s.title,
),
title: new Text(s.title),
subtitle: new Text(
"By ${s.artist}",
style: Theme.of(context).textTheme.caption,
),