GrpcProtobufConvert class

Utility class that helps convert from common Dart classes to Protobuf standard classes.

Constructors

GrpcProtobufConvert()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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

Static Methods

fromDuration(Duration value) Duration
Converts a Protobuf Duration value to a Dart core Duration.
fromTimestamp(Timestamp value, {bool isUtc = true}) DateTime
Converts a Protobuf db.Timestamp value to a Dart core DateTime.
toDuration(Duration value) → Duration
Converts a Dart core Duration value to a Protobuf pb.Duration object.
toInt64(int value) → Int64
Converts a Dart native int value to an Int64. Note: this will not work properly on Web if there are more than 53 significant bits as native int values on Web only contain 53 significant bits vs the native 64 bits.
toTimestamp(DateTime value) → Timestamp
Converts a Dart core DateTime value to a Protobuf db.Timestamp object.