bs_flutter_inputtext 1.1.1 bs_flutter_inputtext: ^1.1.1 copied to clipboard
Input text with many variations of appearance and form
Getting Started #
Add the dependency in pubspec.yaml
:
dependencies:
...
bs_flutter_inputtext: any
Text Input #
Example: example.dart
Small Input Text with Outline Border
// ...
BsInput(
size: BsInputSize.sm,
hintText: 'Small input',
controller: TextEditingController(),
validators: [
BsValidator.required
],
),
// ...
Small Input Text with Border Bottom
//...
BsInput(
style: BsInputStyle.outlineBottom,
size: BsInputSize.outlineBottomSm,
hintTextLabel: 'Small input',
controller: TextEditingController(),
),
//...
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;
},
);
validator
properties will call when form on validating