跑不起来啊。这个demo
tianlinzx opened this issue · comments
tianlinzx commented
Compiler message:
file:///Volumes/Data/software/flutter/.pub-cache/hosted/pub.flutter-io.cn/palette_generator-0.1.1/lib/palette_generator.dart:188:29: Error: The argument type 'void Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'.
- 'ImageInfo' is from 'package:flutter/src/painting/image_stream.dart' ('file:///Volumes/Data/software/flutter/packages/flutter/lib/src/painting/image_stream.dart').
- 'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart' ('file:///Volumes/Data/software/flutter/packages/flutter/lib/src/painting/image_stream.dart').
Try changing the type of the parameter, or casting the argument to 'ImageStreamListener'.
stream.removeListener(imageListener);
^
file:///Volumes/Data/software/flutter/.pub-cache/hosted/pub.flutter-io.cn/palette_generator-0.1.1/lib/palette_generator.dart:194:31: Error: The argument type 'void Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'. - 'ImageInfo' is from 'package:flutter/src/painting/image_stream.dart' ('file:///Volumes/Data/software/flutter/packages/flutter/lib/src/painting/image_stream.dart').
- 'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart' ('file:///Volumes/Data/software/flutter/packages/flutter/lib/src/painting/image_stream.dart').
Try changing the type of the parameter, or casting the argument to 'ImageStreamListener'.
stream.removeListener(imageListener);
^
file:///Volumes/Data/software/flutter/.pub-cache/hosted/pub.flutter-io.cn/palette_generator-0.1.1/lib/palette_generator.dart:201:24: Error: The argument type 'void Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'. - 'ImageInfo' is from 'package:flutter/src/painting/image_stream.dart' ('file:///Volumes/Data/software/flutter/packages/flutter/lib/src/painting/image_stream.dart').
- 'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart' ('file:///Volumes/Data/software/flutter/packages/flutter/lib/src/painting/image_stream.dart').
Try changing the type of the parameter, or casting the argument to 'ImageStreamListener'.
stream.addListener(imageListener);
^
file:///Volumes/Data/software/flutter/.pub-cache/hosted/pub.flutter-io.cn/photo_view-0.2.5/lib/photo_view.dart:279:24: Error: The argument type 'Null Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'. - 'ImageInfo' is from 'package:flutter/src/painting/image_stream.dart' ('file:///Volumes/Data/software/flutter/packages/flutter/lib/src/painting/image_stream.dart').
- 'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart' ('file:///Volumes/Data/software/flutter/packages/flutter/lib/src/painting/image_stream.dart').
Try changing the type of the parameter, or casting the argument to 'ImageStreamListener'.
stream.addListener(listener);
^
file:///Volumes/Data/software/flutter/.pub-cache/hosted/pub.flutter-io.cn/photo_view-0.2.5/lib/photo_view.dart:281:29: Error: The argument type 'Null Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'. - 'ImageInfo' is from 'package:flutter/src/painting/image_stream.dart' ('file:///Volumes/Data/software/flutter/packages/flutter/lib/src/painting/image_stream.dart').
- 'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart' ('file:///Volumes/Data/software/flutter/packages/flutter/lib/src/painting/image_stream.dart').
Try changing the type of the parameter, or casting the argument to 'ImageStreamListener'.
stream.removeListener(listener);
^
Compiler failed on /Volumes/Data/github/flutter/flutter_app/lib/main.dart
Error launching application on iPhone Xʀ.
豆浆油条 commented
这个是第三方包palette_generator的问题见palette_generator issues 22
你把这个库注释掉试试palette_generator
tianlinzx commented
我刚刚试了一下,切换到稳定版的flutter,ok了。