Support # and ? in file path on Android.

This commit is contained in:
Ryan Heise 2020-04-21 20:26:53 +10:00
parent 5147a52397
commit ea4be9f9ad
2 changed files with 23 additions and 65 deletions

View File

@ -1,62 +1,41 @@
# Generated by pub # Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile # See https://dart.dev/tools/pub/glossary#lockfile
packages: packages:
archive:
dependency: transitive
description:
name: archive
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.11"
args:
dependency: transitive
description:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.2"
async: async:
dependency: transitive dependency: transitive
description: description:
name: async name: async
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.4.0" version: "2.4.1"
boolean_selector: boolean_selector:
dependency: transitive dependency: transitive
description: description:
name: boolean_selector name: boolean_selector
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.5" version: "2.0.0"
charcode: charcode:
dependency: transitive dependency: transitive
description: description:
name: charcode name: charcode
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.2" version: "1.1.3"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
collection: collection:
dependency: transitive dependency: transitive
description: description:
name: collection name: collection
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.14.11" version: "1.14.12"
convert:
dependency: transitive
description:
name: convert
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
crypto:
dependency: transitive
description:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
cupertino_icons: cupertino_icons:
dependency: "direct main" dependency: "direct main"
description: description:
@ -64,6 +43,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.1.2" version: "0.1.2"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
flutter: flutter:
dependency: "direct main" dependency: "direct main"
description: flutter description: flutter
@ -79,13 +65,6 @@ packages:
description: flutter description: flutter
source: sdk source: sdk
version: "0.0.0" version: "0.0.0"
image:
dependency: transitive
description:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.4"
just_audio: just_audio:
dependency: "direct dev" dependency: "direct dev"
description: description:
@ -113,7 +92,7 @@ packages:
name: path name: path
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.6.4" version: "1.7.0"
path_provider: path_provider:
dependency: transitive dependency: transitive
description: description:
@ -121,13 +100,6 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.5.1" version: "1.5.1"
petitparser:
dependency: transitive
description:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
platform: platform:
dependency: transitive dependency: transitive
description: description:
@ -135,13 +107,6 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.2.1" version: "2.2.1"
quiver:
dependency: transitive
description:
name: quiver
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.5"
rxdart: rxdart:
dependency: "direct main" dependency: "direct main"
description: description:
@ -160,7 +125,7 @@ packages:
name: source_span name: source_span
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.5.5" version: "1.7.0"
stack_trace: stack_trace:
dependency: transitive dependency: transitive
description: description:
@ -195,7 +160,7 @@ packages:
name: test_api name: test_api
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.2.14" version: "0.2.15"
typed_data: typed_data:
dependency: transitive dependency: transitive
description: description:
@ -210,13 +175,6 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.8" version: "2.0.8"
xml:
dependency: transitive
description:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "3.5.0"
sdks: sdks:
dart: ">=2.6.0 <3.0.0" dart: ">=2.6.0 <3.0.0"
flutter: ">=1.12.8 <2.0.0" flutter: ">=1.12.8 <2.0.0"

View File

@ -196,8 +196,8 @@ class AudioPlayer {
/// Loads audio media from a file and completes with the duration of that /// 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], /// audio, or null if this call was interrupted by another call so [setUrl],
/// [setFilePath] or [setAsset]. /// [setFilePath] or [setAsset].
Future<Duration> setFilePath(final String filePath) => Future<Duration> setFilePath(final String filePath) => setUrl(
setUrl('file://$filePath'); Platform.isAndroid ? File(filePath).uri.toString() : 'file://$filePath');
/// Loads audio media from an asset and completes with the duration of that /// 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], /// audio, or null if this call was interrupted by another call so [setUrl],