toJson method
Transform value in a JSON value.
By default returns value, but you can
set in the constructor of the FieldBloc
This method is called when you use FormBlocState.toJson
Implementation
Object? toJson() => value == null ? null : _toJson(value);