attributeToDouble method
Implementation
double attributeToDouble(String? attribute) {
if (attribute == '' || attribute == null || attribute == 'none') {
attribute = '0.0';
}
var allowedChars = [...digits, '+', '-', '.', 'e', 'E'];
var strippedAttribute = [
for (var char in attribute.split(''))
if (allowedChars.contains(char)) char
].join();
return double.parse(strippedAttribute);
}