Adjust the defaults behaviour of scroll views. (#9679)

* Adjust the defaults behaviour of scroll views.

Now, primary scroll views scroll by default. Others only scroll if necessary.

* apply suggested changes
This commit is contained in:
Ian Hickson
2017-05-02 09:14:50 -07:00
committed by GitHub
parent f739e9e022
commit 89856c0e5b
8 changed files with 126 additions and 16 deletions

View File

@@ -42,6 +42,7 @@ class _ListDemoState extends State<ListDemo> {
),
child: new ListView(
shrinkWrap: true,
primary: false,
children: <Widget>[
new ListTile(
dense: true,

View File

@@ -298,6 +298,6 @@ class GalleryDrawer extends StatelessWidget {
));
}
return new Drawer(child: new ListView(children: allDrawerItems));
return new Drawer(child: new ListView(primary: false, children: allDrawerItems));
}
}