Skip to main content

ZodArt introduction

ZodArt is a type-safe, parse-first schema validation package with static type inference for Dart and Flutter.

Parse unstructured data from APIs, Flutter forms, config files, and more โ€” with type safety and static type inference. ZodArt provides a powerful and expressive API to define validation schemas and parse unknown data into strongly typed Dart values.

Featuresโ€‹

  • ๐Ÿ›ก๏ธ Rock-solid type safety with optional code generation (no more magic strings!)
  • ๐Ÿง  Static type inference
  • ๐Ÿงฑ Define schemas for both primitive and complex types
  • ๐Ÿ“ฆ Parse unknown or unstructured data into strongly typed Dart values
  • ๐Ÿค Seamless integration with freezed models
  • โ™ป๏ธ Composable and reusable schemas for easy code sharing and modularity
  • ๐Ÿงฉ Supports nested objects, arrays, optional and nullable fields
  • ๐Ÿ“ Built-in various validation rules (e.g. .min(), .max(), etc.)
  • ๐Ÿงช Support for user-defined custom rules via .refine()
  • ๐Ÿ’ฌ Rich, localizable, developer-friendly error messages
  • ๐ŸŒ Designed for use with REST APIs, GraphQL, JSON files, and form input

Comparisonโ€‹

โŒ Without ZodArtโœ… With Zodart
Without ZodArtWith ZodArt

You can check the planned features and report bugs or request features by opening an issue on the GitHub page.