Last updated:
0 purchases
idkit inputformatters
idkit_inputformatters #
Provide text input formatter. The package is simple to use, powerful, stable, and highly customized. Every developer is welcome to use it.
Introduction to existing functions #
The following is a brief introduction to the existing functions. For more functions and usage, please check the main.dart file of example.
The maximum length of the input box.
Example code
inputFormatters: [
IDKitNumeralTextInputFormatter.length(
maxLength: 10,
errorStreamController: streamController,
)
]
copied to clipboard
Code explanation
The above formatter limits the maximum length of the text input value to ten.
Limit the maximum value of text input.
Example code
inputFormatters: [
IDKitNumeralTextInputFormatter.max(
maxValue: 100,
maxDecimalDigit: 2,
decimalPoint: true,
errorStreamController: streamController,
),
]
copied to clipboard
Code explanation
The above code limits the maximum value of text input to one hundred, and when it is a decimal, the maximum number of digits that can be reserved is two.
Limit the minimum value of the text input value, the minimum value cannot be greater than nine.
Example code
inputFormatters: [
IDKitNumeralTextInputFormatter.min(
minValue: 1,
maxDecimalDigit: 2,
decimalPoint: true,
errorStreamController: streamController,
)
]
copied to clipboard
Code explanation
The above code restricts the minimum value of text input to one, and it can keep up to two decimal places when it is a decimal.
Limit the range of text input values, the minimum value cannot be greater than nine.
Example code
inputFormatters: [
IDKitNumeralTextInputFormatter.range(
minValue: 2,
maxValue: 100,
maxDecimalDigit: 2,
decimalPoint: false,
errorStreamController: streamController,
),
]
copied to clipboard
Code explanation
The above code is to limit the input minimum value to two and the maximum value to one hundred. If the input value is a decimal, the maximum number of decimals is two digits.
Customizable input formatter.
Example code
inputFormatters: [
IDKitNumeralTextInputFormatter(...),
]
copied to clipboard
Code explanation
The above code is the setting of the customizable input formatter.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.