Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. /// Configurable state of an input field.
  2. class InputValue {
  3. const InputValue({ this.text: '', this.selection });
  4.  
  5. /// The current text being edited.
  6. String text;
  7.  
  8. /// The range of text that is currently selected.
  9. TextSelection selection;
  10.  
  11. static InputValue get empty => const InputValue();
  12.  
  13. bool operator==(Object other) {
  14. if (other.runtimeType != runtimeType)
  15. return false;
  16. InputValue otherValue = other;
  17. return (otherValue.text == text) &&
  18. (otherValue.selection == selection);
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement