diff --git a/audio_service/CHANGELOG.md b/audio_service/CHANGELOG.md index 9f82b9ba..8171b570 100644 --- a/audio_service/CHANGELOG.md +++ b/audio_service/CHANGELOG.md @@ -1,6 +1,6 @@ ## 0.18.16 -* Support for MPNowPlayingInfoPropertyIsLiveStream on IOS +* Support MPNowPlayingInfoPropertyIsLiveStream on IOS (@MuradSh, @celsoft). ## 0.18.15 diff --git a/audio_service_platform_interface/CHANGELOG.md b/audio_service_platform_interface/CHANGELOG.md index d36ba109..8df42811 100644 --- a/audio_service_platform_interface/CHANGELOG.md +++ b/audio_service_platform_interface/CHANGELOG.md @@ -1,15 +1,15 @@ ## 0.1.2 -* Support for MPNowPlayingInfoPropertyIsLiveStream on IOS +* Support MPNowPlayingInfoPropertyIsLiveStream on IOS (@MuradSh, @celsoft). ## 0.1.1 -* Add customAction to MediaControlMessage (@defsub) +* Add customAction to MediaControlMessage (@defsub). ## 0.1.0 -* Remove unused androidEnableQueue option -* Add setSpeed to MediaActionMessage enum (@nt4f04uNd) +* Remove unused androidEnableQueue option. +* Add setSpeed to MediaActionMessage enum (@nt4f04uNd). ## 0.0.1 diff --git a/audio_service_platform_interface/lib/audio_service_platform_interface.dart b/audio_service_platform_interface/lib/audio_service_platform_interface.dart index 7f95de97..d5af801b 100644 --- a/audio_service_platform_interface/lib/audio_service_platform_interface.dart +++ b/audio_service_platform_interface/lib/audio_service_platform_interface.dart @@ -1421,7 +1421,7 @@ class AudioServiceConfigMessage { 'androidNotificationChannelName': androidNotificationChannelName, 'androidNotificationChannelDescription': androidNotificationChannelDescription, - 'notificationColor': notificationColor?.value, + 'notificationColor': notificationColor?._colorValue, 'androidNotificationIcon': androidNotificationIcon, 'androidShowNotificationBadge': androidShowNotificationBadge, 'androidNotificationClickStartsActivity': @@ -1444,3 +1444,14 @@ class AudioServiceConfigMessage { @pragma('vm:prefer-inline') Map? _castMap(Map? map) => map?.cast(); + +/// Reimplements deprecated Color.value. +extension _ColorExtension on Color { + int get _colorValue => + _floatToInt8(a) << 24 | + _floatToInt8(r) << 16 | + _floatToInt8(g) << 8 | + _floatToInt8(b) << 0; + + int _floatToInt8(double x) => (x * 255.0).round() & 0xff; +}