length method

  1. @override
int length(
  1. T value
)
override

Returns the byte length of the PayloadType with the given value.

Is used to calculate the next offset when setting and getting data.

Implementation

@override
int length(T value) => _fields.fold(0, (p, f) => p + f.length(value));