setSelection method
Implementation
void setSelection(TextSelection selection) {
start = min(selection.baseOffset, selection.extentOffset - 1);
end = max(selection.baseOffset, selection.extentOffset - 1);
}
void setSelection(TextSelection selection) {
start = min(selection.baseOffset, selection.extentOffset - 1);
end = max(selection.baseOffset, selection.extentOffset - 1);
}