Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// Configurable state of an input field.
- class InputValue {
- const InputValue({ this.text: '', this.selection });
- /// The current text being edited.
- String text;
- /// The range of text that is currently selected.
- TextSelection selection;
- static InputValue get empty => const InputValue();
- bool operator==(Object other) {
- if (other.runtimeType != runtimeType)
- return false;
- InputValue otherValue = other;
- return (otherValue.text == text) &&
- (otherValue.selection == selection);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement