Refactor IconThemeData.fallback (#7490)

Now IconThemeData.fallback is a factory constructor and IconThemeData.of() does
the work of computing the fallback for its clients.

Also, add tests for ImageIcon and ListItems.
This commit is contained in:
Adam Barth
2017-01-13 14:44:47 -08:00
committed by GitHub
parent 3150e3fbd4
commit 4955eef8a7
14 changed files with 126 additions and 60 deletions

View File

@@ -66,7 +66,7 @@ class NavigationIconView {
class CustomIcon extends StatelessWidget {
@override
Widget build(BuildContext context) {
final IconThemeData iconTheme = IconTheme.of(context).fallback();
final IconThemeData iconTheme = IconTheme.of(context);
return new Container(
margin: const EdgeInsets.all(4.0),
width: iconTheme.size - 8.0,