当我尝试使用名为push的推送将图像作为参数传递给参数时,我正在为flutter应用程序使用onGenerate路由,我默认为错误页面而没有任何错误消息!
主屏幕
该汽车已经在主屏幕中初始化为final AssetImage car_image;
onTap: () {Navigator.of(context).pushNamed('/details', arguments: DetailScreen(data:data ,image: car.car_image));},
DetailScreen
class DetailScreen extends StatelessWidget {
final AssetImage image;
DetailScreen({Key key, this.image, this.data}) : super(key: key);```