DVProtocolField class

A model field or a function parameter.

type is the Dart type as written, nullability included: String? and String are different contracts, because an old client that reads a non-null field breaks the first time it is handed a null.

Constructors

DVProtocolField(String name, String type, {bool hasDefault = false, String? renamedFrom})
const

Properties

hasDefault → bool
Whether the declaration supplies a default, so a caller that does not send it still produces a value.
final
hashCode → int
The hash code for this object.
no setterinherited
name → String
final
nullable → bool
no setter
renamedFrom → String?
The name this field had before a rename. A rename without it reads as a removal and an addition, which is a lossy change; with it, an adapter can serve the old name.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → String
final

Methods

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

Operators

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

Static Methods

fromJson(Map<String, Object?> json) → DVProtocolField