Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
kasem committed Apr 9, 2024
1 parent 863f657 commit 4e0d3bb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ class _MyAppState extends State<MyApp> {
super.initState();
// Listen to media sharing coming from outside the app while the app is in the memory.
_intentSub = ReceiveSharingIntent.getMediaStream().listen((value) {
_intentSub = ReceiveSharingIntent.instance.getMediaStream().listen((value) {
setState(() {
_sharedFiles.clear();
_sharedFiles.addAll(value);
Expand All @@ -314,14 +314,14 @@ class _MyAppState extends State<MyApp> {
});
// Get the media sharing coming from outside the app while the app is closed.
ReceiveSharingIntent.getInitialMedia().then((value) {
ReceiveSharingIntent.instance.getInitialMedia().then((value) {
setState(() {
_sharedFiles.clear();
_sharedFiles.addAll(value);
print(_sharedFiles.map((f) => f.toMap()));
// Tell the library that we are done processing the intent.
ReceiveSharingIntent.reset();
ReceiveSharingIntent.instance.reset();
});
});
}
Expand Down

0 comments on commit 4e0d3bb

Please sign in to comment.