import 'package:luthor/luthor.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
part 'int_schema.freezed.dart';
part 'int_schema.g.dart';
abstract class IntSchema with _$IntSchema {
const factory IntSchema({
factory IntSchema.fromJson(Map<String, dynamic> json) =>
_$IntSchemaFromJson(json);
final result = $IntSchemaValidate({'value': 42});
case SchemaValidationSuccess(data: final data):
print('✅ Valid: ${data.value}');
case SchemaValidationError(errors: final errors):
print('❌ Errors: $errors');