This commit is contained in:
hrxiang 2023-03-13 11:48:38 +08:00
parent 43afb8775a
commit 041d6656bc
2 changed files with 9 additions and 2 deletions

View File

@ -125,6 +125,7 @@ class ConversationManager {
}));
///
/// int.tryParse(count) ?? 0;
Future<dynamic> getTotalUnreadMsgCount({
String? operationID,
}) =>

View File

@ -1,4 +1,5 @@
import 'dart:developer';
import 'dart:io';
import 'package:flutter/services.dart';
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
@ -558,9 +559,14 @@ class IMManager {
'operationID': Utils.checkOperationID(operationID),
}));
///
Future setListenerForService(OnListenerForService listener) {
this._listenerForService = listener;
return _channel.invokeMethod('setListenerForService', _buildParam({}));
if (Platform.isAndroid) {
this._listenerForService = listener;
return _channel.invokeMethod('setListenerForService', _buildParam({}));
} else {
throw UnsupportedError("only supprot android platform");
}
}
MethodChannel get channel => _channel;