Skip to content

Commit e4a967f

Browse files
miquelbeltrannohli
andauthored
docs(share_plus): #1299 document XFile.fromData (#1300)
Co-authored-by: Joachim Nohl <[email protected]>
1 parent c0539e8 commit e4a967f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

packages/share_plus/share_plus/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,16 @@ Check out our documentation website to learn more. [Plus plugins documentation](
7171

7272
## Known Issues
7373

74+
### Sharing data created with XFile.fromData
75+
76+
When sharing data created with `XFile.fromData`, the plugin will write a temporal file inside the cache directory of the app, so it can be shared.
77+
78+
Althouth the OS should take care of deleting those files, it is advised, that you clean up this data once in a while (e.g. on app start).
79+
80+
You can access this directory using [path_provider](https://pub.dev/packages/path_provider) [getTemporaryDirectory](https://pub.dev/documentation/path_provider/latest/path_provider/getTemporaryDirectory.html).
81+
82+
Alternatively, don't use `XFile.fromData` and instead write the data down to a `File` with a path before sharing it, so you control when to delete it.
83+
7484
### Mobile platforms (Android and iOS)
7585

7686
#### Facebook limitations (WhatsApp, Instagram, Facebook Messenger)

0 commit comments

Comments
 (0)