Future<AudioPlayer> playLocalAsset() async { AudioCache cache = new AudioCache(); return await cache.play("myCustomSoundEffect.mp3");}
void playRemoteFile() { AudioPlayer player = new AudioPlayer(); player.play("https://bit.ly/2CH50TO");}
import 'package:audioplayers/audio_cache.dart';import 'package:audioplayers/audioplayers.dart';
assets: - assets/myCustomSoundEffect.mp3