首页 > 解决方案 > “ControllerMVC*”类型的值不能分配给“DeliveryAddressesController?”类型的变量

问题描述

由于我更新了我的飞镖版本以支持空安全此错误

A value of type 'ControllerMVC*' can't be assigned to a variable of type 'DeliveryAddressesController?'.  
Try changing the type of the variable, or casting the right-hand type to 'DeliveryAddressesController?'.

尝试分配时似乎出现_con = controller;

  DeliveryAddressesController? _con;

 _DeliveryAddressBottomSheetWidgetState() : super(DeliveryAddressesController()) {
    _con = controller;
 }

任何想法我如何解决这个错误

标签: flutterdartcontrollerdart-null-safety

解决方案


推荐阅读