AckField class final

Overrides the inferred schema and/or presence for a class-first field.

schema must be a const tear-off of a top-level function returning an Ack schema. The generator validates the declaration and follows its expression. A no-op @AckField() is rejected.

Prefer @Optional() and @Required() for key presence. presence is deprecated and will be removed in 2.0.0.

Annotations
  • @Target.new({TargetKind.field})

Constructors

AckField({Object schema()?, @Deprecated('Use @Optional() or @Required(). AckField.presence will be removed in ' '2.0.0.') AckFieldPresence presence = AckFieldPresence.inferred})
Creates a field annotation.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
presence → AckFieldPresence
Presence override applied after constructor inference.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
schema → Object Function()?
Top-level schema-function tear-off followed by ack_generator.
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