Fix analyzer warnings (#7523)

I see these errors in Atom on my Mac. I'm not sure why they're not being
picked up by the bots.
This commit is contained in:
Adam Barth
2017-01-18 13:18:09 -08:00
committed by GitHub
parent 0ce9917fb2
commit 40e305dc2d
4 changed files with 5 additions and 5 deletions

View File

@@ -936,7 +936,7 @@ class _IntrinsicDimensionsCacheEntry {
/// these classes, however, you must implement the algorithm yourself.
abstract class RenderBox extends RenderObject {
@override
void setupParentData(RenderObject child) {
void setupParentData(@checked RenderObject child) {
if (child.parentData is! BoxParentData)
child.parentData = new BoxParentData();
}
@@ -1823,7 +1823,7 @@ abstract class RenderBox extends RenderObject {
/// ```
// TODO(ianh): Fix the type of the argument here once https://github.com/dart-lang/sdk/issues/25232 is fixed
@override
void handleEvent(PointerEvent event, HitTestEntry entry) {
void handleEvent(PointerEvent event, @checked HitTestEntry entry) {
super.handleEvent(event, entry);
}

View File

@@ -2073,7 +2073,7 @@ class Flex extends MultiChildRenderObjectWidget {
}
@override
void updateRenderObject(BuildContext context, RenderFlex renderObject) {
void updateRenderObject(BuildContext context, @checked RenderFlex renderObject) {
renderObject
..direction = direction
..mainAxisAlignment = mainAxisAlignment

View File

@@ -3456,7 +3456,7 @@ abstract class RenderObjectElement extends BuildableElement {
}
@override
void update(RenderObjectWidget newWidget) {
void update(@checked RenderObjectWidget newWidget) {
super.update(newWidget);
assert(widget == newWidget);
assert(() { _debugUpdateRenderObjectOwner(); return true; });

View File

@@ -285,7 +285,7 @@ class FlutterDriver {
if (_printCommunication)
_log.info(message);
if (_logCommunicationToFile) {
f.File file = fs.file(p.join(testOutputsDirectory, 'flutter_driver_commands_${_driverId}.log'));
f.File file = fs.file(p.join(testOutputsDirectory, 'flutter_driver_commands_$_driverId.log'));
file.createSync(recursive: true); // no-op if file exists
file.writeAsStringSync('${new DateTime.now()} $message\n', mode: f.FileMode.APPEND, flush: true);
}