Skip to content

Add support for text shadows. - #22449

Merged
GaryQian merged 10 commits into
flutter:masterfrom
GaryQian:shadows
Oct 15, 2018
Merged

GaryQian merged 10 commits into
flutter:masterfrom
GaryQian:shadows

Conversation

@GaryQian

@GaryQian GaryQian commented Sep 28, 2018 •

Copy link
Copy Markdown
Contributor

This changes BoxShadow to inherit from Shadow (a new class without the spreadRadius)

TextStyle holds a List<Shadow>.

Fixes/Adds features for #3402

@GaryQian

Copy link
Copy Markdown
Contributor Author

See flutter-team-archive/engine#6385 for Engine-side changes.

@GaryQian GaryQian changed the title Add support for shadows in text. Add support for text shadows. Sep 28, 2018
@GaryQian

Copy link
Copy Markdown
Contributor Author

Tests will not pass until the engine is landed and rolled.

@GaryQian

GaryQian commented Sep 28, 2018 •

Copy link
Copy Markdown
Contributor Author

This is still missing golden tests, but I wanted to do that in a separate patch to keep the merging of this one smooth.

@GaryQian GaryQian mentioned this pull request Sep 28, 2018

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

these need types

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ah, i would have expected this to be the class in dart:ui

@GaryQian
GaryQian force-pushed the shadows branch 3 times, most recently from da9f0b2 to e4a703a Compare October 2, 2018 18:29
@tejainece

Copy link
Copy Markdown

Should this be called TextShadow instead of Shadow?

@GaryQian

Copy link
Copy Markdown
Contributor Author

If you are referencing the class Shadow, the idea is that Shadow is a base class of all sorts of faked shadows, and is not particularly specific to text. Other classes can presumably make use of it if they wished.

If you mean the 'shadows' property of TextStyle, since the "list of shadows" concept can be applied on multiple widgets, in order to keep it consistent and not have a Shadows prefix to each instance of shadows, I have called it just "shadows". I think this more unified API is a bit more predictable to work with. The fact that it is a Text shadow is signified by it being a property of TextStyle.

@GaryQian
GaryQian force-pushed the shadows branch 2 times, most recently from 98024de to 18d770d Compare October 15, 2018 20:44
@GaryQian
GaryQian merged commit bdc3dda into flutter:master Oct 15, 2018
jacob314 added a commit that referenced this pull request Oct 16, 2018
@GaryQian
GaryQian deleted the shadows branch November 29, 2018 01:21
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants