Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Future<Widget> _buildMusicTile(
- List<String> listofAudioFilesPath, List<String> listofAudioNames) async {
- List<String> listOfFilesPath = await listofAudioFilesPath;
- List<String> listOfFilesNames = await listofAudioNames;
- if (listofAudioFilesPath != null && listOfFilesNames != null) {
- return ListView.separated(
- itemCount: listofAudioNames.length,
- separatorBuilder: (BuildContext context, int index) {
- return Container(
- height: 10,
- color: Colors.white,
- );
- },
- itemBuilder: (BuildContext context, int index) {
- return ListTile(
- leading: Icon(Icons.play_circle_filled),
- title: Text(
- '$listofAudioNames[$index]',
- style: TextStyle(color: Colors.black, fontSize: 25),
- ),
- subtitle: Text(
- '$listOfFilesPath',
- style: TextStyle(color: Colors.black, fontSize: 25),
- ),
- );
- },
- );
- } else {
- return Center(
- child: Column(
- children: [
- Text(
- '$listofAudioNames',
- style: TextStyle(color: Colors.black, fontSize: 25),
- ),
- Text(
- '$listOfFilesPath',
- style: TextStyle(color: Colors.black, fontSize: 25),
- ),
- CircularProgressIndicator(),
- ],
- ),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment