diff --git a/CHANGELOG.md b/CHANGELOG.md index d0d237e..9b02cb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.3 + +* Fix AVAudioSession() method handler throwing when arguments where null (@snipd-mikel). + ## 0.2.2 * Run setCategory in a thread on iOS to avoid jank (@MinseokKang003). diff --git a/lib/src/darwin.dart b/lib/src/darwin.dart index 49c46ae..bb84907 100644 --- a/lib/src/darwin.dart +++ b/lib/src/darwin.dart @@ -30,7 +30,9 @@ class AVAudioSession { AVAudioSession._() { _channel.setMethodCallHandler((MethodCall call) async { - final args = call.arguments as List; + final args = call.arguments == null + ? [] + : call.arguments as List; switch (call.method) { case 'onInterruptionEvent': _interruptionNotificationSubject