GithubHelp home page GithubHelp logo

dev-hwang / simple_text_field Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 1.0 40 KB

This package is a TextField that allows you to implement the OutlineInputBorder with simple settings.

License: MIT License

Dart 100.00%
flutter android ios web text-field

simple_text_field's Introduction

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.1.0

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)

Parameter Description
decoration Used to decorate SimpleTextField.
label Label can be created using SimpleTextFieldLabel.
labelAlignment Set the alignment value of the SimpleTextFieldLabel.
Default value is CrossAxisAlignment.start.
ignoreWhiteSpace Whether to ignore input of white space.
Default value is false.
ignoreSpecialChar Whether to ignore input of special characters.
Default value is false.

SimpleTextFieldLabel

Parameter Description
text Set the label text.
style Specifies the style of the label text.
Default value is Theme.of(context).textTheme.subtitle1.
asterStyle Specifies the style of the asterisk character.
Default value is Theme.of(context).textTheme.subtitle1?.copyWith(color: Theme.of(context).primaryColor).
padding Set the label padding.
Default value is const EdgeInsets.only(top: 16.0, bottom: 8.0).
important When set to true, an asterisk character appears.
Default value is false.

SimpleInputDecoration (※ Show only added options)

Parameter Description
removeBorder Whether to remove the border of a SimpleTextField.
Default value is false.
simpleBorder Whether 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 [email protected].

simple_text_field's People

Contributors

dev-hwang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

miraclebg

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.