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
-
- @Target.new({TargetKind.classType})
Constructors
- AckModel({String? schemaName, 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
- 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
- jsonSerializable → JsonSerializable
-
Fixed phase-2 configuration consumed by
ack_generator.final - 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