|
|
@@ -1,6 +1,7 @@
|
|
|
import 'package:custom_notification/custom_notification.dart';
|
|
|
import 'package:electronic_assistant/module/talk/view.dart';
|
|
|
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
|
|
|
+import 'package:get/get.dart';
|
|
|
|
|
|
class NotificationUtil {
|
|
|
NotificationUtil._();
|
|
|
@@ -16,9 +17,11 @@ class NotificationUtil {
|
|
|
static void showRecordNotification(
|
|
|
int notificationId, bool isRecording, double recordDuration,
|
|
|
{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;
|