FieldInfo<T> class Null safety

An object representing a protobuf message field.

Implementers

Constructors

FieldInfo(String name, int tagNumber, int? index, int type, {dynamic defaultOrMaker, CreateBuilderFunc? subBuilder, ValueOfFunc? valueOf, List<ProtobufEnum>? enumValues, ProtobufEnum? defaultEnumValue, String? protoName})
FieldInfo.dummy(int? index)
FieldInfo.repeated(String name, int tagNumber, int? index, int type, CheckFunc<T>? check, CreateBuilderFunc? subBuilder, {ValueOfFunc? valueOf, List<ProtobufEnum>? enumValues, ProtobufEnum? defaultEnumValue, String? protoName})

Properties

check CheckFunc<T>?
Function to verify when adding items to a repeated field.
final
defaultEnumValue ProtobufEnum?
Default enum value.
final
enumValues List<ProtobufEnum>?
List of all enum values.
final
hashCode int
The hash code for this object.
read-onlyinherited
index int?
Index of the field in _FieldSet._values list of this field's message.
final
isEnum bool
read-only
isGroupOrMessage bool
read-only
isMapField bool
read-only
isRepeated bool
read-only
isRequired bool
read-only
makeDefault MakeDefaultFunc?
Constructs the default value of a field.
final
name String
Name of this field as the json_name reported by protoc.
final
protoName String
Name of this field as written in the proto definition.
read-only
readonlyDefault → dynamic
Returns a read-only default value for a field. Unlike GeneratedMessage.getField, doesn't create a repeated field.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
subBuilder CreateBuilderFunc?
Creates an empty message or group when decoding a message.
final
tagNumber int
Field number as specified in the proto definition.
final
type int
Type of this field. See PbFieldType.
final
valueOf ValueOfFunc?
Mapping from enum integer values to enum values.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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

Static Methods

findMakeDefault(int type, dynamic defaultOrMaker) MakeDefaultFunc?