From 8482c41057efd9c987fd4dec3f4e9222f2a7c7d5 Mon Sep 17 00:00:00 2001 From: Ryan Heise Date: Mon, 7 Dec 2020 19:06:04 +1100 Subject: [PATCH] Version 0.1.0-nullsafety.1 --- CHANGELOG.md | 4 ++++ example/pubspec.lock | 2 +- lib/src/android.dart | 2 +- lib/src/core.dart | 5 ++--- pubspec.yaml | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 813535a..87b1f60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.0-nullsafety.1 + +* Fix some static analysis errors. + ## 0.1.0-nullsafety.0 * Support null safety. diff --git a/example/pubspec.lock b/example/pubspec.lock index aa5a12d..98b3aa6 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -14,7 +14,7 @@ packages: path: ".." relative: true source: path - version: "0.1.0-nullsafety.0" + version: "0.1.0-nullsafety.1" boolean_selector: dependency: transitive description: diff --git a/lib/src/android.dart b/lib/src/android.dart index 5dad152..f37f10d 100644 --- a/lib/src/android.dart +++ b/lib/src/android.dart @@ -194,7 +194,7 @@ class AndroidAudioFocusRequest { this.audioAttributes, this.willPauseWhenDucked, this.onAudioFocusChanged, - }) : assert(gainType != null); + }); Map toJson() => { 'gainType': gainType.index, diff --git a/lib/src/core.dart b/lib/src/core.dart index 2cf90e8..cae8f9f 100644 --- a/lib/src/core.dart +++ b/lib/src/core.dart @@ -46,7 +46,7 @@ class AudioSession { final _becomingNoisyEventSubject = PublishSubject(); AudioSession._() { - _avAudioSession?.interruptionNotificationStream?.listen((notification) { + _avAudioSession?.interruptionNotificationStream.listen((notification) { switch (notification.type) { case AVAudioSessionInterruptionType.began: if (notification.wasSuspended != true) { @@ -114,7 +114,6 @@ class AudioSession { /// audio. However, you may also call this method afterwards to change the /// current configuration at any time. Future configure(AudioSessionConfiguration configuration) async { - assert(configuration != null); await _avAudioSession?.setCategory( configuration.avAudioSessionCategory, configuration.avAudioSessionCategoryOptions, @@ -251,7 +250,7 @@ class AudioSessionConfiguration { this.androidAudioAttributes, this.androidAudioFocusGainType = AndroidAudioFocusGainType.gain, this.androidWillPauseWhenDucked, - }) : assert(androidAudioFocusGainType != null); + }); AudioSessionConfiguration.fromJson(Map data) : this( diff --git a/pubspec.yaml b/pubspec.yaml index 209d2dc..9629337 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: audio_session description: Sets the iOS audio session category and Android audio attributes for your app, and manages your app's audio focus, mixing and ducking behaviour. -version: 0.1.0-nullsafety.0 +version: 0.1.0-nullsafety.1 homepage: https://github.com/ryanheise/audio_session environment: