Add missing icyMetadata parameter

This commit is contained in:
Ryan Heise 2020-04-22 12:11:15 +10:00
parent 45890896ff
commit 4a5c885d6e
2 changed files with 29 additions and 67 deletions

View File

@ -1,20 +1,6 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
archive:
dependency: transitive
description:
name: archive
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.13"
args:
dependency: transitive
description:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.0"
async:
dependency: transitive
description:
@ -36,6 +22,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.3"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
collection:
dependency: transitive
description:
@ -43,20 +36,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
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.4"
cupertino_icons:
dependency: "direct main"
description:
@ -64,6 +43,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.2"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
flutter:
dependency: "direct main"
description: flutter
@ -79,20 +65,13 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
image:
dependency: transitive
description:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.12"
just_audio:
dependency: "direct dev"
description:
path: ".."
relative: true
source: path
version: "0.1.5"
version: "0.1.6"
matcher:
dependency: transitive
description:
@ -113,7 +92,7 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.4"
version: "1.7.0"
path_provider:
dependency: transitive
description:
@ -121,13 +100,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.1"
petitparser:
dependency: transitive
description:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
platform:
dependency: transitive
description:
@ -135,13 +107,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.1"
quiver:
dependency: transitive
description:
name: quiver
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
rxdart:
dependency: "direct main"
description:
@ -210,13 +175,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.8"
xml:
dependency: transitive
description:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "3.6.1"
sdks:
dart: ">=2.6.0 <3.0.0"
flutter: ">=1.12.8 <2.0.0"

View File

@ -119,15 +119,17 @@ class AudioPlayer {
bufferedPosition: Duration(milliseconds: data[4]),
speed: _speed,
duration: _duration,
icyMetadata: data[5] == null ? null : IcyMetadata(
info: IcyInfo(title: data[5][0][0], url: data[5][0][1]),
headers: IcyHeaders(
bitrate: data[5][1][0],
genre: data[5][1][1],
name: data[5][1][2],
metadataInterval: data[5][1][3],
url: data[5][1][4],
isPublic: data[5][1][5])),
icyMetadata: data[5] == null
? null
: IcyMetadata(
info: IcyInfo(title: data[5][0][0], url: data[5][0][1]),
headers: IcyHeaders(
bitrate: data[5][1][0],
genre: data[5][1][1],
name: data[5][1][2],
metadataInterval: data[5][1][3],
url: data[5][1][4],
isPublic: data[5][1][5])),
));
_eventChannelStreamSubscription =
_eventChannelStream.listen(_playbackEventSubject.add);
@ -443,6 +445,7 @@ class AudioPlaybackEvent {
Duration bufferedPosition,
double speed,
Duration duration,
IcyMetadata icyMetadata,
}) =>
AudioPlaybackEvent(
state: state ?? this.state,
@ -452,6 +455,7 @@ class AudioPlaybackEvent {
bufferedPosition: bufferedPosition ?? this.bufferedPosition,
speed: speed ?? this.speed,
duration: duration ?? this.duration,
icyMetadata: icyMetadata ?? this.icyMetadata,
);
/// The current position of the player.