【发布时间】:2022-09-30 18:11:41
【问题描述】:
我有这样的代码模型
class Folder {
int id;
String title;
Color? color;
List<Note> notes;
final user = ToOne<User>();
String? get dbNotes => json.encode(notes);
set dbNotes(String? value) {
notes = json.decode(value!);
}
// ...
}
我有这个错误
Cannot use the default constructor of \'Folder\': don\'t know how to initialize param notes - no such property.
如何将我的 List<Object> 转换为存储在 ObjectBox 中?
标签: flutter objectbox flutter-objectbox