Infrastructure low complexity Shared Component mobile
0
Dependencies
1
Dependents
0
Entities
1
Integrations

Description

Utility wrapper around a Flutter QR code rendering package (e.g., qr_flutter). Accepts a referral URL string and returns a renderable QR code widget with configurable size and error correction level.

Feature: Membership Recruitment (Verving)

qr-code-generator

Summaries

The QR Code Generator enables peer mentors to share their referral identity through a universally recognised visual format, significantly lowering the barrier to in-person recruitment. Rather than asking a prospective member to type a URL or remember a code, a mentor can simply display or print their personalised QR code — making recruitment a natural part of face-to-face interactions at events, training sessions, or social gatherings. This frictionless sharing capability is a competitive differentiator that increases the volume and quality of referrals by enabling mentors to recruit in offline contexts where digital link sharing is impractical.

As a shared mobile utility component with low inherent complexity, the QR Code Generator is a fast win that unblocks multiple downstream features simultaneously, including the mentor profile screen and any print or export flows. The primary dependency is the qr_flutter package version alignment with the existing Flutter SDK; confirm package compatibility early to avoid integration issues. Because this component is shared across features, changes to its interface affect multiple consuming widgets — establish its public API signature before dependent features begin development. Testing should cover a range of URL lengths and verify that the exported image bytes render correctly on both iOS and Android share targets.

This is a thin wrapper around qr_flutter that exposes a stable interface insulating feature widgets from direct package API dependency. buildQrWidget returns a Flutter Widget subtree and should accept a BoxConstraints parameter or a fixed size double to support responsive layout contexts. exportAsImageBytes uses qr_flutter's toImageData() pipeline and should be run in an isolate for large sizes to avoid jank on the main thread. setErrorCorrectionLevel maps to qr_flutter's QrErrorCorrectLevel enum — default to Level.M (15% correction) for link URLs, which balances data density with scan reliability.

Branding colour support depends on qr_flutter's eyeStyle and dataModuleStyle parameters; expose these as optional named parameters with sensible defaults so feature teams can opt in without requiring changes to the core interface.

Responsibilities

  • Render QR code widget from a URL string
  • Support configurable size and padding
  • Export QR code as image bytes for sharing
  • Apply organisation branding colours where supported

Interfaces

buildQrWidget(url, size)
exportAsImageBytes(url, size)
setErrorCorrectionLevel(level)

Relationships

Dependents (1)

Components that depend on this component

Used Integrations (1)

External integrations and APIs this component relies on

API Contract

View full contract →
REST /api/v1/qr-codes 6 endpoints
GET /api/v1/qr-codes List generated QR code records
GET /api/v1/qr-codes/:id Get a QR code record by ID
POST /api/v1/qr-codes Build a QR widget for a referral URL (buildQrWidget)
PUT /api/v1/qr-codes/:id Update QR code settings (setErrorCorrectionLevel)
DELETE /api/v1/qr-codes/:id Delete a QR code record
POST /api/v1/qr-codes/export Export QR code as image bytes (exportAsImageBytes)