create static method

Future<Sound> create(
  1. String file,
  2. double scroll
)

Создание нового звука

Implementation

static Future<Sound> create(String file, double scroll) async {
  final sound = Sound(file: file);

  // Добавляем звуковую анимацию
  sound.animations.add(
    SoundAnimation(start: scroll.round(), end: scroll.round()),
  );

  return sound;
}