在flutter项目中添加依赖可能出现如下错误:
Error on line 29, column 5 of pubspec.yaml: A dependency may only have one source.
╷
29 │ ┌ sdk: flutter
30 │ │ english_words: 3.1.0
31 │ │
32 │ │
33 │ │ # For information on the generic Dart part of this file, see the
34 │ │ # following page: https://www.dartlang.org/tools/pub/pubspec
35 │ │
36 │ └ # The following section is specific to Flutter.
╵
pub get failed (65)
这个错误是由于依赖对齐位置没对造成的:

改成如下:

网友评论