获取通话记录
This commit is contained in:
27
lib/common/channel/channel_event.dart
Normal file
27
lib/common/channel/channel_event.dart
Normal file
@@ -0,0 +1,27 @@
|
||||
import 'package:cashier_reserve/common/print/print.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'names.dart';
|
||||
|
||||
class MyEventChannel {
|
||||
static void startListener() {
|
||||
onGetCallLogResult();
|
||||
}
|
||||
|
||||
static void onGetCallLogResult() {
|
||||
EventChannel channel = EventChannel(getChannelName(kCallLogCallback));
|
||||
channel.receiveBroadcastStream().listen((Object? o) {
|
||||
yjPrint("onGetCallLogResult");
|
||||
yjPrint(o);
|
||||
// AlipayPayResultEvent event = AlipayPayResultEvent();
|
||||
// if (o is int) {
|
||||
// event.resultStatus = o;
|
||||
// } else {
|
||||
// event.resultStatus = int.parse(o as String);
|
||||
// }
|
||||
// EventManager.postEvent(event);
|
||||
}, onError: (Object error) {
|
||||
yjPrint("onGetCallLogResult error");
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user