UITextFieldThemeData.config constructor
const
UITextFieldThemeData.config({
- double? borderWidth = 1,
- double? height,
- BoxConstraints? iconConstraints = const BoxConstraints.tightFor(width: 40, height: 20),
- double? titleSpacing = 4,
- Color? focusBorderColor = Colors.black45,
- Color? borderColor = Colors.black26,
- Color? errorColor = Colors.red,
- Color? backgroundColor = Colors.black12,
- Color? cursorColor = Colors.black,
- TextStyle? counterStyle = const TextStyle(fontSize: 12),
- TextStyle? titleStyle = const TextStyle(fontSize: 14),
- TextStyle? textStyle = const TextStyle(fontSize: 16),
- TextStyle? hintStyle = const TextStyle(fontSize: 12),
- TextStyle? labelStyle = const TextStyle(fontSize: 12),
- TextStyle? errorStyle = const TextStyle(fontSize: 12),
- BorderRadius? defaultBorderRadius = BorderRadius.zero,
- BorderRadius? moreLinesBorderRadius = BorderRadius.zero,
- EdgeInsets? contentPadding = const EdgeInsets.only(top: 12, bottom: 12, left: 8, right: -4),
- UIIconThemeData? cleanSuffixIcon = const UIIconThemeData(iconSize: 7.5, containerSize: 16),
- UIIconThemeData? obscureSuffixIcon = const UIIconThemeData.icon(iconSize: 20),
Implementation
const UITextFieldThemeData.config({
this.borderWidth = 1,
this.height,
this.iconConstraints = const BoxConstraints.tightFor(width: 40, height: 20),
this.titleSpacing = 4,
this.focusBorderColor = Colors.black45,
this.borderColor = Colors.black26,
this.errorColor = Colors.red,
this.backgroundColor = Colors.black12,
this.cursorColor = Colors.black,
this.counterStyle = const TextStyle(fontSize: 12),
this.titleStyle = const TextStyle(fontSize: 14),
this.textStyle = const TextStyle(fontSize: 16),
this.hintStyle = const TextStyle(fontSize: 12),
this.labelStyle = const TextStyle(fontSize: 12),
this.errorStyle = const TextStyle(fontSize: 12),
this.defaultBorderRadius = BorderRadius.zero,
this.moreLinesBorderRadius = BorderRadius.zero,
this.contentPadding = const EdgeInsets.only(top: 12, bottom: 12, left: 8, right: -4),
this.cleanSuffixIcon = const UIIconThemeData(
iconSize: 7.5,
containerSize: 16,
),
this.obscureSuffixIcon = const UIIconThemeData.icon(
iconSize: 20,
),
});