Barcode.fromNative constructor

Barcode.fromNative(
  1. Map data
)

Create a Barcode from native data.

Implementation

Barcode.fromNative(Map data)
    : corners = toCorners(
        (data['corners'] as List?)?.cast<Map<Object?, Object?>>(),
      ),
      format = toFormat(data['format'] as int),
      rawBytes = data['rawBytes'] as Uint8List?,
      rawValue = data['rawValue'] as String?,
      displayValue = data['displayValue'] as String?,
      type = BarcodeType.values[data['type'] as int],
      calendarEvent = toCalendarEvent(data['calendarEvent'] as Map?),
      contactInfo = toContactInfo(data['contactInfo'] as Map?),
      driverLicense = toDriverLicense(data['driverLicense'] as Map?),
      email = toEmail(data['email'] as Map?),
      geoPoint = toGeoPoint(data['geoPoint'] as Map?),
      phone = toPhone(data['phone'] as Map?),
      sms = toSMS(data['sms'] as Map?),
      url = toUrl(data['url'] as Map?),
      wifi = toWiFi(data['wifi'] as Map?);