You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Flutter使用Isar Inspector创建对象时字段变为null的问题求助

Isar Inspector 创建对象后所有字段变为null的问题

我此前一直使用Hive作为App的本地数据库,近期尝试改用Isar,但遇到问题:通过Isar Inspector向集合中创建对象后,对象的字段全部变为null。

我的User实体类代码如下:

import 'package:isar/isar.dart';
part 'user_model.g.dart';

@collection
class User {
  Id id = Isar.autoIncrement; // you can also use id = null to auto increment
  String? name;
  int? age;
}

演示问题的动图:创建对象后字段为null

恳请各位提供帮助或相关信息,谢谢!

内容的提问来源于stack exchange,提问作者AbdelBari Bouklab

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.12 20:50:30