Browse Source

Merge branch 'v1.0.4-ios' of git.atmob.com:Atmob-Flutter/ElectronicAssistant into v1.0.4-ios

# Conflicts:
#	pubspec.yaml
Destiny 1 year ago
parent
commit
eb7ef8d5f7
2 changed files with 7 additions and 4 deletions
  1. 1 1
      lib/data/consts/constants.dart
  2. 6 3
      lib/utils/notification_util.dart

+ 1 - 1
lib/data/consts/constants.dart

@@ -6,7 +6,7 @@ import '../../utils/common_utils.dart';
 class Constants {
 class Constants {
   Constants._();
   Constants._();
 
 
-  static const String env = envTest;
+  static const String env = envProd;
 
 
   static const String envDev = 'dev';
   static const String envDev = 'dev';
 
 

+ 6 - 3
lib/utils/notification_util.dart

@@ -1,6 +1,7 @@
 import 'package:custom_notification/custom_notification.dart';
 import 'package:custom_notification/custom_notification.dart';
 import 'package:electronic_assistant/module/talk/view.dart';
 import 'package:electronic_assistant/module/talk/view.dart';
 import 'package:flutter_local_notifications/flutter_local_notifications.dart';
 import 'package:flutter_local_notifications/flutter_local_notifications.dart';
+import 'package:get/get.dart';
 
 
 class NotificationUtil {
 class NotificationUtil {
   NotificationUtil._();
   NotificationUtil._();
@@ -16,9 +17,11 @@ class NotificationUtil {
   static void showRecordNotification(
   static void showRecordNotification(
       int notificationId, bool isRecording, double recordDuration,
       int notificationId, bool isRecording, double recordDuration,
       {required String channelId, required String channelName}) {
       {required String channelId, required String channelName}) {
-    CustomNotification.showRecordNotification(
-        notificationId, isRecording, formatDuration(recordDuration),
-        channelId: channelId, channelName: channelName);
+    if (GetPlatform.isAndroid) {
+      CustomNotification.showRecordNotification(
+          notificationId, isRecording, formatDuration(recordDuration),
+          channelId: channelId, channelName: channelName);
+    }
   }
   }
 
 
   static int _analyseNotificationId = 2000;
   static int _analyseNotificationId = 2000;