大佬直接忽略。
新手,刚入flutter坑。在使用 NotificationListener 时报错。如下:

image.png
作为一枚合格的面向百度/Google开发猿来说,碰到错误第一时间肯定是搜索前辈们的解决思路呀。搜啊搜 没搜到,只能自己仔细看了。 然后注意到 以下这句提示:
Try adding either a return or a throw statement at the end.
莫非 onNotification 有返回值?点击去查看,果然:

image.png
作为一枚刚从 java 转到 kotlin 的猿来说,虽然不是很能理解,但是这个返回语句是真没想到呀.记录一下。