fromString method
Implementation
double fromString(String size) {
if (size == "3") {
return 0.3;
} else if (size == "4") {
return 0.4;
} else if (size == "5") {
return 0.5;
} else if (size == "6") {
return 0.6;
} else if (size == "7") {
return 0.7;
} else if (size == "8") {
return 0.8;
} else if (size == "9") {
return 0.9;
} else if (size == "10") {
return 1.0;
} else if (size == "none") {
return 0.0;
} else if (size == "tight") {
return 0.6;
} else if (size == "snug") {
return 0.8;
} else if (size == "normal") {
return 1.0;
} else if (size == "relaxed") {
return 1.5;
} else if (size == "loose") {
return 1.8;
}
return 16.0;
}