feat: (for now android only!) method to get current call stats
This commit is contained in:
parent
82c1a3f96c
commit
94cbe1a2c5
6 changed files with 382 additions and 0 deletions
|
|
@ -2,6 +2,7 @@ import 'package:flutter/foundation.dart';
|
|||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'liblinphone_flutter_platform_interface.dart';
|
||||
import 'models/call_stats.dart';
|
||||
import 'models/call_type.dart';
|
||||
import 'models/dscp_values.dart';
|
||||
|
||||
|
|
@ -162,4 +163,16 @@ class MethodChannelLiblinphoneFlutter extends LiblinphoneFlutterPlatform {
|
|||
final values = DscpValues.fromJson(data);
|
||||
return values;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<CallStats?> getCurrentCallStats() async {
|
||||
final data = (await methodChannel.invokeMethod<Map<dynamic, dynamic>>(
|
||||
'getCurrentCallStats',
|
||||
));
|
||||
|
||||
if (data == null) return null;
|
||||
|
||||
final values = CallStats.fromJson(data);
|
||||
return values;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue