flutter报错: Could not find package "build_runner". Did you forget to add a dependency?
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
json_annotation: ^3.0.0
原因: 未添加 build_runner
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
build_runner: ^1.7.0
json_annotation: ^3.0.0