getBytes static method

Uint8List getBytes(
  1. int c, [
  2. int? c2
])

Implementation

static Uint8List getBytes(int c, [int? c2]) {
  final isNull = c2 == null;

  final result = Uint8List(isNull ? 1 : 2);
  result[0] = c;
  if (!isNull) {
    result[1] = c2;
  }
  return result;
}