zema 0.3.0 copy "zema: ^0.3.0" to clipboard
zema: ^0.3.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

0
likes
160
points
327
downloads

Publisher

verified publishermeragix.dev

Weekly Downloads

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

Homepage
Repository (GitHub)
View/report issues

Topics

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

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

meta

More

Packages that depend on zema