Skip to content

Commit 1985bae

Browse files
committed
fix(web): change twilio device.state js stub to getter
1 parent 9a4253d commit 1985bae

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

lib/_internal/js/device/device.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ class Device extends Twilio {
8585

8686
/// Get current call status, see [DeviceState]
8787
/// Documentation: https://www.twilio.com/docs/voice/sdks/javascript/twiliodevice#devicestate
88-
@JS("status")
89-
external String state();
88+
@JS("state")
89+
external String get state;
9090

9191
/// Update the device's access token.
9292
/// Documentation: https://www.twilio.com/docs/voice/sdks/javascript/twiliodevice#deviceupdatetokentoken

lib/_internal/twilio_voice_web.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,8 +564,7 @@ class TwilioVoiceWeb extends MethodChannelTwilioVoice {
564564
}
565565

566566
DeviceState getDeviceState(twilio_js.Device device) {
567-
final status = device.state();
568-
return parseDeviceState(status);
567+
return parseDeviceState(device.state);
569568
}
570569
}
571570

0 commit comments

Comments
 (0)