Reland "Text inline widgets, TextSpan rework (#30069)" with improved backwards compatibility#34051
Merged
GaryQian merged 21 commits intoflutter:masterfrom Jun 7, 2019
Merged
Reland "Text inline widgets, TextSpan rework (#30069)" with improved backwards compatibility#34051GaryQian merged 21 commits intoflutter:masterfrom
GaryQian merged 21 commits intoflutter:masterfrom
Conversation
Contributor
Author
Contributor
|
I still haven't completed the roll, please hold off on this until the roll succeeds. |
Contributor
Author
|
Yep, won't be landing this until your roll is all done. |
| /// | ||
| /// This getter does not include the contents of its children. | ||
| @override | ||
| String get text => _text; |
Contributor
There was a problem hiding this comment.
This change and below should not be necessary. final fields are equivalent to a getter
Contributor
Author
There was a problem hiding this comment.
Ahh thanks, good to know!
Contributor
Author
There was a problem hiding this comment.
Will it override the getter without a @override? Update: it apparently will.
Contributor
There was a problem hiding this comment.
@override is an analyzer hint, but it is required for our lints
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is another attempt at landing Text inline widgets (original PR with comments can be found here: https://github.com/flutter/flutter/pull/
This version adds the following backwards compatibility deprecated API:
These deprecated APIs should allow InlineSpan to behave like the old TextSpans for instances of InlineSpan that are also TextSpans.
getSpanForPositionnow returns an InlineSpan, which may still break if you try to store the returned InlineSpan into a TextSpan.These three deprecated APIs should be removed after the next stable release.
Diff from previous version: https://github.com/flutter/flutter/pull/34051/files/db2ed0acdbea7243917603e348b8b01585a7e590..3b08022762ea94b6fdf9570f00931bdafefac550
Previous version had LGTM.