PbMixin class

PbMixin contains metadata needed by dart-protoc-plugin to apply a mixin.

The mixin can be applied to a message using options in dart_options.proto. Only one mixin can be applied to each message, but that mixin can depend on another mixin, recursively, similar to single inheritance.

Constructors

PbMixin(String name, {required String importFrom, PbMixin? parent, List<String>? reservedNames, List<String>? injectedHelpers, bool hasProto3JsonHelpers = false})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
hasProto3JsonHelpers bool
Whether the mixin should have static methods for converting to and from proto3 Json.
final
importFrom String
The file that the .pb.dart file should import the symbol from.
final
injectedHelpers List<String>?
Code to inject into the class using the mixin.
final
name String
The name of the mixin class to import into the .pb.dart file.
final
parent PbMixin?
Another mixin to apply ahead of this one, or null for none.
final
reservedNames List<String>?
Names that shouldn't be used by properties in the generated child class. May be null if the mixin doesn't reserve any new names.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

findMixinsToApply() Iterable<PbMixin>
Returns the mixin and its ancestors, in the order they should be applied.
findReservedNames() Iterable<String>
Returns all the reserved names, including from ancestor mixins.
injectHelpers(IndentingWriter out) → void
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