SIGN IN SIGN UP

Fix handling of null body2 text style for chip and slider (#17311)

Before this change, if you specified a non-null textTheme, but the theme you specified didn't have a body2 defined, then creating a ChipTheme would assert (which means creating a ThemeData would fail).

This adds handling for this corner case to default to reasonable values in that case. The slider had the same problem, but for accentTextTheme, so I fixed that too.

While I had the patient open, Hans and I noticed that TextTheme.merge wasn't doing the right thing in the case where some members were null either, so I fixed that, and added some examples, since merge/copyWith are common operations that are not always well understood.

Fixes #17251
G
Greg Spencer committed
a365c41cb5bfcf31ff76cf2a840a1fd01fc1159d
Parent: bb4afb0
Committed by GitHub <noreply@github.com> on 5/10/2018, 9:37:14 PM