AckModel class final
Marks a hand-written class for Ack schema generation.
The declaring library must include both generated parts, for example
part 'user.ack.dart'; and part 'user.ack.g.dart';. Instantiable models and
implicit sealed-union branches must be final class declarations, use only
final stored fields, and apply the generated _$ClassAck mixin. Annotated
sealed union bases remain supported.
- Annotations
-
- @Deprecated('Use @Schemable(). AckModel will be removed in 2.0.0.')
- @Target.new({TargetKind.classType})
Constructors
- AckModel({String? schemaName, String? description, AckCaseStyle caseStyle = AckCaseStyle.none, String? discriminatorKey, String? discriminatorValue, AckUnknownPropertyPolicy unknownProperties = AckUnknownPropertyPolicy.reject, String captureField = 'additionalProperties'})
-
Creates a class-first Ack model annotation.
const
Properties
- captureField → String
-
Dart field that stores captured unknown properties.
final
- caseStyle → AckCaseStyle
-
Naming convention applied to JSON field keys.
final
- description → String?
-
Schema description. This takes precedence over an
@descriptiondoc tag. Untagged documentation does not become a schema description.final - discriminatorKey → String?
-
Required discriminator key for an annotated sealed union base.
final
- discriminatorValue → String?
-
Wire discriminator for a concrete union branch.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- schemaName → String?
-
Exact public schema facade class name.
final
- unknownProperties → AckUnknownPropertyPolicy
-
Policy for undeclared object properties.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited