eopeter / flutter_twilio_voice

BSD 3-Clause "New" or "Revised" License
14 stars 22 forks source link

Exception #10

Open victor-padovam opened 2 years ago

victor-padovam commented 2 years ago

My function :

onPressed: () async {
                    FlutterTwilioVoice.phoneCallEventSubscription
                        .listen(_onEvent, onError: _onError);
                    FlutterTwilioVoice.receiveCalls(_fromController.text);
                    FlutterTwilioVoice.makeCall(
                      from: '+16789091622',
                      to: _toController.text,
                      accessTokenUrl:
                          "https://twillio-voice-prova.000webhostapp.com/voice-server-twilio-php/accessToken.php",
                      toDisplayName: "James Bond",
                    );
                  },

Exception:

════════ Exception caught by services library ══════════════════════════════════
MissingPluginException(No implementation found for method listen on channel flutter_twilio_voice)
════════════════════════════════════════════════════════════════════════════════
E/flutter (28315): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: MissingPluginException(No implementation found for method makeCall on channel flutter_twilio_voice)
E/flutter (28315): #0      MethodChannel._invokeMethod
package:flutter/…/services/platform_channel.dart:156
E/flutter (28315): <asynchronous suspension>
E/flutter (28315): #1      FlutterTwilioVoice.makeCall
package:flutter_twilio_voice/flutter_twilio_voice.dart:34
E/flutter (28315): <asynchronous suspension>
E/flutter (28315):

problem in : ( .listen(_onEvent, onError: _onError);)

void _onEvent(Object event)
package:twilio_voice_example/pages/voice_external.dart

The argument type 'void Function(Object)' can't be assigned to the parameter type 'void Function(dynamic)?'
victor-padovam commented 2 years ago

any solutions ?