【问题标题】:Sample AnimatedGrid from Flutter docs doesn't find the widget?Flutter 文档中的示例 AnimatedGrid 找不到小部件?
【发布时间】:2023-01-02 20:07:49
【问题描述】:

来自AnimatedGrid 运行:

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

示例代码没有找到AnimatedGrid。什么东西少了?

运行 flutter analyzeflutter run 显示以下消息:

【问题讨论】:

  • 重新启动 IDE 并重试?
  • 我没有使用 IDE。只需在终端上运行。

标签: flutter


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 2019-10-01
    • 2021-02-04
    • 1970-01-01
    • 2022-12-12
    • 1970-01-01
    • 2020-08-21
    • 2021-03-31
    • 2021-07-29
    • 2021-11-19
    相关资源
    最近更新 更多