feat: add sendDtmf method to send DTMF tones during a call

This commit is contained in:
Andrew 2026-03-30 09:28:40 +07:00
parent b95baa6799
commit f64284f963
9 changed files with 84 additions and 1 deletions

View file

@ -70,4 +70,7 @@ class LiblinphoneFlutter {
Future<void> syncCurrentState() async =>
LiblinphoneFlutterPlatform.instance.syncCurrentState();
Future<bool> sendDtmf(String tone) async =>
LiblinphoneFlutterPlatform.instance.sendDtmf(tone);
}

View file

@ -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,
}))!;
}
}

View file

@ -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.');
}
}