underlined method
NikuTextField
underlined({
- double width = 2,
- Color color = Colors.grey,
- BorderStyle style = BorderStyle.solid,
- BorderRadius borderRadius = const BorderRadius.only(topLeft: Radius.circular(4.0), topRight: Radius.circular(4.0)),
The shape of the border to draw around the decoration's container
Using UnderlineInputBorder.
Equivalent to
TextFormField(
decoration: InputDecoration(
border: UnderlineInputBorder(
borderSide: BorderSide(
color: color,
width: width,
style: style
),
borderRadius: borderRadius,
),
),
);
Implementation
NikuTextField underlined({
double width = 2,
Color color = Colors.grey,
BorderStyle style = BorderStyle.solid,
BorderRadius borderRadius = const BorderRadius.only(
topLeft: Radius.circular(4.0),
topRight: Radius.circular(4.0),
),
}) {
final border = UnderlineInputBorder(
borderSide: BorderSide(
color: color,
width: width,
style: style,
),
borderRadius: borderRadius,
);
final errorBorder = UnderlineInputBorder(
borderSide: BorderSide(
color: Colors.red,
width: width,
style: style,
),
borderRadius: borderRadius,
);
_input_border = border;
_input_enabledBorder = border;
_input_disabledBorder = border;
_input_focusedBorder = border;
_input_errorBorder = errorBorder;
_input_focusedErrorBorder = errorBorder;
return this;
}