Implement Hashcode for TextEditingValue in InputConnectionAdaptor (flutter/engine#17643)

This commit is contained in:
Gary Qian
2020-04-10 16:00:01 -07:00
committed by GitHub
parent c2acb0782b
commit 8e18094f12

View File

@@ -75,6 +75,18 @@ class InputConnectionAdaptor extends BaseInputConnection {
&& composingEnd == value.composingEnd
&& text.equals(value.text);
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + selectionStart;
result = prime * result + selectionEnd;
result = prime * result + composingStart;
result = prime * result + composingEnd;
result = prime * result + text.hashCode();
return result;
}
}
@SuppressWarnings("deprecation")