BorderlessTextTheme constructor

BorderlessTextTheme({
  1. TextStyle? hintStyle,
  2. EdgeInsetsGeometry? contentPadding,
  3. TextStyle? errorStyle,
  4. TextStyle? floatingLabelStyle,
  5. Color? enabledColor,
  6. Color? focusedColor,
  7. Color? prefixIconColor,
  8. Color? suffixIconColor,
  9. double width = 2,
  10. double radius = 0,
  11. Color fillColor = Colors.transparent,
  12. TextStyle? helperStyle,
  13. int? helperMaxLines,
  14. int? errorMaxLines,
  15. Color? iconColor,
  16. TextStyle? prefixStyle,
  17. TextStyle? suffixStyle,
  18. FloatingLabelBehavior floatingLabelBehavior = FloatingLabelBehavior.auto,
  19. 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),
        ),
      );