Support # and ? in file path on Android.
This commit is contained in:
parent
5147a52397
commit
ea4be9f9ad
2 changed files with 23 additions and 65 deletions
|
@ -196,8 +196,8 @@ class AudioPlayer {
|
|||
/// Loads audio media from a file and completes with the duration of that
|
||||
/// audio, or null if this call was interrupted by another call so [setUrl],
|
||||
/// [setFilePath] or [setAsset].
|
||||
Future<Duration> setFilePath(final String filePath) =>
|
||||
setUrl('file://$filePath');
|
||||
Future<Duration> setFilePath(final String filePath) => setUrl(
|
||||
Platform.isAndroid ? File(filePath).uri.toString() : 'file://$filePath');
|
||||
|
||||
/// Loads audio media from an asset and completes with the duration of that
|
||||
/// audio, or null if this call was interrupted by another call so [setUrl],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue