SoundSpriteSegment getSegment(String name)

Source

SoundSpriteSegment getSegment(String name) {
  var segment = _segments.firstWhere((s) => s.name == name, orElse: null);
  if (segment == null) {
    throw new ArgumentError("SoundSpriteSegment not found: '$name'");
  } else {
    return segment;
  }
}