Give the CustomPaint and SizeObserver callbacks better names

The style we use for callbacks in widgets is "onFoo". These classes were using
an order naming convention and just called their callbacks "callback".
This commit is contained in:
Adam Barth
2015-10-19 17:22:59 -07:00
parent 2edc6dbb3d
commit 529fa95f87
21 changed files with 60 additions and 60 deletions

View File

@@ -337,7 +337,7 @@ class CardCollectionState extends State<CardCollection> {
]);
Widget body = new SizeObserver(
callback: _updateCardCollectionSize,
onSizeChanged: _updateCardCollectionSize,
child: new Container(
padding: const EdgeDims.symmetric(vertical: 12.0, horizontal: 8.0),
decoration: new BoxDecoration(backgroundColor: Theme.of(context).primarySwatch[50]),

View File

@@ -58,7 +58,7 @@ class Marker extends StatelessComponent {
child: new Container(
width: size,
height: size,
child: new CustomPaint(callback: paintMarker)
child: new CustomPaint(onPaint: paintMarker)
)
)
);

View File

@@ -136,7 +136,7 @@ class PageableListAppState extends State<PageableListApp> {
: pageSize.width
);
return new SizeObserver(
callback: updatePageSize,
onSizeChanged: updatePageSize,
child: list
);
}

View File

@@ -63,7 +63,7 @@ class ScaleAppState extends State<ScaleApp> {
body: new GestureDetector(
onScaleStart: _handleScaleStart,
onScaleUpdate: _handleScaleUpdate,
child: new CustomPaint(callback: paint, token: "$_zoom $_offset")
child: new CustomPaint(onPaint: paint, token: "$_zoom $_offset")
)
)
);