whatsfile 0.0.2 copy "whatsfile: ^0.0.2" to clipboard
whatsfile: ^0.0.2 copied to clipboard

This Flutter plugin is use for Android Platform to Share Pdf file to Specific Contacts and unsaved contacts in WhatsApp.

whatsfile #

This Flutter plugin for Android Platform to Share Pdf file to unsaved contacts in WhatsApp.

Features: #

  • This plugin is Share Pdf File to Specific Contact in WhatsApp.
  • Plugin Supported for Unsaved Contacts.
  • This Plugin Saved Contact to Mobile Phone.

Note: #

  • This Plugin Takes 8 to 10 Seconds To Share Pdf File To WhatsApp.
  • Because Of Contact sync to Mobile it takes time.
  • The Name Of the contact will be saved as My Contact.

Installation: #

For Android:

If you pretends to use the file share, you need to configure the file provider, this will give access to the files turning possible to share with other applications

Add to AndroidManifest.xml

<application>
...
 <provider
           android:name="androidx.core.content.FileProvider"
           android:authorities="${applicationId}.provider"
           android:exported="false"
           android:grantUriPermissions="true"
           tools:ignore="MissingClass">
           <meta-data
               android:name="android.support.FILE_PROVIDER_PATHS"
               android:resource="@xml/file_paths" />
       </provider>
</application>

Create xml Directory in res folder #

  • Inside the xml Directory create file file_paths.xml file.

Add res/xml/file_paths.xml:

<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
    <files-path name="files" path="/" />
    <cache-path
        name="cache"
        path="/"/>
    <external-path name="external_files" path="/" />
    <external-cache-path
        name="external_cache"
        path="/" />
    <external-files-path
        name="external_files"
        path="/" />

</paths>

How to use? #

ElevatedButton(
onPressed: () async{
ShareToWhatsapp.sharePDF(paths!, 'application/pdf', "911234567890");
},
child: Text('Share PDF'),
),

2
likes
140
points
44
downloads

Publisher

unverified uploader

Weekly Downloads

This Flutter plugin is use for Android Platform to Share Pdf file to Specific Contacts and unsaved contacts in WhatsApp.

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_web_plugins, plugin_platform_interface

More

Packages that depend on whatsfile