getDropdownBorderStyle static method
InputBorder?
getDropdownBorderStyle(
- BuildContext context, {
- UpStyle? override,
- UpStyle? style,
- UpInputType? type,
- UpColorType? colorType,
- bool isFocused = false,
- bool isError = false,
Implementation
static InputBorder? getDropdownBorderStyle(
BuildContext context, {
UpStyle? override,
UpStyle? style,
UpInputType? type,
UpColorType? colorType,
bool isFocused = false,
bool isError = false,
}) {
switch (type) {
case UpInputType.underline:
return UnderlineInputBorder(
borderSide: BorderSide(
color: isFocused
? UpStyle.getDropdownFocusedBorderColor(
context,
colorType: colorType,
style: style,
)
: isError
? UpStyle.getDropdownErrorBorderColor(
context,
colorType: colorType,
style: style,
)
: UpStyle.getDropdownBorderColor(
context,
colorType: colorType,
style: style,
),
width: UpStyle.getDropdownBorderWidth(
context,
colorType: colorType,
style: style,
),
),
borderRadius: BorderRadius.all(
Radius.circular(
UpStyle.getDropdownBorderRadius(
context,
style: style,
colorType: colorType,
),
),
),
);
case UpInputType.outline:
default:
return OutlineInputBorder(
borderSide: BorderSide(
color: isFocused
? UpStyle.getDropdownFocusedBorderColor(
context,
colorType: colorType,
style: style,
)
: isError
? UpStyle.getDropdownErrorBorderColor(
context,
colorType: colorType,
style: style,
)
: UpStyle.getDropdownBorderColor(
context,
colorType: colorType,
style: style,
),
width: UpStyle.getDropdownBorderWidth(
context,
colorType: colorType,
style: style,
),
),
borderRadius: BorderRadius.all(
Radius.circular(
UpStyle.getDropdownBorderRadius(
context,
style: style,
colorType: colorType,
),
),
),
);
}
}