LineItem class

Source SDK

Overview:

  • Generates AES-256-CBC encrypted payloads containing transaction and merchant objects. Payload bytes are IV (16) + ciphertext and encoded using base64url for transport inside the QR.
  • Source.instance.present(...) returns an embeddable Widget that renders a QR encoding the AES-encrypted payload (the merchant + transaction). For convenience the encrypted payload is placed inside a web URL wrapper so users without the Source app can open the page on the web; tapping the provided action attempts the app-scheme URI first and otherwise opens the web URL.
  • You can provide an encryptionKey, or the SDK will generate a secure 32-byte key and persist it. Simple transaction model used in payloads. Line item model describing individual purchasable items.

Constructors

LineItem({required String id, required String name, required int quantity, required int unitAmount, String? currency, Map<String, dynamic>? metadata})

Properties

currency → String?
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
final
metadata → Map<String, dynamic>?
final
name → String
final
quantity → int
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
unitAmount → int
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

fromJson(Map<String, dynamic> j) → LineItem