Dictionary 如何用另一个贴图替换贴图的值?

Dictionary 如何用另一个贴图替换贴图的值?,dictionary,object,dart,Dictionary,Object,Dart,我正在尝试用另一个贴图重新指定贴图的值。在本例中,我试图将地址的定义复制到账单地址 test("test dart", () { Map<String, dynamic> baseSchema = { r"$schema": "http://json-schema.org/draft-07/schema#", "definitions": {

我正在尝试用另一个贴图重新指定贴图的值。在本例中,我试图将
地址
的定义复制到
账单地址

    test("test dart", () {
      Map<String, dynamic> baseSchema = {
        r"$schema": "http://json-schema.org/draft-07/schema#",
        "definitions": {
          "address": {
            "type": "object",
            "properties": {
              "street_address": {"type": "string"},
              "city": {"type": "string"},
              "state": {"type": "string"}
            },
            "required": ["street_address", "city", "state"]
          }
        },
        "type": "object",
        "properties": {
          "billing_address": {r"$ref": "#/definitions/address"},
          "shipping_address": {r"$ref": "#/definitions/address"}
        }
      };
      baseSchema["properties"]["billing_address"] =
          Map<String, dynamic>.from(baseSchema["definitions"]["address"]);

      print(baseSchema);
    });
测试(“测试省道”),(){
映射基架构={
r“$schema”:http://json-schema.org/draft-07/schema#",
“定义”:{
“地址”:{
“类型”:“对象”,
“财产”:{
“街道地址”:{“类型”:“字符串”},
“城市”:{“类型”:“字符串”},
“状态”:{“类型”:“字符串”}
},
“必需”:[“街道地址”、“城市”、“州”]
}
},
“类型”:“对象”,
“财产”:{
“账单地址”:{r“$ref”:“#/definitions/address”},
“发货地址”:{r“$ref”:“#/definitions/address”}
}
};
baseSchema[“属性”][“账单地址”]=
Map.from(baseSchema[“定义”][“地址”]);
打印(基本模式);
});
这会导致以下情况:

type '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'Map<String, String>' of 'value'
类型“\u InternalLinkedHashMap”不是“value”类型“Map”的子类型
我曾尝试在位置中添加
Map.from(other)
,并将模式的类型更改为
dynamic
,但无法使其工作