【发布时间】:2019-11-03 22:09:45
【问题描述】:
我想从颤动中播放“哔”声。 我确实尝试过使用 SystemSound.play,但它似乎不起作用。 请帮忙!提前致谢。
Future<void> play(SystemSoundType type) async {
await SystemChannels.platform.invokeMethod<void>(
"SystemSound.play",
type.toString(),
);
}
void main() {
play(SystemSoundType.click);
}
【问题讨论】:
-
@pskink 我不知道我只是按照文档上的实现
标签: android flutter system-sounds