소스 검색

适配第三方插件

kidd3166 1 년 전
부모
커밋
b50535f42c
3개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 0
      lib/provider/bluetooth.dart
  2. 2 0
      lib/provider/message_model.dart
  3. 1 1
      pubspec.yaml

+ 1 - 0
lib/provider/bluetooth.dart

@@ -558,6 +558,7 @@ class Bluetooth with InjectApi, GameLog {
               })
               })
                 ..onError((e) {
                 ..onError((e) {
                   print("bluetooth -- subscribe notify e -> $e");
                   print("bluetooth -- subscribe notify e -> $e");
+                  disconnectDevice("订阅服务失败");
                 }));
                 }));
             }
             }
 
 

+ 2 - 0
lib/provider/message_model.dart

@@ -187,6 +187,8 @@ class MessageModel extends ChangeNotifier with InjectApi {
       onNotificationMessageArrived: (Map<String, dynamic> event) async {
       onNotificationMessageArrived: (Map<String, dynamic> event) async {
         print("flutter onNotificationMessageArrived: $event");
         print("flutter onNotificationMessageArrived: $event");
       },
       },
+      // onGrantAuthorization: (String res) async {  },
+      // onTransmitUserMessageReceive: (Map<String, dynamic> event) async{  },
     );
     );
 
 
     if (Platform.isAndroid) {
     if (Platform.isAndroid) {

+ 1 - 1
pubspec.yaml

@@ -94,7 +94,7 @@ dependencies:
   just_audio: any
   just_audio: any
 
 
 # 推送服务
 # 推送服务
-  getuiflut: ^0.2.13
+  getuiflut: 0.2.13
   umeng_common_sdk: 1.2.4
   umeng_common_sdk: 1.2.4
 
 
   amap_flutter_map:
   amap_flutter_map: