BorderlessTextTheme constructor
BorderlessTextTheme({
- TextStyle? hintStyle,
- EdgeInsetsGeometry? contentPadding,
- TextStyle? errorStyle,
- TextStyle? floatingLabelStyle,
- Color? enabledColor,
- Color? focusedColor,
- Color? prefixIconColor,
- Color? suffixIconColor,
- double width = 2,
- double radius = 0,
- Color fillColor = Colors.transparent,
- TextStyle? helperStyle,
- int? helperMaxLines,
- int? errorMaxLines,
- Color? iconColor,
- TextStyle? prefixStyle,
- TextStyle? suffixStyle,
- FloatingLabelBehavior floatingLabelBehavior = FloatingLabelBehavior.auto,
- FloatingLabelAlignment floatingLabelAlignment = FloatingLabelAlignment.start,
Implementation
BorderlessTextTheme({
/// The style to use for the [InputDecoration.hintText].
TextStyle? hintStyle,
/// The Padding for the input decoration's container.
EdgeInsetsGeometry? contentPadding,
/// The style to use for the [InputDecoration.errorText].
TextStyle? errorStyle,
/// The style to use for the [LabelText].
TextStyle? floatingLabelStyle,
/// This is a enable border color for [InputDecoration.enabledBorder]
Color? enabledColor,
/// This is a focus border color for [InputDecoration.focusedBorder]
Color? focusedColor,
/// The Color to use for the [InputDecoration.prefixIcon].
Color? prefixIconColor,
/// The Color to use for the [InputDecoration.suffixIcon].
Color? suffixIconColor,
/// The width to use for border
double width = 2,
/// The radius to use for border corners
double radius = 0,
/// Background color for the text field
Color fillColor = Colors.transparent,
/// The style to use for the [InputDecoration.helperText].
TextStyle? helperStyle,
/// The maximum number of lines the [InputDecoration.helperText] can occupy.
int? helperMaxLines,
/// The maximum number of lines the [InputDecoration.errorText] can occupy.
int? errorMaxLines,
/// The Color to use for the [InputDecoration.icon].
Color? iconColor,
/// The style to use for the [InputDecoration.prefixText].
TextStyle? prefixStyle,
/// The style to use for the [InputDecoration.suffixText].
TextStyle? suffixStyle,
/// {@macro flutter.material.inputDecoration.floatingLabelBehavior}
FloatingLabelBehavior floatingLabelBehavior = FloatingLabelBehavior.auto,
/// {@macro flutter.material.inputDecoration.floatingLabelAlignment}
FloatingLabelAlignment floatingLabelAlignment =
FloatingLabelAlignment.start,
}) : super(
hintStyle: hintStyle,
contentPadding: contentPadding,
errorStyle: errorStyle,
floatingLabelStyle: floatingLabelStyle,
suffixIconColor: suffixIconColor,
prefixIconColor: prefixIconColor,
fillColor: fillColor,
filled: fillColor != Colors.transparent ? true : false,
helperStyle: helperStyle,
helperMaxLines: helperMaxLines,
errorMaxLines: errorMaxLines,
floatingLabelBehavior: floatingLabelBehavior,
floatingLabelAlignment: floatingLabelAlignment,
iconColor: iconColor,
prefixStyle: prefixStyle,
suffixStyle: suffixStyle,
border: const UnderlineInputBorder(
borderSide: BorderSide(),
),
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: enabledColor ?? Colors.blue, width: width - 1),
borderRadius: BorderRadius.circular(radius)),
focusedBorder: UnderlineInputBorder(
borderRadius: BorderRadius.circular(radius),
borderSide:
BorderSide(color: focusedColor ?? Colors.blue, width: width),
),
);