start method
Initial playback. Preloaded playback information
url
: Playback address, network
address or asset
address.
title
: Notification play title
desc
: Notification details; cover
: cover image address, network
address, or asset
address;
auto
: Whether to play automatically, default is true;
Implementation
Future<String> start(String url, String title,
{required String desc, required String cover, bool? auto}) async {
if (url.isEmpty) return "[url] can not be null or empty";
if (title.isEmpty) return "[title] can not be null or empty";
cover = cover;
desc = desc;
_info = AudioInfo(url, title: title, desc: desc, coverUrl: cover);
_audioList.insert(0, _info!);
return await play(index: 0, auto: auto);
}