VDigitInputFormatter class
@author: wzp_vicky @time: 2022年09月16日 13:57:04 @version: V1.1 @description:输入框限制:专门用于小数的输入限制,常配合VField2使用。以下列举出一些场景 ❶ 整数:限制个数:inputFormatters:
@author: wzp_vicky @time: 2026年5月26日10:40:23 @version: V1.2 @description:iOS 在印尼语/部分区域设置下,数字键盘的小数分隔符是逗号 , 而不是句点 .。用户点击键盘上的"小数点"按钮时,iOS 实际发送的是 ,,而正则 ^\d{0,19}(?:.\d{0,4})?$ 只允许 .,所以 formatter 直接拒绝了输入,回退到之前的值。
- Inheritance
-
- Object
- TextInputFormatter
- VDigitInputFormatter
Constructors
- VDigitInputFormatter(RegExp _pattern)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
formatEditUpdate(
TextEditingValue previousValue, TextEditingValue nextValue) → TextEditingValue -
Called when text is being typed or cut/copy/pasted in the EditableText.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited