在示例中经常使用的一种模式是对状态对象使用常量构造函数,以便它们是不可变的。在我的状态下,其中一个属性是Map,我在将它初始化为const时遇到了问题。错误是: type '_UnmodifiableSet<Map<String, double>>' is not a subtype of type 'Map<String, double>' 下面是抛出错误的
我正在尝试使用typeahead在文本字段中显示建议,但收到错误消息“queryro is not a subtype of string” Future<List<dynamic>> _getSuggestions(Stringquery) { "select TypeOfProduct from Items where TypeOfProduct, [query]); } **这是我用来从数据库获取数据<em