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:
@@ -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]),
|
||||
|
||||
@@ -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)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -136,7 +136,7 @@ class PageableListAppState extends State<PageableListApp> {
|
||||
: pageSize.width
|
||||
);
|
||||
return new SizeObserver(
|
||||
callback: updatePageSize,
|
||||
onSizeChanged: updatePageSize,
|
||||
child: list
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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")
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user