If I click on file how to open that file inside flutter app. This is what I have done:

This code for show flies in listView:
ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: attachments.length,
itemBuilder: (BuildContext ctxt, int index) {
print (index);
return ListView(
scrollDirection: Axis.vertical,
shrinkWrap: true,
children: <Widget>[
Padding(
padding: const EdgeInsets.all(1.0),
child: ListTile(
leading: CircleAvatar(
child: _getIcon(
attachments[index].split('/').removeLast()),
backgroundColor: Colors.white,
),
subtitle:
Text(attachments[index].split('/').removeLast()),
onTap: (){}
),
),
]);
})
I have used open_file package but its not working this is code i have done:
onTap: () async {
String fileUrl = widget.schoolDcUrl + "/container"attachments[index];
final _openFile = await OpenFile.open(fileUrl);
Logger.i(_openFile);
}
When I click on file it does not opening the file it will give a message on terminal file not found.
I want onTap to open that file in application.