A meshcore:// link sent in a text or a chat can open the stock MeshCore
app instead of Offband, since both answer it. Links meant to be sent now
use https://offband.app/add/..., which Android opens in Offband once the
domain verifies (#1309). QR codes stay meshcore://, so the stock app can
still scan an Offband QR.
- The channel QR dialog gets a Copy link button that copies the https
link. The My contact QR dialog shows and copies it.
- Channel.fromShareUri and Contact.fromShareUri read both forms, so the
router, the add-contact paste field and the QR scanners all do.
- The form conversion moves to lib/helpers/share_link_forms.dart, so the
models can use it. A path typed in mixed case reads the same.
- The router holds a contact link as received; the dialog reads either
form.
- New strings "Copy link" and "Channel link copied", English only for
now.
Agent: StormyElk (session 088ce922)
Both halves of the visual exchange, sharing one format and one parser.
Render: showMyContactQrDialog puts this device's own identity on screen
as a QR plus the same link as selectable, copyable text. It refuses to
render when not connected, since an empty key would encode a QR nobody
can add.
Scan: ContactQrScannerScreen validates with Contact.isValidShareUri, the
same check the paste path uses, and pops the raw string. The add dialog
routes a scan through the same handler as a paste, so a QR gets no
separate code path.
The scan affordance is gated to platforms mobile_scanner supports
(Android, iOS, macOS, web). On Windows and Linux the QR half is the
render side, which is the better desktop flow anyway: put your code on
the big screen and let the other person scan it with a phone.
Fixes a real defect found by the new test, not a test artifact:
QrCodeDisplay built its QrImageView through a LayoutBuilder, which
cannot answer intrinsic dimension queries, so any intrinsic-measuring
parent threw. AlertDialog measures its content's max intrinsic height,
so the dialog crashed on open. The QR is now bounded by a tight
SizedBox, which answers the intrinsic itself. This was the widget's
first real call site, so the bug had never been exercised.
Entry point is provisional alongside Add by key; #632 reorganises.
Epic #619.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
formats all dart files using `dart format .` from the root project dir
this makes the code style repeatable by new contributors and makes PR review easier
- Implement Community model for managing community data, including secret handling and PSK derivation.
- Create CommunityQrScannerScreen for scanning and joining communities via QR codes.
- Develop CommunityStore for persisting community data using SharedPreferences.
- Introduce QrCodeDisplay widget for displaying QR codes with customizable options.
- Add QrScannerWidget for reusable QR code scanning functionality with validation and controls.