Fix analyzer warnings
We had a remarkable number of analyzer failures. I'll fix the bots to analyze across the whole project in a follow-up patch, that should prevent this in the future. @abarth
This commit is contained in:
@@ -8,7 +8,7 @@ Picture draw(int a, int r, int g, int b) {
|
||||
Size size = new Size(view.width, view.height);
|
||||
|
||||
PictureRecorder recorder = new PictureRecorder();
|
||||
final double devicePixelRatio = sky.view.devicePixelRatio;
|
||||
final double devicePixelRatio = view.devicePixelRatio;
|
||||
Canvas canvas = new Canvas(recorder, Point.origin & (size * devicePixelRatio));
|
||||
canvas.scale(devicePixelRatio, devicePixelRatio);
|
||||
double radius = size.shortestSide * 0.45;
|
||||
|
||||
@@ -21,7 +21,7 @@ Picture draw(int a, int r, int g, int b) {
|
||||
paintingNode = new PaintingNode();
|
||||
Paint innerPaint = new Paint()..color = new Color.fromARGB(a, 255 - r, 255 - g, 255 - b);
|
||||
PictureRecorder innerRecorder = new PictureRecorder();
|
||||
Canvas innerCanvas = new Canvas(innerRecorder, Point.origin & bounds);
|
||||
Canvas innerCanvas = new Canvas(innerRecorder, Point.origin & size);
|
||||
innerCanvas.drawCircle(size.center(Point.origin), radius * 0.5, innerPaint);
|
||||
|
||||
paintingNode.setBackingDrawable(innerRecorder.endRecordingAsDrawable());
|
||||
|
||||
@@ -21,11 +21,11 @@ void beginFrame(double timeStamp) {
|
||||
..setPaintBits(PaintBits.all)
|
||||
..setOffset(const Offset(5.0, 5.0))
|
||||
..setColorMode(TransferMode.src),
|
||||
(Paint layerPaint) {
|
||||
layerPaint.color = const Color.fromARGB(128, 55, 55, 55);
|
||||
layerPaint.setMaskFilter(
|
||||
new MaskFilter.blur(BlurStyle.normal, 5.0, highQuality: true));
|
||||
})
|
||||
new Paint()
|
||||
..color = const Color.fromARGB(128, 55, 55, 55)
|
||||
..setMaskFilter(
|
||||
new MaskFilter.blur(BlurStyle.normal, 5.0, highQuality: true))
|
||||
)
|
||||
// Main layer.
|
||||
..addLayerOnTop(new DrawLooperLayerInfo(), new Paint());
|
||||
paint.setDrawLooper(builder.build());
|
||||
|
||||
@@ -20,7 +20,7 @@ void beginFrame(double timeStamp) {
|
||||
PictureRecorder recorder = new PictureRecorder();
|
||||
final double devicePixelRatio = view.devicePixelRatio;
|
||||
Canvas canvas = new Canvas(recorder, Point.origin & new Size(view.width * devicePixelRatio, view.height * devicePixelRatio));
|
||||
cavnas.scale(devicePixelRatio, devicePixelRatio);
|
||||
canvas.scale(devicePixelRatio, devicePixelRatio);
|
||||
canvas.translate(view.width / 2.0, view.height / 2.0);
|
||||
canvas.rotate(math.PI * delta / 1800);
|
||||
canvas.scale(0.2, 0.2);
|
||||
@@ -61,7 +61,7 @@ bool handleEvent(Event event) {
|
||||
}
|
||||
|
||||
if (event.type == "pointerup") {
|
||||
image_cache.load(url2).then(handleImageLoad);
|
||||
image_cache.load(url2).first.then(handleImageLoad);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ bool handleEvent(Event event) {
|
||||
}
|
||||
|
||||
void main() {
|
||||
image_cache.load(url1).then(handleImageLoad);
|
||||
image_cache.load(url1).first.then(handleImageLoad);
|
||||
view.setEventCallback(handleEvent);
|
||||
view.setFrameCallback(beginFrame);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user