无法从小部件映射中分配小部件
Cant assign widget from map of widgets in flutter
我正在开发一个 flutter 项目我有地图可以在屏幕之间导航
但我无法使用它,我收到此错误
The argument type 'Object?' can't be assigned to the parameter type 'Widget?'
this is an error screenshot
将你的 Object
投射到 Widget
:
body: _pages[_selectedPageIndex]['page'] as Widget
我正在开发一个 flutter 项目我有地图可以在屏幕之间导航
但我无法使用它,我收到此错误
The argument type 'Object?' can't be assigned to the parameter type 'Widget?'
this is an error screenshot
将你的 Object
投射到 Widget
:
body: _pages[_selectedPageIndex]['page'] as Widget