width method
Returns a dynamic width depending on a percentage from 0-100% width.
Implementation
double width(double percentage) {
if (percentage <= 0.0 || percentage > 100.1) {
throw 'percentage from 1-100%';
}
return MediaQuery.of(this).size.width * (percentage / 100);
}