InputFilterBase
Base for input filters — they reject characters as they are typed (digits-only, email chars, …) by subscribing to InputFilter. A separate concern from validation (InputValidatorBase), which lets input through and judges the whole value for a visible status.
Remarks
Allows receives the full EditProposal and must judge the POST-state: text replacing a selection is acceptable whenever the resulting value is acceptable, even if the pre-state already contained the typed characters (the replaced ones are going away). Native platforms deliver multi-char strings (macOS NSString, Android CharSequence), so handle codepoints, surrogate pairs, and grapheme clusters. Same extensibility pattern as BaseModifier / ParseRule: stored via [SerializeReference, TypeSelector]; built-in and custom filters appear in the picker.Derived Types(5)
Types that inherit from InputFilterBase.
public KeyboardType PreferredKeyboardType{ get }Preferred mobile keyboard type. The input field uses this when no NativeKeyboardBehavior overrides it.
Returns if the document text SURVIVING the proposal (everything outside ReplacedRange) contains targetCodepoint — the post-state membership test, minus the inserted text the filter is already iterating. O(document length) per call: chunked span scans keep the constant small, but a custom filter calling this per inserted character on a multiline document is O(n) per keystroke.
