Add null checks for CanvasElement attributes (flutter/engine#20580)
Changes in processing compatibility info in dart:html requires these getters to be null-checked.
This commit is contained in:
@@ -291,8 +291,8 @@ void _debugPrintSurfaceStats(PersistedScene scene, int frameNumber) {
|
||||
final int pixelCount = canvasElements
|
||||
.cast<html.CanvasElement>()
|
||||
.map<int>((html.CanvasElement e) {
|
||||
final int pixels = e.width * e.height;
|
||||
canvasInfo.writeln(' - ${e.width} x ${e.height} = $pixels pixels');
|
||||
final int pixels = e.width! * e.height!;
|
||||
canvasInfo.writeln(' - ${e.width!} x ${e.height!} = $pixels pixels');
|
||||
return pixels;
|
||||
}).fold(0, (int total, int pixels) => total + pixels);
|
||||
final double physicalScreenWidth =
|
||||
|
||||
Reference in New Issue
Block a user