deviceName property

String get deviceName

Implementation

String get deviceName {
  if (attributes.containsKey(EIRType.CompleteLocalName)) {
    return utf8.decode(attributes[EIRType.CompleteLocalName]!);
  } else if (attributes.containsKey(EIRType.ShortenedLocalName)) {
    return utf8.decode(attributes[EIRType.ShortenedLocalName]!);
  } else {
    return "";
  }
}
set deviceName (String deviceName)

Implementation

set deviceName(String deviceName) {
  attributes[EIRType.CompleteLocalName] =
      utf8.encode(deviceName) as Uint8List;
  if (attributes.containsKey(EIRType.ShortenedLocalName)) {
    attributes.remove(EIRType.ShortenedLocalName);
  }
}