fix: Show missed call notification method handler error#313
fix: Show missed call notification method handler error#313
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes the Flutter-to-native method channel invocation for missed call notification settings by correcting the invoked method name so the native handlers are reached.
Changes:
- Update
showMissedCallNotificationsto invoke the correct method channel name (showNotifications). - Add a CHANGELOG entry documenting the fix.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| lib/_internal/method_channel/twilio_voice_method_channel.dart | Corrects the method channel method name used by showMissedCallNotifications. |
| CHANGELOG.md | Documents the bug fix in the next release notes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| set showMissedCallNotifications(bool value) { | ||
| _channel.invokeMethod('show-notifications', <String, dynamic>{"show": value}); | ||
| _channel.invokeMethod('showNotifications', <String, dynamic>{"show": value}); | ||
| } |
There was a problem hiding this comment.
The Future returned by invokeMethod is discarded in this setter. If the platform call fails (e.g., not implemented or throws), it can surface as an unhandled asynchronous exception. Consider explicitly handling the Future (e.g., use unawaited(...) plus .catchError(...) / logging) so failures don’t crash or get lost silently.
| * Fix: [Web] Await Twilio Device `register()` and `unregister()` method calls. | ||
| * Fix: [Web] Prevent duplicate `TwilioVoiceWeb` instances. | ||
| * Feat: [iOS] Add support for call logging via `enableCallLogging(bool)` to record call in recents. No other platform currently supports this, see [NOTES.md](NOTES.md#limitations) for more details. | ||
| * Fix: `showMissedCallNotifications` method call not working due to incorrect method channel name. |
There was a problem hiding this comment.
There’s trailing whitespace at the end of this CHANGELOG entry (after the period). Please remove it to keep markdown diffs clean and avoid whitespace-only churn.
| * Fix: `showMissedCallNotifications` method call not working due to incorrect method channel name. | |
| * Fix: `showMissedCallNotifications` method call not working due to incorrect method channel name. |
Description
Addresses an issue where the
showMissedCallNotificationsmethod was not functioning correctly due to an incorrect method channel name. This correction ensures that missed call notifications are displayed as expected.Type of change
Please delete options that are not relevant.
Screenshots (if appropriate):