percentOf method

double percentOf(
  1. BoxConstraints constraints, {
  2. bool width = true,
})

Get percentage of constraints width

Implementation

double percentOf(BoxConstraints constraints, {bool width = true}) {
  return this * (width ? constraints.maxWidth : constraints.maxHeight) / 100;
}