File tree Expand file tree Collapse file tree
packages/share_plus/share_plus/android/src/main/kotlin/dev/fluttercommunity/plus/share Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,8 +74,8 @@ internal class Share(
7474 action = Intent .ACTION_SEND
7575 type = " text/plain"
7676 putExtra(Intent .EXTRA_TEXT , uri ? : text)
77- if (subject != null ) putExtra(Intent .EXTRA_SUBJECT , subject)
78- if (title != null ) putExtra(Intent .EXTRA_TITLE , title)
77+ if (! subject.isNullOrBlank() ) putExtra(Intent .EXTRA_SUBJECT , subject)
78+ if (! title.isNullOrBlank() ) putExtra(Intent .EXTRA_TITLE , title)
7979 }
8080 } else {
8181 when {
@@ -106,9 +106,9 @@ internal class Share(
106106 }
107107
108108 shareIntent.apply {
109- if (text != null ) putExtra(Intent .EXTRA_TEXT , text)
110- if (subject != null ) putExtra(Intent .EXTRA_SUBJECT , subject)
111- if (title != null ) putExtra(Intent .EXTRA_TITLE , title)
109+ if (! text.isNullOrBlank() ) putExtra(Intent .EXTRA_TEXT , text)
110+ if (! subject.isNullOrBlank() ) putExtra(Intent .EXTRA_SUBJECT , subject)
111+ if (! title.isNullOrBlank() ) putExtra(Intent .EXTRA_TITLE , title)
112112 addFlags(Intent .FLAG_GRANT_READ_URI_PERMISSION )
113113 }
114114 }
You can’t perform that action at this time.
0 commit comments