def add_field(cls, var: Var, default_value: Any):
        """Add a pydantic field after class definition.

        Used by State.add_var() to correctly handle the new variable.

        Args:
            var: The variable to add a pydantic field for.
            default_value: The default value of the field
        """
        var_name = var._var_field_name
        new_field = ModelField.infer(
            name=var_name,
            value=default_value,
            annotation=var._var_type,
            class_validators=None,
            config=cls.__config__,
        )
        cls.__fields__.update({var_name: new_field})
Add a pydantic field after class definition.

        Used by State.add_var() to correctly handle the new variable.

        Args:
            var: The variable to add a pydantic field for.
            default_value: The default value of the field
        
reflex/base.py