SmartPosterRecord class
A smart poster: a URI with a human-readable title and an optional action, all packed into one record whose payload is itself an NDEF message.
This is the record type a printed NFC poster uses. It needs the wire codec in both directions, which is why it only became expressible once NdefMessage gained one.
Properties
- action → SmartPosterAction?
-
What the reader should do, when the poster says.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → ({Uint8List data, String mimeType})?
-
An icon, as raw bytes with its MIME type, when the poster carries one.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
titles
→ Map<
String, String> -
Titles by language code. A poster may carry one per language.
final
- uri → Uri
-
The URI the poster points at.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
title(
{String languageCode = 'en'}) → String? -
The title in
languageCode, falling back to any title the poster has. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
create(
{required Uri uri, String? title, String titleLanguageCode = 'en', SmartPosterAction? action, String? iconMimeType, Uint8List? iconData}) → NdefRecord - Builds a smart poster record.
-
from(
NdefRecord record) → SmartPosterRecord? -
Reads
recordas a smart poster, or returns null when it is not one or is malformed.