Flutter 導入 import 'package:english_words/english_words.dart'報錯

1,在項目根目錄下打開 pubspec.yaml 文件,找到如下代碼,添加高亮處代碼

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
  english_words: ^3.1.0


2,在 AS 命令行中執行 flutter packages get 即可

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章