feat: add contact UI helpers and path editor for routing management

- Implemented contactTypeIcon and contactTypeColor functions for better UI representation of contact types.
- Created colorForName and firstCharacterOrEmoji functions to enhance contact display.
- Developed PathEditorSheet widget for managing contact paths with a user-friendly interface.
- Introduced RoutingSheet for managing contact routing modes and displaying path history.
- Added a script for generating proof of concept (PoC) payloads for clipboard contact import validation.
This commit is contained in:
zjs81
2026-06-11 00:07:12 -07:00
parent 743ef7f124
commit cba1e5950c
86 changed files with 8149 additions and 6379 deletions
+4 -2
View File
@@ -123,11 +123,13 @@ void main() {
);
await tester.pumpAndSettle();
await tester.tap(find.widgetWithText(FloatingActionButton, 'TCP'));
final scannerContext = tester.element(find.byType(ScannerScreen));
final scannerL10n = AppLocalizations.of(scannerContext);
await tester.tap(find.byTooltip(scannerL10n.connectionChoiceTcpLabel));
await tester.pumpAndSettle();
expect(find.byType(TcpScreen), findsOneWidget);
await tester.tap(find.widgetWithText(FloatingActionButton, 'Bluetooth'));
await tester.tap(find.widgetWithText(OutlinedButton, 'Bluetooth'));
await tester.pumpAndSettle();
expect(find.byType(TcpScreen), findsNothing);
+13 -5
View File
@@ -157,10 +157,18 @@ void main() {
);
await tester.pumpAndSettle();
final context = tester.element(find.byType(ScannerScreen));
final l10n = AppLocalizations.of(context);
if (PlatformInfo.supportsUsbSerial) {
expect(find.widgetWithText(FloatingActionButton, 'USB'), findsOneWidget);
expect(
find.byTooltip(l10n.connectionChoiceUsbLabel),
findsOneWidget,
);
} else {
expect(find.widgetWithText(FloatingActionButton, 'USB'), findsNothing);
expect(
find.byTooltip(l10n.connectionChoiceUsbLabel),
findsNothing,
);
}
// ScannerScreen.dispose() schedules disconnect work that debounces notify.
@@ -186,13 +194,13 @@ void main() {
final context = tester.element(find.byType(ScannerScreen));
final l10n = AppLocalizations.of(context);
expect(find.text(l10n.scanner_scan), findsOneWidget);
expect(find.text(l10n.scanner_scan), findsWidgets);
if (PlatformInfo.supportsUsbSerial) {
expect(find.text(l10n.connectionChoiceUsbLabel), findsOneWidget);
expect(find.byTooltip(l10n.connectionChoiceUsbLabel), findsOneWidget);
}
if (!PlatformInfo.isWeb) {
expect(find.text(l10n.connectionChoiceTcpLabel), findsOneWidget);
expect(find.byTooltip(l10n.connectionChoiceTcpLabel), findsOneWidget);
}
await tester.pumpWidget(const SizedBox.shrink());