Flutter 常见异常(二): handleError callback must take either an Object (the error),or both an Object(th...

报错日志:

Invalid argument(s) : handleError callback must take either an Object (the error),or both an Object(the error) and a StrackTrace.

翻译:

无效参数:handleError回调必须采用对象(错误)或同时采用对象(错误)和StrackTrace。

出现这种情况是因为参数类型定义错误。比如在stream 定义监听的时候。如下错误代码示例。

解决办法:

你可能感兴趣的:(Flutter 常见异常(二): handleError callback must take either an Object (the error),or both an Object(th...)