getTextfieldBorderStyle static method
InputBorder?
getTextfieldBorderStyle(
- BuildContext context, {
- UpStyle? override,
- UpStyle? style,
- UpInputType? type,
- UpColorType? colorType,
- bool isFocused = false,
- bool isError = false,
Implementation
static InputBorder? getTextfieldBorderStyle(
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.getTextfieldFocusedBorderColor(
context,
colorType: colorType,
style: style,
)
: isError
? UpStyle.getTextfieldErrorBorderColor(
context,
colorType: colorType,
style: style,
)
: UpStyle.getTextfieldBorderColor(
context,
colorType: colorType,
style: style,
),
width: UpStyle.getTextfieldBorderWidth(
context,
colorType: colorType,
style: style,
),
),
borderRadius: BorderRadius.all(
Radius.circular(
UpStyle.getTextfieldBorderRadius(
context,
style: style,
colorType: colorType,
),
),
),
);
case UpInputType.outline:
default:
return OutlineInputBorder(
borderSide: BorderSide(
color: isFocused
? UpStyle.getTextfieldFocusedBorderColor(
context,
colorType: colorType,
style: style,
)
: isError
? UpStyle.getTextfieldErrorBorderColor(
context,
colorType: colorType,
style: style,
)
: UpStyle.getTextfieldBorderColor(
context,
colorType: colorType,
style: style,
),
width: UpStyle.getTextfieldBorderWidth(
context,
colorType: colorType,
style: style,
),
),
borderRadius: BorderRadius.all(
Radius.circular(
UpStyle.getTextfieldBorderRadius(
context,
style: style,
colorType: colorType,
),
),
),
);
}
}