stac_share_plus 0.0.1

SDKflutter
Platformandroidioswindowslinuxmacosweb

An Stac ActionParser for sharing using share_plus

stac_share_plus

Pub Version Pub Likes GitHub Stars GitHub License

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

PropertyTypeDescription
textStringThe text to share
titleStringUsed as share sheet title where supported
subjectStringUsed as email subject where supported (e.g. EXTRA_SUBJECT on Android)
uriStringShare a URI.