slack_notifier 1.0.0
slack_notifier: ^1.0.0 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, // Channel, private group, or IM channel name to send message to.
String iconEmoji, // Emoji to use as the icon for this message.
String iconUrl, // URL to an image to use as the icon for this message.
String username, // Set your bot's user name.
List<Attachment> attachments, // Attachment list that can be added as secondary content.
});
Result #
The message will look like this: