title: How to open pdf, pptx, doc, docx files in flutter app?
body: <p>If I click on file how to open that file inside flutter app.
  This is what I have done:</p>
  <img src="https://i.stack.imgur.com/JX54f.png" width="280">
  <p>This code for show flies in listView:</p>
  <pre><code>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: &lt;Widget&gt;[
                        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: (){}
                          ),
                        ),
                      ]);
                })
  </code></pre>
  <p>I have used open_file package but its not working this is code i have done:</p>
  <pre><code>            onTap: () async {
              String fileUrl = widget.schoolDcUrl + &quot;/container&quot;attachments[index];
              final _openFile = await OpenFile.open(fileUrl);
               Logger.i(_openFile);
                                }
  </code></pre>
  <p>When I click on file it does not opening the file it will give a message on terminal file not found.</p>
  <p>I want onTap to open that file in application.</p>