from static method

MiFareIos? from(
  1. NfcTag tag
)

Creates an instance of this class for the given tag.

Returns null if the tag is not compatible.

Implementation

static MiFareIos? from(NfcTag tag) {
  // ignore: invalid_use_of_protected_member
  final data = tag.data as TagPigeon?;
  final tech = data?.miFare;
  if (data == null || tech == null) return null;
  return MiFareIos._(
    data.handle,
    identifier: tech.identifier,
    mifareFamily: MiFareFamilyIos.values.byName(tech.mifareFamily.name),
    historicalBytes: tech.historicalBytes,
  );
}