来自Flutter文档的示例AnimatedGrid找不到小部件?

wwodge7n  于 2023-01-02  发布在  Flutter
关注(0)|答案(1)|浏览(208)

AnimatedGrid运行:

flutter create --sample=widgets.AnimatedGrid.1 mysample

示例代码没有找到AnimatedGrid。缺少什么?
运行flutter analyzeflutter run显示以下消息:

gjmwrych

gjmwrych1#

AnimatedGridStatefirestore_ui包提供,添加到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: ^1.0.2
  firestore_ui: ^1.24.0

并将其导入到该文件中。在生成项目时,它不会添加到pubspec.yaml上。

相关问题