在我连接到服务器的应用程序中,返回此输出:

"usertags": {
    "in": [
        {

        }
    ]
},

在那个in中是dart关键字,我不知道如何从中获取数据并转义该错误:



abstract class BuiltUserTags implements Built<BuiltUserTags, BuiltUserTagsBuilder> {

  BuiltList<BuiltIn>    get   in;

  BuiltUserTags._();

  factory BuiltUserTags([updates(BuiltUserTagsBuilder b)]) = _$BuiltUserTags;

  static Serializer<BuiltUserTags> get serializer => _$builtUserTagsSerializer;
}

最佳答案

问题解决了,感谢图书馆的主人

@BuiltValueField(wireName: 'in')
BuiltList<BuiltIn> get ins;

关于flutter - 转义一些是dart关键字的字段,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/57988501/

10-09 10:01