feat: add sendDtmf method to send DTMF tones during a call
This commit is contained in:
parent
b95baa6799
commit
f64284f963
9 changed files with 84 additions and 1 deletions
|
|
@ -70,4 +70,7 @@ class LiblinphoneFlutter {
|
|||
|
||||
Future<void> syncCurrentState() async =>
|
||||
LiblinphoneFlutterPlatform.instance.syncCurrentState();
|
||||
|
||||
Future<bool> sendDtmf(String tone) async =>
|
||||
LiblinphoneFlutterPlatform.instance.sendDtmf(tone);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,4 +89,11 @@ class MethodChannelLiblinphoneFlutter extends LiblinphoneFlutterPlatform {
|
|||
Future<bool> syncCurrentState() async {
|
||||
return (await methodChannel.invokeMethod<bool>('syncCurrentState'))!;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<bool> sendDtmf(String tone) async {
|
||||
return (await methodChannel.invokeMethod<bool>('sendDtmf', <String, dynamic>{
|
||||
'tone': tone,
|
||||
}))!;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,4 +81,8 @@ abstract class LiblinphoneFlutterPlatform extends PlatformInterface {
|
|||
Future<bool> syncCurrentState() {
|
||||
throw UnimplementedError('syncCurrentState() has not been implemented.');
|
||||
}
|
||||
|
||||
Future<bool> sendDtmf(String tone) {
|
||||
throw UnimplementedError('sendDtmf() has not been implemented.');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue