getBorderWidth method

double getBorderWidth({
  1. bool isFocused = false,
  2. bool hasError = false,
})

Get border width based on state

Implementation

double getBorderWidth({bool isFocused = false, bool hasError = false}) {
  if (hasError) return errorBorderWidth;
  if (isFocused) return focusedBorderWidth;
  return borderWidth;
}