Add ScrollView.padding (#7690)

Uses SliverPadding to implementing paddding in ScrollView. Also, deploy
ScrollView in more places now that it implements padding.

Finally, remove loader_app.dart because it is not referenced.
This commit is contained in:
Adam Barth
2017-01-26 23:14:37 -08:00
committed by GitHub
parent 9c288040ce
commit 5ecf8786b4
15 changed files with 25 additions and 136 deletions

View File

@@ -165,7 +165,7 @@ class _DataTableDemoState extends State<DataTableDemo> {
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(title: new Text('Data tables')),
body: new Block(
body: new ScrollView(
padding: const EdgeInsets.all(20.0),
children: <Widget>[
new PaginatedDataTable(

View File

@@ -89,7 +89,7 @@ class DialogDemoState extends State<DialogDemo> {
appBar: new AppBar(
title: new Text('Dialogs')
),
body: new Block(
body: new ScrollView(
padding: const EdgeInsets.symmetric(vertical: 24.0, horizontal: 72.0),
children: <Widget>[
new RaisedButton(

View File

@@ -157,7 +157,7 @@ class FullScreenDialogDemoState extends State<FullScreenDialogDemo> {
)
]
),
body: new Block(
body: new ScrollView(
padding: const EdgeInsets.all(16.0),
children: <Widget>[
new Container(

View File

@@ -83,7 +83,7 @@ class MenuDemoState extends State<MenuDemo> {
)
]
),
body: new Block(
body: new ScrollView(
padding: const EdgeInsets.symmetric(vertical: 8.0),
children: <Widget>[
// Pressing the PopupMenuButton on the right of this item shows

View File

@@ -29,7 +29,7 @@ class _SnackBarDemoState extends State<SnackBarDemo> {
int _snackBarIndex = 1;
Widget buildBody(BuildContext context) {
return new Block(
return new ScrollView(
padding: const EdgeInsets.all(24.0),
children: <Widget>[
new Text(_text1),

View File

@@ -240,7 +240,7 @@ class StockSettingsState extends State<StockSettings> {
]);
return true;
});
return new Block(
return new ScrollView(
padding: const EdgeInsets.symmetric(vertical: 20.0),
children: rows,
);