luthor_generator
luthor_generator is a package allowing you to generate luthor schemas with
code generation. It is a companion to
the luthor package, and is built to work
with freezed.
Features
- Schema Generation - Automatically generate validation schemas from annotated classes
- Type-safe SchemaKeys - Generated constants for defining schemas with compile-time safety
- Type-safe ErrorKeys - Generated constants for accessing validation errors with dot-notation support
- Cross-field Validation - Support for
@WithSchemaCustomValidatorto validate fields against other fields
Generated Code
For each annotated class, luthor_generator creates:
$ClassNameSchema- The validation schemaClassNameSchemaKeys- Type-safe keys for schema field accessClassNameErrorKeys- Type-safe keys for error handling with nested field support$ClassNameValidate()- Validation function with optionalfromJsondeserialization
See the documentation for more information.
Libraries
- builder
- checkers
- errors/unsupported_type_error
- generators/luthor_generator
- helpers/validations/base_validations
- helpers/validations/custom_validations
- helpers/validations/double_validations
- helpers/validations/int_validations
- helpers/validations/number_validations
- helpers/validations/string_validations