stac_share_plus
A Stac ActionParser to share content with the compatible apps on the device. It uses the share_plus plugin.
Getting started
Add this package to your yaml file
stac_share_plus: 0.0.1
or exec this command:
flutter pub add stac_share_plus
Usage
Import the package in your dart file:
import 'package:stac_share_plus/stac_share_plus.dart';
Register the Action Parser:
void main() async {
await Stac.initialize(
actionParsers: const [
ShareActionParser(),
],
);
runApp(const MyApp());
}
Share Action JSON
{
"actionType": "share",
"data": {
"text": "Shared text",
"title": "Shared title",
"subject": "Shared subject"
}
}
Share Action Properties
| Property | Type | Description |
|---|---|---|
| text | String |
The text to share |
| title | String |
Used as share sheet title where supported |
| subject | String |
Used as email subject where supported (e.g. EXTRA_SUBJECT on Android) |
| uri | String |
Share a URI. |