【问题标题】:Cant assign widget from map of widgets in flutter [closed]无法从颤动的小部件地图中分配小部件[关闭]
【发布时间】:2021-09-22 15:01:54
【问题描述】:

我正在开发一个颤振项目,我有地图,我可以在屏幕之间导航

但我不能使用它我得到这个错误

The argument type 'Object?' can't be assigned to the parameter type 'Widget?' 这是错误截图

【问题讨论】:

标签: flutter dart dart-pub flutter-widget


【解决方案1】:

将您的Object 转换为Widget

body: _pages[_selectedPageIndex]['page'] as Widget

【讨论】:

  • 你说得对,完蛋了
猜你喜欢
  • 2018-09-05
  • 1970-01-01
  • 1970-01-01
  • 2019-05-23
  • 2013-07-02
  • 2021-02-17
  • 1970-01-01
  • 2021-08-17
  • 2021-06-27
相关资源
最近更新 更多