plushie/widget/qr_code

QR code widget builder.

Types

pub type ErrorCorrection {
  Low
  Medium
  Quartile
  High
}

Constructors

  • Low
  • Medium
  • Quartile
  • High
pub opaque type QrCode

Values

pub fn a11y(qr: QrCode, a: a11y.A11y) -> QrCode

Set accessibility properties for this widget.

pub fn alt(qr: QrCode, a: String) -> QrCode

Set the alt text for accessibility.

pub fn background_color(qr: QrCode, c: color.Color) -> QrCode

Set the background color.

pub fn build(qr: QrCode) -> node.Node

Build the qr code into a renderable Node.

pub fn cell_color(qr: QrCode, c: color.Color) -> QrCode

Set the QR code cell color.

pub fn cell_size(qr: QrCode, s: Int) -> QrCode

Set the QR code cell size in pixels.

pub fn description(qr: QrCode, d: String) -> QrCode

Set the description text for accessibility.

pub fn error_correction(
  qr: QrCode,
  ec: ErrorCorrection,
) -> QrCode

Set the error correction level.

pub fn new(id: String, data: String) -> QrCode

Create a new qr code builder.

pub fn style(qr: QrCode, s: String) -> QrCode

Set the style.

Search Document