import'dart:sky'assky;import'dart:sky'showRect,Color,Paint;import'package:test/test.dart';import'package:vector_math/vector_math.dart';voidmain(){sky.PictureRecorderrecorder=newsky.PictureRecorder();sky.Canvascanvas=newsky.Canvas(recorder,newRect.fromLTRB(0.0,0.0,100.0,100.0));test("matrix access should work",(){// Matrix equality doesn't work!// https://github.com/google/vector_math.dart/issues/147expect(canvas.getTotalMatrix(),equals(newMatrix4.identity().storage));Matrix4matrix=newMatrix4.identity();// Round-tripping through getTotalMatrix will lose the z value// So only scale to 1x in the z direction.matrix.scale(2.0,2.0,1.0);canvas.setMatrix(matrix.storage);canvas.drawPaint(newPaint()..color=constColor(0xFF00FF00));expect(canvas.getTotalMatrix(),equals(matrix.storage));});}