DefaultTextStyle.merge and IconTheme.merge improvements (#9358)

I can't figure out if this is genius or a giant hack.

This lets you use DefaultTextStyle.merge and IconTheme.merge without
specifying a BuildContext. It automatically merges in at the
appropriate place in the tree using a Builder widget.
This commit is contained in:
Ian Hickson
2017-04-13 10:26:40 -07:00
committed by GitHub
parent aaa0a1cfc3
commit 8fdd2066b3
17 changed files with 48 additions and 56 deletions

View File

@@ -248,8 +248,7 @@ class CardCollectionState extends State<CardCollection> {
controller: cardModel.textController,
),
)
: new DefaultTextStyle.merge(
context: context,
: DefaultTextStyle.merge(
style: cardLabelStyle.copyWith(
fontSize: _varyFontSizes ? 5.0 + index : null
),