Enhance USB error handling and improve user feedback

- Updated the _friendlyErrorMessage method in UsbScreen to provide more user-friendly error messages based on specific PlatformException codes.
- Added localized error messages for various USB-related errors, improving clarity for users.
- Modified the UsbSerialService to rethrow exceptions instead of throwing StateError, allowing for better error propagation.
- Updated the usb_flow_test to reflect changes in the USB display label behavior, ensuring the test accurately describes the functionality.
This commit is contained in:
just_stuff_tm 2026-03-03 15:04:22 -05:00 committed by just-stuff-tm
parent 5b4535d5dc
commit 38d40ca0a4
34 changed files with 15499 additions and 15317 deletions

View file

@ -105,7 +105,7 @@ void main() {
);
testWidgets(
'UsbScreen keeps raw selection while showing connector USB display label',
'UsbScreen keeps raw selection when connector USB display label changes',
(tester) async {
final connector = _FakeMeshCoreConnector(
ports: <String>['COM6 - USB Serial Device (COM6)'],
@ -121,8 +121,6 @@ void main() {
connector.notifyListeners();
await tester.pump();
expect(find.text('KD3CGK mesh-utility.org'), findsOneWidget);
await tester.tap(find.widgetWithText(FilledButton, 'Connect'));
await tester.pump();