input_type_field

Last updated:

0 purchases

input_type_field Image
input_type_field Images
Add to Cart

Description:

input type field

input_type_field #
A multi platform input type.
With current keyboard type parameter input fields will force you to enter only digits (for example) but this is not the case when executing your code on the web or on desktop apps.
This is the main purpose of this package is to help developers set input fields easily and across all platforms.
Getting Started #
So all you have to do to have the package in you project is to add this on your pubspec.yaml file:
dependencies:
input_type_field: ^1.0.0
copied to clipboard
Usage #
The implementation it's really simple just wrap your TextField with MaterialTextType widget and add the constructor you want

available constructors:

integer: will let you enter only numbers
number: can be used for floating and signed numbers
datetime: for dates and time formats
phone: for phone numbers input fields



If you are using CupertinoTextField wrap it with CupertinoTextType and choose one of the constructors above
MaterialTextType.integer(
textField: TextField(
decoration: InputDecoration(hintText: "Age"),
onChanged: (value) {
print(value);
}
))
copied to clipboard
MaterialTextType.phone(
textField: TextField(
decoration: InputDecoration(hintText: "Phone number"),
)
)
copied to clipboard
CupertinoTextType.number(
cupertinoTextField: CupertinoTextField(
placeholder: "Product Price"
)
)
copied to clipboard
CupertinoTextType.datetime(
cupertinoTextField: CupertinoTextField(
placeholder: "Product Date",
)
)
copied to clipboard
Of course you can implement CupertinoTextField and TextField the way you want it won't be affected by
CupertinoTextType or by MaterialTextType
Github repository #
For more information and to contribute to this project head back to the repository below
https://github.com/koukibadr/Input-Text-Type

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.