handlerAutoCollect method
void
handlerAutoCollect(
- T? newValue,
- T? value
Implementation
void handlerAutoCollect(T? newValue, T? value) {
if (widget.autoCollect == true && isChanged(newValue, value)) {
widget.useValue(context, (cv) {
if (cv.runtimeType != newValue.runtimeType) {
var fromItem = AntdFormItemProvider.ofMaybe(context);
AntdLogs.w(
msg:
"Field '${fromItem?.namePath}' value type mismatch: stored value type (${cv.runtimeType}) differs from new value type (${newValue.runtimeType}). Auto-ignored. Set autoCollect to false for custom handling.",
biz: widget.runtimeType.toString());
}
});
widget.setValue(context, newValue, AntdFormTrigger.any);
}
}