• Greg Spencer's avatar
    Fix handling of null body2 text style for chip and slider (#17311) · a365c41c
    Greg Spencer authored
    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
    a365c41c
Name
Last commit
Last update
.github/ISSUE_TEMPLATE Loading commit data...
bin Loading commit data...
dev Loading commit data...
examples Loading commit data...
packages Loading commit data...
.cirrus.yml Loading commit data...
.coveralls.yml Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
analysis_options.yaml Loading commit data...
analysis_options_repo.yaml Loading commit data...
appveyor.yml Loading commit data...
flutter_console.bat Loading commit data...