flutter-webrtc / callkeep

iOS CallKit and Android ConnectionService for Flutter
MIT License
130 stars 139 forks source link

fix: null value cannot be cast to List<String> directly #127

Closed shomatan closed 2 years ago

shomatan commented 2 years ago

Hi. I am using the example code to create a test project. According to the example, the following is passed to the setup method,

      'ios': {
        'appName': 'CallKeepDemo',
      },
      'android': {
        'alertTitle': 'Permissions required',
        'alertDescription':
            'This application needs to access your phone accounts',
        'cancelButton': 'Cancel',
        'okButton': 'ok',
        'foregroundService': {
          'channelId': 'com.quando.synq.development',
          'channelName': 'Foreground service for my app',
          'notificationTitle': 'My app is running on background',
          'notificationIcon': 'Path to the resource icon of the notification',
        },
      },

If additionalPermissions parameter is not exist, I got a runtime error like the following:

package:callkeep/src/api.dart type 'Null' is not a subtype of type 'List' in type cast

I tried to fix it once, but I'm not sure if I'm using it wrong in the first place, or if you have any good advice, please let me know 🙇

Environments

cloudwebrtc commented 2 years ago

LGTM