clone method Null safety

SoundLoadOptions clone()

Create a deep clone of this SoundLoadOptions.

Implementation

SoundLoadOptions clone() {
  final options = SoundLoadOptions();
  final urls = alternativeUrls;
  options.mp3 = mp3;
  options.mp4 = mp4;
  options.ogg = ogg;
  options.opus = opus;
  options.ac3 = ac3;
  options.wav = wav;
  options.engine = engine;
  options.alternativeUrls = urls?.toList();
  options.ignoreErrors = ignoreErrors;
  options.corsEnabled = corsEnabled;
  return options;
}