calculateHeight static method

double calculateHeight({
  1. bool showTypesSelection = true,
  2. bool showDescriptionField = false,
  3. bool showCountyField = false,
  4. bool showCountryField = false,
})

Helper to calculate the height of the AddressInput widget

Implementation

static double calculateHeight({
  bool showTypesSelection = true,
  bool showDescriptionField = false,
  bool showCountyField = false,
  bool showCountryField = false,
}) {
  double totalHeight = 517.0;
  if (!showTypesSelection) {
    totalHeight -= 52.0;
  }
  if (!showDescriptionField) {
    totalHeight -= 85.0;
  }
  if (!showCountyField && !showCountryField) {
    totalHeight -= 85.0;
  }
  return totalHeight;
}