This package is a TextField that allows you to implement the OutlineInputBorder with simple settings. It includes all the options provided by the existing TextField, and additionally includes an option to block white space or special characters.

pub package

Getting started

To use this package, add simple_text_field as a dependency in your pubspec.yaml file. For example:

dependencies:
  simple_text_field: ^2.0.2

Package

  • SimpleTextField - A widget that implements a SimpleTextField.
  • SimpleTextFieldLabel - A widget that implements the label of SimpleTextField.
  • SimpleInputDecoration - Creates a bundle of the border, labels, icons, and styles used to decorate a SimpleTextField.

SimpleTextField (※ Show only added options)

ParameterDescription
decorationUsed to decorate SimpleTextField.
labelLabel can be created using SimpleTextFieldLabel.
labelAlignmentSet the alignment value of the SimpleTextFieldLabel.
Default value is CrossAxisAlignment.start.
ignoreWhiteSpaceWhether to ignore input of white space.
Default value is false.
ignoreSpecialCharWhether to ignore input of special characters.
Default value is false.

SimpleTextFieldLabel

ParameterDescription
textSet the label text.
styleSpecifies the style of the label text.
Default value is Theme.of(context).textTheme.subtitle1.
asterStyleSpecifies the style of the asterisk character.
Default value is Theme.of(context).textTheme.subtitle1?.copyWith(color: Theme.of(context).primaryColor).
paddingSet the label padding.
Default value is const EdgeInsets.only(top: 16.0, bottom: 8.0).
importantWhen set to true, an asterisk character appears.
Default value is false.

SimpleInputDecoration (※ Show only added options)

ParameterDescription
removeBorderWhether to remove the border of a SimpleTextField.
Default value is false.
simpleBorderWhether to automatically create a OutlineInputBorder.
Default value is false.
disabledColor*fillColor to display when a SimpleTextField is disabled.
borderColor*The color of the border that will be shown to us in general.
errorBorderColor*The color of the border to show when the errorText is not null.
focusedBorderColor*The color of the focused border.
focusedErrorBorderColor*The color of the focused error border.
borderWidth*Set the width of the border.
Default value is 1.0.
focusedBorderWidth*Set the width of the focused border.
Default value is 2.0.
borderRadius*Set the radius of the border.
Default value is const BorderRadius.all(Radius.circular(2.0)).

Note: The parameters marked with an asterisk(*) operate when simpleBorder is true.

Support

If you find any bugs or issues while using the plugin, please register an issues on GitHub. You can also contact us at hwj930513@naver.com.

Libraries

simple_input_decoration
simple_text_field
simple_text_field_label