There you have an InputDecoration. You should avoid using validator, and instead use the errorText of the decoration. You can search for the implementation of the ReactiveTextField to see how it is using this approach.
builder: (ReactiveFormFieldState field) { final state = field as _ReactiveTextFieldState; final InputDecoration effectiveDecoration = (decoration ?? const InputDecoration()) .applyDefaults(Theme.of(state.context).inputDecorationTheme); return DateTimePicker( decoration: effectiveDecoration.copyWith(errorText: state.errorText), );
In the above code, I'm not using your RDateTimePicker just to simplify things, but it also applies with your wrapper widget.
Thank you, Joan finally I was able to make it work for both cases, greatly appreciate your help.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
There you have an InputDecoration. You should avoid using validator, and instead use the errorText of the decoration. You can search for the implementation of the ReactiveTextField to see how it is using this approach.
In the above code, I'm not using your RDateTimePicker just to simplify things, but it also applies with your wrapper widget.
Thank you, Joan finally I was able to make it work for both cases, greatly appreciate your help.