升级Flutter 3.13.x 之后出现watcher-1.0.2报错

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版本,就不会出现上面这个报错了。

参考链接


发布者

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注