play method

Future<void> play (SystemSoundType type)

Play the specified system sound. If that sound is not present on the system, the call is ignored.

Implementation

static Future<void> play(SystemSoundType type) async {
  await SystemChannels.platform.invokeMethod<void>(
    'SystemSound.play',
    type.toString(),
  );
}