slack_notifier 0.0.1
slack_notifier: ^0.0.1 copied to clipboard
A simple wrapper to post messages from external sources into Slack.
slack_notifier #
A simple wrapper to post messages from external sources into Slack.
Usage #
To use this package, your workspace needs to have a Webhook URL. If you don't have it, follow the instructions here.
The SlackNotifier
class has only one method, with optional parameters to customize your messages.
Future<String> send(String text,
{String channel, String iconEmoji, String iconUrl, String username, List<Attachment> attachments});
channel
: Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name.iconEmoji
: Emoji to use as the icon for this message.iconUrl
: URL to an image to use as the icon for this message.username
: Set your bot's user name.attachments
: Attachment model list that can be added as secondary content.
Result #
The message will look like this: