Repository navigation
Commit 14f9933
authored
[material_ui] Fix SnackBarThemeData.lerp dropping showCloseIcon (#13449)
`SnackBarThemeData.lerp` never passes `showCloseIcon` to the constructor, so a lerped theme always has `showCloseIcon == null`. This shows up during `AnimatedTheme` transitions, where a snack bar loses the close icon its theme asked for.
This adds `showCloseIcon` to `lerp` using the same `t < 0.5` switch as the other non-lerpable fields (`behavior`, `dismissDirection`), and a unit test covering both halves of the animation and a null theme on either side.
Fixes flutter/flutter#195390
## Pre-Review Checklist1 parent 4765bd9 commit 14f9933
3 files changed
Lines changed: 13 additions & 0 deletions
File tree
- packages/material_ui
- lib/src
- pending_changelogs
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
| 258 | + | |
258 | 259 | | |
259 | 260 | | |
260 | 261 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
21 | 30 | | |
22 | 31 | | |
23 | 32 | | |
| |||
0 commit comments