From 7ffc46438f380e6709c80260d3fc97044f1f7086 Mon Sep 17 00:00:00 2001 From: Janez T Date: Wed, 4 Mar 2026 19:21:43 +0100 Subject: [PATCH] fix: disable voice recording on web via kIsWeb guard --- lib/screens/messages_tab.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/screens/messages_tab.dart b/lib/screens/messages_tab.dart index a6b54ec..4619022 100644 --- a/lib/screens/messages_tab.dart +++ b/lib/screens/messages_tab.dart @@ -1,5 +1,6 @@ import 'dart:async'; import 'dart:io' show Platform; +import 'package:flutter/foundation.dart' show kIsWeb; import 'dart:math' as math; import 'dart:typed_data'; import 'package:flutter/material.dart'; @@ -67,7 +68,7 @@ class _MessagesTabState extends State { static const double _silenceRmsThreshold = 500.0; static const double _silencePeakThreshold = 1400.0; static const int _maxInteriorSilentChunks = 2; - bool get _voiceSupported => Platform.isIOS || Platform.isAndroid; + bool get _voiceSupported => !kIsWeb && (Platform.isIOS || Platform.isAndroid); StreamSubscription? _voiceStreamSub; String? _currentVoiceSessionId; final List _recordedChunks = [];