我不能flutter pub run build_runner watch --delete-confilicting-output
用来生成冻结的文件。错误是:
无法构建 build_runner:build_runner: /C:/flutter/.pub-cache/hosted/pub.dartlang.org/analyzer-0.41.2/lib/src/error/best_practices_verifier.dart:258:50:错误:属性'displayString' 在 'TargetKind' 的多个扩展中定义,两者都没有更具体。-- 'TargetKind' 来自 'package:meta/meta_meta.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/meta-1.7.0/lib/meta_meta.dart') . 尝试使用所需扩展的显式扩展应用程序或从范围中隐藏不需要的扩展。^^^^^^^^^^^^^ /C:/flutter/.pub-cache/hosted/pub.dartlang.org/analyzer-0.41.2/lib/src/error/best_practices_verifier.dart:1950: 14:上下文:这是扩展成员之一。字符串获取 displayString { ^^^^^^^^^^^^^ /C:/flutter/.pub-cache/hosted/pub.dartlang.org/meta-1.7.0/lib/meta_meta.dart:91: 14:上下文:这是扩展成员之一。字符串获取 displayString { ^^^^^^^^^^^^^ /C:/flutter/.pub-cache/hosted/pub.dartlang.org/analyzer-0.41.2/lib/src/error/best_practices_verifier. dart:260:36: 错误:没有为类 'List' 定义 getter 'commaSeparatedWithOr'。-- 'List' 来自 'dart:core'。尝试将名称更正为现有 getter 的名称,或定义名为“commaSeparatedWithOr”的 getter 或字段。
var validKinds = kindNames.commaSeparatedWithOr;
yaml 文件是:
environment:
sdk: ">=2.14.3 <3.0.0"
dependencies:
flutter:
sdk: flutter
google_maps_flutter: ^2.1.1
location: ^4.3.0
firebase_core: ^1.10.0
cloud_firestore: ^3.1.0
flutter_bloc: ^8.0.0
bloc: ^8.0.0
freezed: ^0.12.7
dartz: ^0.10.0
freezed_annotation: ^1.0.0
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^1.0.0
build_runner:
analyzer:
# ^1.12.2
freezed:
#^1.12.0