fromInt static method
Converts an integer containing bitwise representations into a list of enum values.
This method interprets the bitwise properties set in the input integer and returns a list of corresponding
BleCharacteristicProperty values. The value
parameter is an integer bitmask representing the set properties.
Returns a list of BleCharacteristicProperty representing the properties in the bitmask.
Implementation
static List<BleCharacteristicProperty> fromInt(int value) {
final List<BleCharacteristicProperty> propertiesList = [];
for (final BleCharacteristicProperty property
in BleCharacteristicProperty.values) {
if ((value & property.value) != 0) {
propertiesList.add(property);
}
}
return propertiesList;
}