Failed to build intl_utils:generate FileSystemEvent

482 阅读1分钟
Failed to build intl_utils:generate:
../../../.pub-cache/hosted/pub.flutter-io.cn/watcher-1.0.2/lib/src/constructable_file_system_event.dart:7:57: Error: The class 'FileSystemEvent' can't be extended, implemented, or mixed in outside of its library because it's a sealed class.
abstract class _ConstructableFileSystemEvent implements FileSystemEvent {

解决办法:

请尝试  dart pub upgrade  命令,如果还是报错  dart pub cache repair ,这样我们就可以使用到最新的watcher-1.1.0版本,就不会出现上面这个报错了

如果出现:Could not find bin/generate.dart in package intl_utils 可能是版本不对 升级版本