错误:HttpRequestWrapper无法同时实现Stream <List <int >>和Stream <Uint8List>

时间:2019-09-22 18:32:20

标签: flutter dart socket.io

我正在尝试使用socket_io_client创建一个实时聊天应用程序。当我从pub.dev添加示例代码时,出现错误

flash[:notice] && flash[:notice].is_a? Array && flash[:notice].empty?
# syntax error, unexpected tCONSTANT, expecting end-of-input
# ...] && flash[:notice].is_a? Array && flash[:notice].empty?
#                              ^~~~~

这是我的代码:

Compiler message:
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/rikulo_commons-3.2.1/lib/src/io/http_wrapper.dart:9:7: Error: 'HttpRequestWrapper' can't implement both 'Stream<List<int>>' and 'Stream<Uint8List>'
 - 'Stream' is from 'dart:async'.
 - 'List' is from 'dart:core'.
 - 'Uint8List' is from 'dart:typed_data'.
class HttpRequestWrapper extends StreamWrapper<List<int>> implements HttpRequest {
      ^
../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/stream-2.2.1/lib/src/connect_impl.dart:249:7: Error: '_ReUriRequest' can't implement both 'Stream<List<int>>' and 'Stream<Uint8List>'
 - 'Stream' is from 'dart:async'.
 - 'List' is from 'dart:core'.
 - 'Uint8List' is from 'dart:typed_data'.
class _ReUriRequest extends HttpRequestWrapper {
  ^

我在做什么错,如何在flutter中设置套接字io连接?

0 个答案:

没有答案