0 purchases
bs flutter inputtext
Getting Started #
Add the dependency in pubspec.yaml:
dependencies:
...
bs_flutter_inputtext: any
copied to clipboard
Text Input #
Example: example.dart
Small Input Text with Outline Border
// ...
BsInput(
size: BsInputSize.sm,
hintText: 'Small input',
controller: TextEditingController(),
validators: [
BsValidator.required
],
),
// ...
copied to clipboard
Small Input Text with Border Bottom
//...
BsInput(
style: BsInputStyle.outlineBottom,
size: BsInputSize.outlineBottomSm,
hintTextLabel: 'Small input',
controller: TextEditingController(),
),
//...
copied to clipboard
BsValidator is custom validator, you can create yours validator using BsValidator
Example:
static BsValidator get required => BsValidator(
validator: (value) {
String valueValidate = value.toString().trim();
if(valueValidate.isEmpty) return "Field tidak boleh kosong";
return null;
},
);
copied to clipboard
validator properties will call when form on validating
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.