Uuid.parse constructor

Uuid.parse(
  1. String uuid
)

Implementation

factory Uuid.parse(String uuid) {
  final buffer = Uint8List(16);
  var i = 0;
  for (var j = 0; j < uuid.length; j += 2) {
    if (uuid[j] == '-') {
      j++;
    }
    buffer[i++] = int.parse(uuid.substring(j, j + 2), radix: 16);
  }
  return Uuid(buffer);
}