AssetAudioSource constructor

AssetAudioSource({
  1. required String assetPath,
  2. String? title,
  3. String? artist,
  4. String? album,
  5. String? artUri,
  6. String? genre,
  7. int? trackNumber,
  8. int? trackCount,
  9. int? year,
})

Creates an audio source from an asset

Implementation

AssetAudioSource({
  required this.assetPath,
  String? title,
  super.artist,
  super.album,
  super.artUri,
  super.genre,
  super.trackNumber,
  super.trackCount,
  super.year,
}) : super(
       uri: Uri.parse('asset:///$assetPath'),
       title: title ?? path.basenameWithoutExtension(assetPath),
     );