mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-07-18 06:36:12 +00:00
Push-to-talk voice messaging using the Codec2 ultra-low-bitrate speech codec, transmitted as V: prefixed packets over the existing MeshCore LoRa mesh pipeline. Voice recording UI (long-press send button or + menu) is gated behind Platform.isIOS || Platform.isMacOS since the `record` package only supports microphone capture on those platforms in this build. Key changes: - VoiceRecorderService: streams 8kHz mono PCM chunks via `record` package - VoicePlayerService: decodes Codec2 bytes to WAV and plays via audioplayers - VoiceCodecService: async Codec2 encode/decode in background isolates - VoiceProvider: reassembles multi-packet sessions, drives playback - VoiceMessageBubble: shows packet progress, play/stop controls - MessagesProvider: detects V: prefix, routes to VoiceProvider - MessagesTab: PTT long-press gesture + recording indicator (iOS/macOS) - Message model: isVoice + voiceId fields for session tracking - Auto-selects codec mode from radio bandwidth (700C/1200/1300 bps) - codec2_flutter + meshcore_client switched from path to git deps
34 lines
1.3 KiB
Dart
34 lines
1.3 KiB
Dart
// This is a basic Flutter widget test.
|
|
//
|
|
// To perform an interaction with a widget in your test, use the WidgetTester
|
|
// utility in the flutter_test package. For example, you can send tap and scroll
|
|
// gestures. You can also use WidgetTester to find child widgets in the widget
|
|
// tree, read text, and verify that the values of widget properties are correct.
|
|
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
|
|
import 'package:meshcore_sar_app/main.dart';
|
|
import 'package:meshcore_sar_app/screens/home_screen.dart';
|
|
import 'package:meshcore_sar_app/screens/welcome_wizard_screen.dart';
|
|
|
|
void main() {
|
|
testWidgets('App launches smoke test', (WidgetTester tester) async {
|
|
// Build app.
|
|
await tester.pumpWidget(const MeshCoreSarApp());
|
|
|
|
// During async initialization, loading indicator is shown.
|
|
expect(find.byType(CircularProgressIndicator), findsOneWidget);
|
|
|
|
// Give async startup a bounded amount of time without requiring full settle
|
|
// (the app may keep background animations/timers alive).
|
|
await tester.pump(const Duration(seconds: 2));
|
|
expect(
|
|
find.byType(CircularProgressIndicator).evaluate().isNotEmpty ||
|
|
find.byType(HomeScreen).evaluate().isNotEmpty ||
|
|
find.byType(WelcomeWizardScreen).evaluate().isNotEmpty,
|
|
isTrue,
|
|
);
|
|
});
|
|
}
|