|
1 |
| -# Flutter-TextInput |
| 1 | +# Flutter - Custom TextInput |
| 2 | + |
| 3 | +A Flutter based Reusable component which provides TextInput with custom properties which can be used in any Flutter application. |
| 4 | + |
| 5 | + |
| 6 | +## Table of contents |
| 7 | +- [Flutter Support](#flutter-support) |
| 8 | +- [Demo](#demo) |
| 9 | +- [Features](#features) |
| 10 | +- [Getting started](#getting-started) |
| 11 | +- [Usage](#usage) |
| 12 | +- [Methods](#methods) |
| 13 | +- [Want to Contribute?](#want-to-contribute) |
| 14 | +- [Need Help / Support?](#need-help) |
| 15 | +- [Collection of Components](#collection-of-Components) |
| 16 | +- [Changelog](#changelog) |
| 17 | +- [License](#license) |
| 18 | +- [Keywords](#Keywords) |
| 19 | + |
| 20 | + |
| 21 | +## Flutter Support |
| 22 | + |
| 23 | +Version - Flutter 1.17 (stable) |
| 24 | + |
| 25 | +We have tested our program in above versions, however you can use it in other versions as well. |
| 26 | + |
| 27 | + |
| 28 | +## Demo |
| 29 | +[](https://github.com/weblineindia/Flutter-TextInput/blob/master/Wli_CoustomTextInput.gif) |
| 30 | + |
| 31 | +------ |
| 32 | + |
| 33 | +## Features |
| 34 | + |
| 35 | +* Customisable TextInput with more properties. |
| 36 | + |
| 37 | +* Common widget can be used for different textinput based on Type. |
| 38 | + |
| 39 | +1) Default TextInput |
| 40 | + |
| 41 | +2) Email TextInput |
| 42 | + |
| 43 | +3) Password TextInput |
| 44 | + |
| 45 | +4) Phone TextInput |
| 46 | + |
| 47 | +5) CreditCard TextInput. |
| 48 | + |
| 49 | + |
| 50 | +## Getting started |
| 51 | + |
| 52 | +* Download this sample project and import custom_text_input.dart file in your project.. |
| 53 | +* Update Widgets UI based on your requirements. |
| 54 | + |
| 55 | + |
| 56 | +## Usage |
| 57 | + |
| 58 | +Setup process is described below to integrate in project. |
| 59 | + |
| 60 | +### Methods |
| 61 | + |
| 62 | +Configure CustomTextInput Widget |
| 63 | + |
| 64 | + // Put CustomTextInput Widget |
| 65 | + CustomTextInput( |
| 66 | + |
| 67 | + ) |
| 68 | + |
| 69 | + |
| 70 | +Pass required properties |
| 71 | + |
| 72 | + // add text edit controller, hint text and input type |
| 73 | + // textEditController used to fetch text from textInput |
| 74 | + // hintTextString is used to show hint and used as a label |
| 75 | + // inputType is used to identify which type of TextInput you needed, On basis of that you will get multiple properties and validations |
| 76 | + CustomTextInput( |
| 77 | + textEditController: _textController, |
| 78 | + hintTextString: 'Enter Email', |
| 79 | + inputType: InputType.Email, |
| 80 | + ) |
| 81 | + |
| 82 | + |
| 83 | +Available InputTypes |
| 84 | + |
| 85 | + //required parameter to identify type of TextInput |
| 86 | + InputType.Default |
| 87 | + InputType.Email |
| 88 | + InputType.Number |
| 89 | + InputType.Password |
| 90 | + InputType.PaymentCard |
| 91 | + |
| 92 | + |
| 93 | +Set below properties based on your requirements |
| 94 | + |
| 95 | + //optional property for enable border outside the textinput field |
| 96 | + //it accepts boolean value, default value will be true |
| 97 | + enableBorder: true, |
| 98 | + |
| 99 | + //optional property set theme color |
| 100 | + //It will change border color and label color |
| 101 | + //it accepts Color object, default value will be theme's primary color |
| 102 | + themeColor: Theme.of(context).primaryColor, |
| 103 | + |
| 104 | + //optional property for set corner radius |
| 105 | + //with this you can make rounded border as well as curve |
| 106 | + //it accepts double value, default value will be 12.0 |
| 107 | + cornerRadius: 48.0, |
| 108 | + |
| 109 | + //optional property for set maximum character allows |
| 110 | + //it accepts int value, default will be based on textinput type |
| 111 | + maxLength: 24, |
| 112 | + |
| 113 | + //optional property for set prefix icon |
| 114 | + //it accepts widget, default will be icon based on textinput type |
| 115 | + //you can set color of icons as well through color property of icon |
| 116 | + prefixIcon: Icon(Icons.person, color: Theme.of(context).primaryColor), |
| 117 | + |
| 118 | + //optional property for set text color |
| 119 | + //it accepts color object, default will be Theme's primary color |
| 120 | + textColor: Colors.black, |
| 121 | + |
| 122 | + //optional property for set customize error message |
| 123 | + //it accepts string, default will be based on textinput type |
| 124 | + errorMessage: 'User name cannot be empty', |
| 125 | + |
| 126 | + //optional property for set label name |
| 127 | + //it accepts strings, default will be hint string |
| 128 | + //this label will show when textinput animated while writing |
| 129 | + labelText: 'User Name', |
| 130 | + |
| 131 | + |
| 132 | +------ |
| 133 | + |
| 134 | +## Want to Contribute? |
| 135 | + |
| 136 | +- Created something awesome, made this code better, added some functionality, or whatever (this is the hardest part). |
| 137 | +- [Fork it](http://help.github.com/forking/). |
| 138 | +- Create new branch to contribute your changes. |
| 139 | +- Commit all your changes to your branch. |
| 140 | +- Submit a [pull request](http://help.github.com/pull-requests/). |
| 141 | + |
| 142 | +------ |
| 143 | + |
| 144 | +## Need Help? |
| 145 | +If you need help then feel free to contact our [Flutter developers](https://www.weblineindia.com/flutter-cross-platform-mobile-app-development.html). |
| 146 | + |
| 147 | + ------ |
| 148 | + |
| 149 | +## Collection of Components |
| 150 | + We have built many other components and free resources for software development in various programming languages. Kindly click here to view our [Free Resources for Software Development.](https://www.weblineindia.com/software-development-resources.html) |
| 151 | + |
| 152 | +------ |
| 153 | + |
| 154 | +## Changelog |
| 155 | +Detailed changes for each release are documented in [CHANGELOG](./CHANGELOG). |
| 156 | + |
| 157 | +## License |
| 158 | + |
| 159 | +[MIT](LICENSE) |
| 160 | + |
| 161 | +[mit]: https://github.com/weblineindia/Flutter-TextInput/blob/master/LICENSE |
| 162 | + |
| 163 | +## Keywords |
| 164 | +Flutter TextInput, Flutter Customisable TextField, Custom TextInput, Reusable TextField, Weblineindia |
0 commit comments