Skip to content

Conversation

@abarth
Copy link
Contributor

@abarth abarth commented Jan 26, 2016

Previously, EditableString had many public members because it needed to
implement the KeyboardClient interface. However, that's confusing
because these methods cannot be called directly.

Now EditableString holds a private implementation of the KeyboardClient,
which hides the implementation details.

Fixes #208
Fixes #209

@abarth
Copy link
Contributor Author

abarth commented Jan 26, 2016

@jason-simmons

Previously, EditableString had many public members because it needed to
implement the KeyboardClient interface. However, that's confusing
because these methods cannot be called directly.

Now EditableString holds a private implementation of the KeyboardClient,
which hides the implementation details.

Fixes flutter#208
Fixes flutter#209
@abarth abarth force-pushed the protect_editable_string branch from 156be6c to f0ea0ea Compare January 26, 2016 00:10
abarth added a commit that referenced this pull request Jan 26, 2016
Hide EditableString implementation details
@abarth abarth merged commit b7396ba into flutter:master Jan 26, 2016
@abarth abarth deleted the protect_editable_string branch January 26, 2016 00:43
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if this is intended but depending on TextRange and text this can lead to RangeError (for instance with TextRange.empty, with TextRange(start: 3, end: 5) and text="aa")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is an error condition. I guess we could return null or truncate, but it seems reasonable to have the same error handling as substring.

TahaTesser pushed a commit to NevercodeHQ/flutter that referenced this pull request Aug 13, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

3 participants