v1.0.7
slack_logger
一个简单的 Flutter 包,通过 Slack Webhook 将消息发送到 Slack 频道
26喜欢 154近 30 天下载160Pub 分数
AndroidiOSWebmacOSWindowsLinux
一个简单的 Flutter 包,通过 Slack Webhook 将消息发送到 Slack 频道
{"sdk":"flutter"}^1.1.0{"sdk":"flutter"}>=2.0.0 <5.0.0以下为英文项目原文快照,最新内容请访问 GitHub。
A simple Flutter package to send message to slack channel via slack webhook
To use this plugin, add slack_logger as a dependency in your pubspec.yaml file 🔗.
Add Apps to 🔗 https://api.slack.com/apps/.
Go to Incoming Webhook Link and Enable it.
Create your slack channel.
Create new webhook and link slack channel.
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
SlackLogger(webhookUrl: "[Add Your Web Hook Url]");
return MaterialApp(
...
);
}
}
final slack = SlackLogger.instance;
...
slack.send("This is a error log to my channel");
...
...
slack.sendImage(
imageUrl: "[image url]",
imageAltText: "[alt text for image]",
);
...
...
slack.sendImageWithText(
text: "[text]",
imageUrl: "[image url]",
imageAltText: "[alt text for image]"
);
...
...
slack.sendTextWithButton(
markdownMessage: "[markdown message]",
buttonLabel: "[button label]",
url: "[button link]"
);
...
...
slack.sendTextAsAttachment(
message:"[Your Message]",
color: "[color]"
);
...
...
slack.sendMarkdownAsAttachment(
markdownMessageList: List<String> [markdownMessageList],
color: "[color]"
);
...
Any new Contributors are welcomed.
Feel Free to request any missing features or report issues here 🔗.