zema 0.2.0 copy "zema: ^0.2.0" to clipboard
zema: ^0.2.0 copied to clipboard

A high-performance, type-safe schema validation library for Dart & Flutter.

Zema #

pub package package publisher License: MIT

Zema is a Dart validation library inspired by Zod, with best-in-class type inference and zero-cost abstractions.

Features #

  • 🎯 100% Type-Safe: Full generic inference, no dynamic
  • ⚑ Zero-Cost Abstractions: final class + const singletons
  • πŸ”₯ Dart 3.5+ Native: Records, pattern matching, sealed classes
  • 🌊 Fluent API: Chainable like Zod
  • πŸ“Š Multi-Error Collection: See all validation errors at once
  • πŸ”„ Coercion System: Parse environment variables effortlessly
  • ⚑ Async Support: refineAsync for database checks

πŸš€ Quick Start #

dependencies:
  zema: ^0.1.0
import 'package:zema/zema.dart';

final userSchema = z.object({
  'name': z.string().min(2),
  'email': z.string().email(),
  'age': z.number().positive().optional(),
});

final user = userSchema.parse({
  'name': 'John',
  'email': 'john@example.com',
  'age': 30,
});

πŸ“š Documentation #

πŸ“„ License #

MIT License - see LICENSE

1
likes
0
points
26
downloads

Publisher

verified publishermeragix.dev

Weekly Downloads

A high-performance, type-safe schema validation library for Dart & Flutter.

Repository (GitHub)
View/report issues

Topics

#validation #schema #parsing #zod #type-safe

License

unknown (license)

Dependencies

meta

More

Packages that depend on zema