StructGenerationSchema class final

Schema for structured objects with named properties.

Generated automatically for classes annotated with @Generable.

@Generable(description: "A user profile")
class UserProfile {
  @Guide(description: "The user's full name")
  final String name;

  @Guide(description: "Age in years")
  final int age;

  UserProfile({required this.name, required this.age});
}
Inheritance

Constructors

StructGenerationSchema({required String name, String? description, required List<DynamicGenerationSchemaProperty> properties})
Creates a struct schema.

Properties

description → String?
Optional description for the model.
final
hashCode → int
The hash code for this object.
no setterinherited
name → String
The name of this struct type.
final
properties → List<DynamicGenerationSchemaProperty>
The properties of this struct.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts this schema to JSON.
override
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited