byteWidth property

int get byteWidth

Bytes per value; 0 for string and undefined.

Implementation

int get byteWidth => switch (this) {
  float32 => 4,
  double64 => 8,
  int8 => 1,
  int16 => 2,
  int32 => 4,
  int64 => 8,
  string || undefined => 0,
};