underlineInputDecoration method
Borderless variant used when the dashboard "Input Style" is set to underline: no fill, only a bottom line, in every design style.
Implementation
InputDecoration underlineInputDecoration({
required String hint,
String? label,
}) {
UnderlineInputBorder line(Color c, [double w = 1]) => UnderlineInputBorder(
borderSide: BorderSide(color: c, width: w),
);
return InputDecoration(
labelText: label,
hintText: hint,
filled: false,
hintStyle: TextStyle(
fontFamily: fontFamily,
color: theme.onSurfaceMuted,
letterSpacing: 4,
),
labelStyle: TextStyle(
fontFamily: fontFamily,
color: theme.onSurfaceMuted,
),
contentPadding: const EdgeInsets.symmetric(vertical: 12),
border: line(theme.inputBorder),
enabledBorder: line(theme.inputBorder),
focusedBorder: line(theme.primary, 1.5),
errorBorder: line(Colors.redAccent),
focusedErrorBorder: line(Colors.redAccent, 1.5),
);
}