@override int? toJson(DateTime? value) { if (value == null) return null; return unit.removeScale(value.inMilliseconds); }