Field class final
A single field of a message type.
New usages of this message as an alternative to FieldDescriptorProto are strongly discouraged. This message does not reliability preserve all information necessary to model the schema and preserve semantics. Instead make use of FileDescriptorSet which preserves the necessary information.
- Inheritance
-
- Object
- ProtoMessage
- Field
Constructors
-
Field({Field_Kind kind = Field_Kind.$default, Field_Cardinality cardinality = Field_Cardinality.$default, int number = 0, String name = '', String typeUrl = '', int oneofIndex = 0, bool packed = false, List<
Option> options = const [], String jsonName = '', String defaultValue = ''}) - Field.fromJson(Object? j)
-
factory
Properties
- cardinality → Field_Cardinality
-
The field cardinality.
final
- defaultValue → String
-
The string value of the default value of this field. Proto2 syntax only.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- jsonName → String
-
The field JSON name.
final
- kind → Field_Kind
-
The field type.
final
- name → String
-
The field name.
final
- number → int
-
The field number.
final
- oneofIndex → int
-
The index of the field type in
Type.oneofs, for message or enumeration types. The first type has index 1; zero means the type is not in the list.final -
options
→ List<
Option> -
The protocol buffer options.
final
- packed → bool
-
Whether to use alternative packed wire representation.
final
- qualifiedName → String
-
The fully qualified name of this message, i.e.,
google.protobuf.Durationorgoogle.rpc.ErrorInfo.finalinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- typeUrl → String
-
The field type URL, without the scheme, for message or enumeration
types. Example:
"type.googleapis.com/google.protobuf.Timestamp".final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Object -
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- fullyQualifiedName → const String