Browse Source

适配第三方插件

kidd3166 2 years ago
parent
commit
b50535f42c
3 changed files with 4 additions and 1 deletions
  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) {
                   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 {
         print("flutter onNotificationMessageArrived: $event");
       },
+      // onGrantAuthorization: (String res) async {  },
+      // onTransmitUserMessageReceive: (Map<String, dynamic> event) async{  },
     );
 
     if (Platform.isAndroid) {

+ 1 - 1
pubspec.yaml

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